aboutsummaryrefslogtreecommitdiff
path: root/grammars/lua.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/lua.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/lua.bp')
-rw-r--r--grammars/lua.bp3
1 files changed, 1 insertions, 2 deletions
diff --git a/grammars/lua.bp b/grammars/lua.bp
index 5554167..6967f1e 100644
--- a/grammars/lua.bp
+++ b/grammars/lua.bp
@@ -9,11 +9,10 @@
comment: "--" (`[ @eqs=*`= `[ ..%\n (`]eqs`]) / ..$)
string: `"..%(`\.) `" / `' ..%(`\.) `' / `[ @eqs=*`= `[ ..%\n (`]eqs`])
table: `{ ..%(table/string/comment/\n) `}
-keyword: |(
+keyword:
"and" / "break" / "do" / "else" / "elseif" / "end" / "false" / "for" /
"function" / "goto" / "if" / "in" / "local" / "nil" / "not" / "or" /
"repeat" / "return" / "then" / "true" / "until" / "while"
-)|
function-def: {function}[_id (*(`.id)[`:id])]_ parens
block: function / ({do}/{then}) ..%(comment/string/block/\n) {end}
function: function-def ..%(comment/string/block/\n) {end}