fix scanner and update regexes
This commit is contained in:
1 parent
140e099275
commit
d86f6533a8
6 files changed
+1312
-1270
No files matched your search
+2
-2
@@ -138,11 +138,11 @@
|
||||
},
|
||||
"number": {
|
||||
"type": "PATTERN",
|
||||
"value": "-?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE]-?[0-9]+)?"
|
||||
"value": "[-+]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][0-9]+)?"
|
||||
},
|
||||
"string": {
|
||||
"type": "PATTERN",
|
||||
"value": "\"(?:[^\"\\\\]|\\\\\\\\|\\\\\")*\"|'(?:[^'\\\\]|\\\\\\\\|\\\\')*'"
|
||||
"value": "\"(?:[^\"\\\\]|\\\\[^\\n])*\"|'(?:[^'\\\\]|\\\\[^\\n])*'"
|
||||
},
|
||||
"attribute": {
|
||||
"type": "PATTERN",
|
||||
|
||||
+1259
-1265
File diff suppressed because it is too large.
Load diff
+3
-1
@@ -471,7 +471,9 @@ static bool scan_verbatim_content(struct Scanner *const scanner, TSLexer *const
|
||||
* it, which leaves this the only place to catch the run-on. */
|
||||
static bool scan_after_literal(TSLexer *const lexer) {
|
||||
int32_t next = lexer->lookahead;
|
||||
if (check_name_char(next) || next == '\'' || next == '"' || next == '-') {
|
||||
// anything that could begin another value: a name, a quote, or a sign or
|
||||
// point that would start a second number ("{% cycle 1.2.3 %}")
|
||||
if (check_name_char(next) || next == '\'' || next == '"' || next == '-' || next == '+' || next == '.') {
|
||||
return false;
|
||||
}
|
||||
lexer->mark_end(lexer);
|
||||
|
||||
Reference in new issue
Block a user