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:
parent
948e93ffac
commit
adc9052da5
5 changed files with 293 additions and 71 deletions
|
|
@ -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]+/)),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue