summaryrefslogtreecommitdiff
path: root/src/llex.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-04-27 01:56:56 +1000
committerdaurnimator <quae@daurnimator.com>2017-04-27 01:56:56 +1000
commit0ad47e19d91dbfc04f890cdbbd09f7cf9f3e9d5f (patch)
tree355aa8bdb75c6c6771284f5133a5c107f5c09475 /src/llex.js
parent37249336464af98800a7ed0b6ec21dc76b6effe9 (diff)
downloadfengari-0ad47e19d91dbfc04f890cdbbd09f7cf9f3e9d5f.tar.gz
fengari-0ad47e19d91dbfc04f890cdbbd09f7cf9f3e9d5f.tar.bz2
fengari-0ad47e19d91dbfc04f890cdbbd09f7cf9f3e9d5f.zip
Add a couple of asserts to catch common errors
Diffstat (limited to 'src/llex.js')
-rw-r--r--src/llex.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/llex.js b/src/llex.js
index da15b2f..703db49 100644
--- a/src/llex.js
+++ b/src/llex.js
@@ -500,6 +500,7 @@ const llex = function(ls, seminfo) {
ls.buff.buffer = [];
for (;;) {
+ assert(typeof ls.current == "number");
switch (ls.current) {
case char['\n']: case char['\r']: { /* line breaks */
inclinenumber(ls);