Skip to content

Commit b518ad4

Browse files
authored
fix: correct grammar rule for named backreferences
These need angle brackets around the group name.
1 parent 58f4caf commit b518ad4

File tree

5 files changed

+629
-590
lines changed

5 files changed

+629
-590
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ module.exports = grammar({
166166
'}',
167167
)),
168168

169-
backreference_escape: $ => seq('\\k', $.group_name),
169+
backreference_escape: $ => seq('\\k', '<', $.group_name, '>'),
170170

171171
decimal_escape: _ => /\\[1-9][0-9]*/,
172172

src/grammar.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)