fix labeled loops, do-while, shorthand property syntax, and added more tests
This commit is contained in:
7
parse.cm
7
parse.cm
@@ -426,7 +426,12 @@ var parse = function(tokens, src, filename, tokenizer) {
|
||||
function_nr = function_nr + 1
|
||||
ast_node_end(fn)
|
||||
pair.right = fn
|
||||
} else if (!(is_ident && (tok.kind == "," || tok.kind == "}"))) {
|
||||
} else if (is_ident && (tok.kind == "," || tok.kind == "}")) {
|
||||
right = ast_node("name", pair.left)
|
||||
right.name = pair.left.name
|
||||
ast_node_end(right)
|
||||
pair.right = right
|
||||
} else {
|
||||
parse_error(tok, "expected ':' after property name")
|
||||
}
|
||||
push(list, pair)
|
||||
|
||||
Reference in New Issue
Block a user