From 14b4674929a2b04135128cb4340b79a71ffadcec Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 23 Sep 2020 15:54:28 -0700 Subject: [PATCH] Add o to octal literals, use [Xx] instead of ?i:. --- Python/Python.tmLanguage | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Python/Python.tmLanguage b/Python/Python.tmLanguage index d536b76..7509883 100644 --- a/Python/Python.tmLanguage +++ b/Python/Python.tmLanguage @@ -51,18 +51,25 @@ match - \b(?i:(0x\h*)) + \b(0[Xx]\h*) name constant.numeric.integer.hexadecimal.python match - \b(0[0-7]+) + \b(0[Oo][0-7]+) name constant.numeric.integer.octal.python + + match + \b([1-9]+[0-9_]*|0) + name + constant.numeric.integer.decimal.python + + match \b(?i:(((\d+(\.(?=[^a-zA-Z_])\d*)?|(?<=[^0-9a-zA-Z_])\.\d+)(e[\-\+]?\d+)?))J) @@ -91,13 +98,6 @@ constant.numeric.float.python - - match - \b([1-9]+[0-9_]*|0) - name - constant.numeric.integer.decimal.python - - captures