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/rust.bp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'grammars/rust.bp') diff --git a/grammars/rust.bp b/grammars/rust.bp index bb58a61..97a1e73 100644 --- a/grammars/rust.bp +++ b/grammars/rust.bp @@ -8,12 +8,11 @@ comment: "//" .. $ / "/*" ..%(comment / \n) "*/" string: `" ..%(`\.) `" -keyword: |( +keyword: "as" / "break" / "const" / "continue" / "crate" / "else" / "enum" / "extern" / "false" / "fn" / "for" / "if" / "impl" / "in" / "let" / "loop" / "match" / "mod" / "move" / "mut" / "pub" / "ref" / "return" / "self" / "Self" / "static" / "struct" / "super" / "trait" / "true" / "type" / "unsafe" / "use" / "where" / "while" -)| function-def: {fn} __ id __ parens __ ["->"__(id / parens)] >(__`{) function: function-def __ braces import: {use} _ *(id / braces) % "::" _ `; -- cgit v1.2.3