X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=runtime%2Fsyntax%2Fgo.yaml;h=3885c7b17d952f88d53d26ff1ef3773243ec0f5b;hb=54c23cae72d7237bc898a59f79aad0acffdf0ffe;hp=67825bd44710b00961dc06072f881cc6fa207ac8;hpb=7d422bfae2742876d42446bb294aab1b25786c95;p=micro.git diff --git a/runtime/syntax/go.yaml b/runtime/syntax/go.yaml index 67825bd4..3885c7b1 100644 --- a/runtime/syntax/go.yaml +++ b/runtime/syntax/go.yaml @@ -5,17 +5,15 @@ detect: rules: # Conditionals and control flow - - special: "\\b(break|case|continue|default|go|goto|range|return)\\b" - - statement: "\\b(else|for|if|switch)\\b" - - preproc: "\\b(package|import|const|var|type|struct|func|go|defer|iota)\\b" + - special: "\\b(break|case|continue|default|go|goto|range|return|println|fallthrough)\\b" + - statement: "\\b(else|for|if|switch|select)\\b" + - preproc: "\\b(package|import|const|var|type|struct|func|defer|iota|make|new|copy|len|cap|panic|append|close|delete|print|recover)\\b" - symbol.operator: "[-+/*=<>!~%&|^]|:=" # Types - - special: "[a-zA-Z0-9]*\\(" - symbol: "(,|\\.)" - type: "\\b(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\\b" - type: "\\b(uintptr|byte|rune|string|interface|bool|map|chan|error)\\b" - ##I'm... not sure, but aren't structs a type? - type.keyword: "\\b(struct)\\b" - constant.bool: "\\b(true|false|nil)\\b" @@ -30,6 +28,7 @@ rules: - constant.string: start: "\"" end: "\"" + skip: "\\\\." rules: - constant.specialChar: "%." - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]" @@ -38,6 +37,7 @@ rules: - constant.string: start: "'" end: "'" + skip: "\\\\." rules: - error: "..+" - constant.specialChar: "%."