Skip to content

Commit e1be151

Browse files
committed
Make the catchall mode exit the function rather than continuing (and infinite-looping).
1 parent 3e5bd7f commit e1be151

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

parser.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ function parse(tokens) {
195195
break;
196196

197197
default:
198+
// If you hit this, it's because one of the switch() calls is typo'd.
198199
console.log('Unknown parsing mode: ' + mode);
200+
return;
199201
}
200202
}
201203

0 commit comments

Comments
 (0)