Skip to content

Commit b449ab5

Browse files
committed
allow underscore in named capturing group
1 parent 47007f1 commit b449ab5

File tree

4 files changed

+247
-247
lines changed

4 files changed

+247
-247
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ module.exports = grammar({
200200
// [+U]uNonSurrogate
201201
// [~U]uHex4Digits
202202
// [+U]u{CodePoint}
203-
group_name: _ => /[A-Za-z0-9]+/,
203+
group_name: _ => /[A-Za-z_][A-Za-z0-9_]*/,
204204

205205
decimal_digits: _ => /\d+/,
206206
},

src/grammar.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)