aboutsummaryrefslogtreecommitdiff
path: root/grammars/go.bp
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-07-19 19:40:43 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-07-19 19:40:43 -0700
commit711fe47a7f651f38e090c9a20ecef11feba6f705 (patch)
tree98a3283e7c630919a08f8bd95326ceeb1a93da9e /grammars/go.bp
parent62e7d654bd70db89cb38e5d9efeb9a9b0e9cf202 (diff)
Overhaul of word boundaries/edges. Now they use \b, which is implemented
in C, and the C code understands UTF8 id chars.
Diffstat (limited to 'grammars/go.bp')
-rw-r--r--grammars/go.bp4
1 files changed, 2 insertions, 2 deletions
diff --git a/grammars/go.bp b/grammars/go.bp
index 71114cf..f86f2eb 100644
--- a/grammars/go.bp
+++ b/grammars/go.bp
@@ -12,6 +12,6 @@ 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-def: \b"func"\b __ id __ parens __ [id / parens] >(__`{)
function: function-def __ braces
-import: {import} __ (parens / string)
+import: \b"import"\b __ (parens / string)