Start work on recognizing impossible patterns

This commit is contained in:
Max Brunsfeld 2020-06-22 16:20:49 -07:00
parent 4c2f36a07b
commit 7f955419a8
7 changed files with 212 additions and 89 deletions

View file

@ -680,6 +680,9 @@ class Language {
case 4:
error = new RangeError(`Bad capture name @${word}`);
break;
case 5:
error = new SyntaxError(`Impossible pattern at offset ${errorIndex}: '${suffix}'...`);
break;
default:
error = new SyntaxError(`Bad syntax at offset ${errorIndex}: '${suffix}'...`);
break;