parent
e3e88477f5
commit
c034605a69
|
@ -61,7 +61,7 @@ class PythonGrammar(Grammar):
|
|||
RegionRule('string', 'u?"', StringGrammar2, '"'),
|
||||
RegionRule('string', "u?'", StringGrammar1, "'"),
|
||||
|
||||
PatternRule('delimiter', r'\(|\)|\[|\]|{|}|@|,|:|\.|`|=|;|\+=|-=|\*=|/=|//=|%=|&=|\|=|\^=|>>=|<<=|\*\*='),
|
||||
PatternRule('delimiter', r'\(|\)|\[|\]|{|}|,|:|\.|`|=|;|\+=|-=|\*=|/=|//=|%=|&=|\|=|\^=|>>=|<<=|\*\*='),
|
||||
PatternRule(r"python.integer", r"(?<![\.0-9a-zA-Z_])(?:0|-?[1-9][0-9]*|0[0-7]+|0[xX][0-9a-fA-F]+)[lL]?(?![\.0-9a-zA-Z_])"),
|
||||
PatternRule(r"python.float", r"(?<![\.0-9a-zA-Z_])(?:-?[0-9]+\.[0-9]*|-?\.[0-9]+|(?:[0-9]|[0-9]+\.[0-9]*|-?\.[0-9]+)[eE][\+-]?[0-9]+)(?![\.0-9a-zA-Z_])"),
|
||||
PatternRule(r"python.imaginary", r"(?<![\.0-9a-zA-Z_])(?:[0-9]+|(?:[0-9]+\.[0-9]*|\.[0-9]+|(?:[0-9]|[0-9]+\.[0-9]*|\.[0-9]+)[eE][\+-]?[0-9]+)[jJ])(?![\.0-9a-zA-Z_])"),
|
||||
|
@ -71,7 +71,7 @@ class PythonGrammar(Grammar):
|
|||
OverridePatternRule('comment', '#@@:(?P<token>[.a-zA-Z0-9_]+):(?P<mode>[.a-zA-Z0-9_]+) *$'),
|
||||
PatternRule('comment', '#.*$'),
|
||||
PatternRule('continuation', r'\\\n$'),
|
||||
PatternRule('decorator', '@[a-zA-Z_][a-zA-Z0-9_]*'),
|
||||
PatternRule('python.decorator', '@[a-zA-Z_][a-zA-Z0-9_]*'),
|
||||
PatternRule('spaces', ' +'),
|
||||
PatternRule('eol', r'\n$'),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue