Allow for empty strings
This commit is contained in:
parent
748c6b1fa4
commit
f257840fd8
|
@ -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),
|
||||
|
|
|
@ -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",
|
||||
|
|
675
src/parser.c
675
src/parser.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue