Browse Source

Fix inefficient string tokenization

pull/16/merge
Max Brunsfeld 7 years ago
parent
commit
a71bef804d
3 changed files with 885 additions and 823 deletions
  1. +1
    -1
      grammar.js
  2. +1
    -1
      src/grammar.json
  3. +883
    -821
      src/parser.c

+ 1
- 1
grammar.js View File

@ -700,7 +700,7 @@ module.exports = grammar({
string_literal: $ => seq(
'"',
repeat(choice(
token.immediate(prec(1, /[^\\"\n]/)),
token.immediate(prec(1, /[^\\"\n]+/)),
$.escape_sequence
)),
'"'

+ 1
- 1
src/grammar.json View File

@ -4152,7 +4152,7 @@
"value": 1,
"content": {
"type": "PATTERN",
"value": "[^\\\\\"\\n]"
"value": "[^\\\\\"\\n]+"
}
}
},

+ 883
- 821
src/parser.c
File diff suppressed because it is too large
View File


Loading…
Cancel
Save