From 711fe47a7f651f38e090c9a20ecef11feba6f705 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 19 Jul 2021 19:40:43 -0700 Subject: Overhaul of word boundaries/edges. Now they use \b, which is implemented in C, and the C code understands UTF8 id chars. --- grammars/javascript.bp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'grammars/javascript.bp') diff --git a/grammars/javascript.bp b/grammars/javascript.bp index 76fa586..b59742c 100644 --- a/grammars/javascript.bp +++ b/grammars/javascript.bp @@ -18,6 +18,6 @@ keyword: "public" / "return" / "short" / "static" / "super" / "switch" / "synchronized" / "this" / "throw" / "throws" / "transient" / "true" / "try" / "typeof" / "var" / "void" / "volatile" / "while" / "with" / "yield" -function-def: {function} __ [id__] parens / (id / parens) __ "=>" +function-def: \b"function"\b __ [id__] parens / (id / parens) __ "=>" function: function-def __ braces -import: {import} ..%braces (`; / $) +import: \b"import"\b ..%braces (`; / $) -- cgit v1.2.3