X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=runtime%2Fsyntax%2Fpython3.yaml;h=8ea928b4301e959aa36dfa8ddf1a3f7f3abbd8b5;hb=3515f254c43aa7a7c96ddc7c430a30841e5efc5b;hp=6b15572fe87f3f26c69a8b183fd61a37cf191653;hpb=1655fde09b93bb4f0fbd58e63977492cab1c438b;p=micro.git diff --git a/runtime/syntax/python3.yaml b/runtime/syntax/python3.yaml index 6b15572f..8ea928b4 100644 --- a/runtime/syntax/python3.yaml +++ b/runtime/syntax/python3.yaml @@ -16,19 +16,19 @@ 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" - - comment: + - constant.string: start: "\"\"\"" end: "\"\"\"" rules: [] @@ -40,13 +40,15 @@ rules: - constant.string: start: "\"" - end: "(?