From a93220972f8130732c8cd0267c0b14db77ac19ea Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 11 May 2021 12:38:58 -0700 Subject: Overhaul of |-word boundaries (| is deprecated), performance improvements for repeating matches, tweaks to the logic of word vs. id --- grammars/go.bp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'grammars/go.bp') diff --git a/grammars/go.bp b/grammars/go.bp index 425325a..c9f7377 100644 --- a/grammars/go.bp +++ b/grammars/go.bp @@ -8,11 +8,10 @@ comment: "//" .. $ / "/*" ..%\n "*/" string: `" ..%(`\.) `" -keyword: |( +keyword: "break" / "default" / "func" / "interface" / "select" / "case" / "defer" / "go" / "map" / "struct" / "chan" / "else" / "goto" / "package" / "switch" / "const" / "fallthrough" / "if" / "range" / "type" / "continue" / "for" / "import" / "return" / "var" -)| function-def: {func} __ id __ parens __ [id / parens] >(__`{) function: function-def __ braces import: {import} __ (parens / string) -- cgit v1.2.3