aboutsummaryrefslogtreecommitdiff
path: root/grammar.js
diff options
context:
space:
mode:
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(
/(\\[@}\\]|[^@}\\])+/,