1
0
Fork 0
mirror of https://github.com/pnx/tree-sitter-dotenv synced 2026-06-16 01:54:56 +02:00

add integer and boolean values

This commit is contained in:
Henrik Hautakoski 2024-12-10 22:24:26 +01:00
parent 948e93ffac
commit adc9052da5
5 changed files with 293 additions and 71 deletions

View file

@ -31,6 +31,8 @@ module.exports = grammar({
_value: $ => choice(
$.string,
$.string_interpolation,
$.integer,
$.boolean,
$.value,
alias($._empty_value, $.value),
),
@ -49,6 +51,10 @@ module.exports = grammar({
string_content: _ => token(/[^']*/),
string_interpolation_content: _ => token(/[^"]*/),
integer: _ => token(/(\-)?\d+/),
boolean: _ => token(choice('true', 'false')),
value: _ => token(prec(-1, /[^\#\=\s]+/)),
},
});