Allow for empty strings

This commit is contained in:
Preston Baxter 2024-01-29 13:32:10 -06:00
parent 748c6b1fa4
commit f257840fd8
3 changed files with 330 additions and 357 deletions

View File

@ -29,11 +29,11 @@ module.exports = grammar({
"`"
),
code_contents: $ => /[^`]+/,
code_contents: $ => /[^`]*/,
double_contents: $ => /[^"]+/,
double_contents: $ => /[^"]*/,
single_contents: $ => /[^']+/,
single_contents: $ => /[^']*/,
number: $ => seq(optional("-"), /[0-9]+/, optional(seq(".", repeat(/[0-9]/)))),
boolean: $ => choice($.true, $.false),

View File

@ -66,15 +66,15 @@
},
"code_contents": {
"type": "PATTERN",
"value": "[^`]+"
"value": "[^`]*"
},
"double_contents": {
"type": "PATTERN",
"value": "[^\"]+"
"value": "[^\"]*"
},
"single_contents": {
"type": "PATTERN",
"value": "[^']+"
"value": "[^']*"
},
"number": {
"type": "SEQ",

File diff suppressed because it is too large Load Diff