mirror of
https://github.com/zyedidia/micro.git
synced 2024-10-27 12:37:38 +03:00
Merge pull request #1205 from kylebarron/python-syntax-fixes
Use symbol.operator and symbol.brackets scopes correctly in Python syntax file
This commit is contained in:
commit
5c2fc92332
@ -23,9 +23,9 @@ rules:
|
||||
# decorators
|
||||
- brightgreen: "@.*[(]"
|
||||
# operators
|
||||
- statement: "([.:;,+*|=!\\%@]|<|>|/|-|&)"
|
||||
- symbol.operator: "([.:;,+*|=!\\%@]|<|>|/|-|&)"
|
||||
# parentheses
|
||||
- statement: "([(){}]|\\[|\\])"
|
||||
- symbol.brackets: "([(){}]|\\[|\\])"
|
||||
# numbers
|
||||
- constant.number: "\\b[0-9]+\\b"
|
||||
|
||||
|
@ -16,15 +16,15 @@ rules:
|
||||
# types
|
||||
- type: "\\b(bool|bytearray|bytes|classmethod|complex|dict|enumerate|filter|float|frozenset|int|list|map|memoryview|object|property|range|reversed|set|slice|staticmethod|str|super|tuple|type|zip)\\b"
|
||||
# definitions
|
||||
- identifier: "def [a-zA-Z_0-9]+"
|
||||
- identifier: "def [a-zA-Z_0-9]+"
|
||||
# keywords
|
||||
- statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b"
|
||||
- statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b"
|
||||
# decorators
|
||||
- brightgreen: "@.*[(]"
|
||||
# operators
|
||||
- statement: "([.:;,+*|=!\\%@]|<|>|/|-|&)"
|
||||
- symbol.operator: "([.:;,+*|=!\\%@]|<|>|/|-|&)"
|
||||
# parentheses
|
||||
- statement: "([(){}]|\\[|\\])"
|
||||
- symbol.brackets: "([(){}]|\\[|\\])"
|
||||
# numbers
|
||||
- constant.number: "\\b[0-9]+\\b"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user