tangled
alpha
login
or
join now
kitten.sh
/
reghex
0
fork
atom
Mirror: The magical sticky regex-based parser generator 🧙
0
fork
atom
overview
issues
pulls
pipelines
Merge EOI error into unexpected token error
kitten.sh
5 years ago
b2a0fc15
62301ecd
+1
-5
1 changed file
expand all
collapse all
unified
split
src
parser.js
+1
-5
src/parser.js
···
64
64
currentGroup
65
65
) {
66
66
const nextChar = quasi[quasiIndex++];
67
67
-
if (!nextChar) {
68
68
-
throw new SyntaxError('Unexpected end of input');
69
69
-
}
70
70
-
71
67
if (nextChar === ':') {
72
68
currentGroup.capture = nextChar;
73
69
continue;
···
87
83
continue;
88
84
}
89
85
90
90
-
throw new SyntaxError('Unexpected token ' + char);
86
86
+
throw new SyntaxError('Unexpected token "' + char + '"');
91
87
}
92
88
93
89
stackIndex++;