aboutsummaryrefslogtreecommitdiff
path: root/grammar.js
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-14 22:38:58 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-14 22:38:58 +0200
commit11b47b424b7576c536216bb7e3bcbaaa65f5acd4 (patch)
tree9b82bff4d106edc1e42c29df9ce747a9115e54a9 /grammar.js
parent5ba881221f265d4ad7805b49da8a0dd273cb3887 (diff)
Slightly tweak the grammar
Diffstat (limited to 'grammar.js')
-rw-r--r--grammar.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/grammar.js b/grammar.js
index 3cf8ca3..ef85908 100644
--- a/grammar.js
+++ b/grammar.js
@@ -39,8 +39,10 @@ module.exports = grammar({
'=',
field('value', $.string)
),
- id_attr: $ => seq('#', alias(token.immediate(IDENT), $.ident)),
- class_attr: $ => seq('.', alias(token.immediate(IDENT), $.ident)),
+ id_attr: $ => seq('#',
+ field('name', alias(token.immediate(IDENT), $.ident))),
+ class_attr: $ => seq('.',
+ field('name', alias(token.immediate(IDENT), $.ident))),
text: $ => repeat1(choice(
/(\\[@}\\]|[^@}\\])+/,