Skip to content

Commit 2925aae

Browse files
committed
Fix #include names containing $self
1 parent a67511b commit 2925aae

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/tree-sitter/tree-sitter-json/grammar.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,14 @@ module.exports = grammar({
168168
),
169169
_includeRuleName: $ => fieldAlias($,
170170
'ruleName',
171-
$._string,
171+
token(
172+
repeat1(
173+
choice(
174+
/\\[^\r\n\t]/,
175+
/[^\\\r\n\t"]+/,
176+
),
177+
),
178+
),
172179
),
173180
_self: $ => fieldAlias($,
174181
'self',

0 commit comments

Comments
 (0)