~coder_kalyan/tree-sitter-scfg

4f2b8ae0e2611224f7f44055fa04cc2a4e2fd75d — Kalyan Sriram 2 years ago b3aa103 master
grammar: remove type detection
1 files changed, 6 insertions(+), 4 deletions(-)

M grammar.js
M grammar.js => grammar.js +6 -4
@@ 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]+"/,