From 4f2b8ae0e2611224f7f44055fa04cc2a4e2fd75d Mon Sep 17 00:00:00 2001 From: Kalyan Sriram Date: Sun, 17 Apr 2022 22:06:15 -0700 Subject: [PATCH] grammar: remove type detection --- grammar.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/grammar.js b/grammar.js index b7c2fe4..c0de43e 100644 --- a/grammar.js +++ b/grammar.js @@ -24,15 +24,16 @@ module.exports = grammar({ ), _word: $ => choice( - $.integer_scalar, - $.float_scalar, - $.true, - $.false, $.atom, $.dquote_word, $.squote_word, ), + // additional tokens for highlighting with type detection + // disabled because scfg does not actually define types + // other than unquoted and quoted strings + // this can be added back later + /* true: $ => choice( "true", "True", @@ -48,6 +49,7 @@ module.exports = grammar({ /0b[01]+/, ), float_scalar: $ => /[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)/, + */ atom: $ => /[^"\r\n'{}\s]+/, dquote_word: $ => /"[^"\\\r\n]+"/, -- 2.45.2