Closed pokey closed 1 year ago
I've added the patterns for these bindings to the syntax, but I've not pushed them through yet.
(See line 154 onwards in grammar.js
.)
I couldn't decide whether to abstract over these patterns or not, but abstracting over them would cause changes in the parsed AST.
I'd be inclined to just do the simple thing for now and not abstract over them. Can always revisit
If you're so inclined, this really just requires wiring up the binding nonterminals that are already there to some new declaration types following:
key_binding_declaration: ($) =>
seq(
field("left", $._key_binding),
":",
field("right", $._statements),
),
And adding some tests.
These should work from 3.4.0 onwards. Please report bugs if you find them.
gamepad(foo): bar
deck(foo): bar
parrot(foo): bar
(maybe this already works? no tests)face(foo): bar
(maybe this already works? no tests)