Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fefa687

Browse files
committed
Merge pull request atom#54 from nicktimko/binary-literals
Add binary literals
2 parents a8376a5 + b958f85 commit fefa687

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

grammars/python.cson

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,21 @@
4444
'name': 'constant.numeric.integer.hexadecimal.python'
4545
}
4646
{
47-
'match': '\\b(?i:(0[oO]?[0-7]+)L)'
47+
'match': '\\b(?i:(0o?[0-7]+)L)'
4848
'name': 'constant.numeric.integer.long.octal.python'
4949
}
5050
{
51-
'match': '\\b(0[oO]?[0-7]+)'
51+
'match': '\\b(?i:(0o?[0-7]+))'
5252
'name': 'constant.numeric.integer.octal.python'
5353
}
54+
{
55+
'match': '\\b(?i:(0b[01]+)L)',
56+
'name': 'constant.numeric.integer.long.binary.python'
57+
}
58+
{
59+
'match': '\\b(?i:(0b[01]+))',
60+
'name': 'constant.numeric.integer.binary.python'
61+
}
5462
{
5563
'match': '\\b(?i:(((\\d+(\\.(?=[^a-zA-Z_])\\d*)?|(?<=[^0-9a-zA-Z_])\\.\\d+)(e[\\-\\+]?\\d+)?))J)'
5664
'name': 'constant.numeric.complex.python'

0 commit comments

Comments
 (0)