Skip to content

Commit

Permalink
Test some things
Browse files Browse the repository at this point in the history
  • Loading branch information
Mango0x45 committed Sep 22, 2024
1 parent 7e2765b commit 425bb2e
Show file tree
Hide file tree
Showing 4 changed files with 316 additions and 273 deletions.
8 changes: 4 additions & 4 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ module.exports = grammar({
class_attr: $ => seq('.',
field('name', alias(token.immediate(IDENT), $.ident))),

text: $ => repeat1(choice(
/(\\[@}\\]|[^@}\\\p{Pattern_White_Space}])((\\[@}\\]|[^@}\\])*(\\[@}\\]|[^@}\\\p{Pattern_White_Space}]))?/u,
seq('@', $._toplevel),
)),
text: $ => repeat1(choice($.raw_text, $.inline_node)),
raw_text: $ => /(\\[@}\\]|[^@}\\\p{Pattern_White_Space}])((\\[@}\\]|[^@}\\])*(\\[@}\\]|[^@}\\\p{Pattern_White_Space}]))?/u,
inline_node: $ => seq('@', $._toplevel),

ident: $ => IDENT,
string: $ => /"(\\["\\]|[^"\\])+"/,
},
Expand Down
36 changes: 22 additions & 14 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 26 additions & 3 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 425bb2e

Please sign in to comment.