Skip to content

Commit 3bf3d91

Browse files
committed
Disable word in TreeSitter grammar
1 parent 42a87f8 commit 3bf3d91

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
module.exports = grammar({
77
name: "jsontm",
8-
word: $ => $._string,
8+
// word: $ => $._string,
99
extras: $ => [
1010
//$._whitespace,
1111
],
@@ -488,13 +488,11 @@ module.exports = grammar({
488488
),
489489

490490
boolean: $ => choice(
491-
"true", // Why does this like eating spaces
492-
"false", // hmmmm.... commmas... tasty.... WTF
493-
/fa[l\t]se/, // Why does it need to also match tab?!?!
494-
/tr[u\t]e/, // Why does "true" not just work?!?!
491+
"true",
492+
"false",
495493
),
496-
null: $ => /nu[l\t]l/, // WTF is happening
497-
integer: $ => /-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/, // Why does this work?!?!
494+
null: $ => /null/,
495+
integer: $ => /-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/,
498496
_string: $ => token(
499497
prec(-1,
500498
repeat1(

0 commit comments

Comments
 (0)