Przeglądaj źródła

Fix inefficient string tokenization

pull/16/merge
Max Brunsfeld 7 lat temu
rodzic
commit
a71bef804d
3 zmienionych plików z 885 dodań i 823 usunięć
  1. +1
    -1
      grammar.js
  2. +1
    -1
      src/grammar.json
  3. +883
    -821
      src/parser.c

+ 1
- 1
grammar.js Wyświetl plik

@ -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 Wyświetl plik

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

+ 883
- 821
src/parser.c
Plik diff jest za duży
Wyświetl plik


Ładowanie…
Anuluj
Zapisz