Parcourir la source

Fix inefficient string tokenization

pull/16/merge
Max Brunsfeld il y a 7 ans
Parent
révision
a71bef804d
3 fichiers modifiés avec 885 ajouts et 823 suppressions
  1. +1
    -1
      grammar.js
  2. +1
    -1
      src/grammar.json
  3. +883
    -821
      src/parser.c

+ 1
- 1
grammar.js Voir le fichier

@ -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 Voir le fichier

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

+ 883
- 821
src/parser.c
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


Chargement…
Annuler
Enregistrer