fix regex parser error
This commit is contained in:
6
parse.cm
6
parse.cm
@@ -357,7 +357,11 @@ var parse = function(tokens, src, filename) {
|
||||
}
|
||||
node.pattern = pattern_str
|
||||
if (length(flags) > 0) node.flags = flags
|
||||
advance()
|
||||
// Skip all tokens consumed by the regex re-scan
|
||||
while (true) {
|
||||
advance()
|
||||
if (tok.kind == "eof" || tok.at >= rpos) break
|
||||
}
|
||||
ast_node_end(node)
|
||||
return node
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user