aboutsummaryrefslogtreecommitdiff
path: root/grammars/rust.bp
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-05-11 12:38:58 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-05-11 12:38:58 -0700
commita93220972f8130732c8cd0267c0b14db77ac19ea (patch)
treed1141bfdcded68c8b51d9ed6a735aea5134ab4c8 /grammars/rust.bp
parent3359a804c8fe02ea4e9bc1abb7430109affdd535 (diff)
Overhaul of |-word boundaries (| is deprecated), performance
improvements for repeating matches, tweaks to the logic of word vs. id
Diffstat (limited to 'grammars/rust.bp')
-rw-r--r--grammars/rust.bp3
1 files changed, 1 insertions, 2 deletions
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) % "::" _ `;