Correctly raise a parse exception with a missing loop body (#1585)
This commit is contained in:
committed by
Alex Lam S.L
parent
b633706ce4
commit
93cdb194f4
@@ -787,6 +787,8 @@ function parse($TEXT, options) {
|
||||
return function() {
|
||||
var start = S.token;
|
||||
var expr = parser();
|
||||
if (!expr) croak("Expected expression");
|
||||
|
||||
var end = prev();
|
||||
expr.start = start;
|
||||
expr.end = end;
|
||||
|
||||
Reference in New Issue
Block a user