Add o to octal literals, use [Xx] instead of ?i:.

This commit is contained in:
Ethan Dalool 2020-09-23 15:54:28 -07:00
parent 60722a3126
commit 14b4674929

View file

@ -51,18 +51,25 @@
<dict> <dict>
<key>match</key> <key>match</key>
<string>\b(?i:(0x\h*))</string> <string>\b(0[Xx]\h*)</string>
<key>name</key> <key>name</key>
<string>constant.numeric.integer.hexadecimal.python</string> <string>constant.numeric.integer.hexadecimal.python</string>
</dict> </dict>
<dict> <dict>
<key>match</key> <key>match</key>
<string>\b(0[0-7]+)</string> <string>\b(0[Oo][0-7]+)</string>
<key>name</key> <key>name</key>
<string>constant.numeric.integer.octal.python</string> <string>constant.numeric.integer.octal.python</string>
</dict> </dict>
<dict>
<key>match</key>
<string>\b([1-9]+[0-9_]*|0)</string>
<key>name</key>
<string>constant.numeric.integer.decimal.python</string>
</dict>
<dict> <dict>
<key>match</key> <key>match</key>
<string>\b(?i:(((\d+(\.(?=[^a-zA-Z_])\d*)?|(?&lt;=[^0-9a-zA-Z_])\.\d+)(e[\-\+]?\d+)?))J)</string> <string>\b(?i:(((\d+(\.(?=[^a-zA-Z_])\d*)?|(?&lt;=[^0-9a-zA-Z_])\.\d+)(e[\-\+]?\d+)?))J)</string>
@ -91,13 +98,6 @@
<string>constant.numeric.float.python</string> <string>constant.numeric.float.python</string>
</dict> </dict>
<dict>
<key>match</key>
<string>\b([1-9]+[0-9_]*|0)</string>
<key>name</key>
<string>constant.numeric.integer.decimal.python</string>
</dict>
<dict> <dict>
<key>captures</key> <key>captures</key>
<dict> <dict>