Fix specs after js grammar change
This commit is contained in:
parent
88e8cab7f9
commit
b6e2bed761
2 changed files with 10 additions and 12 deletions
|
|
@ -122,14 +122,7 @@ describe("compile_grammar", []() {
|
|||
"type": "SEQ",
|
||||
"members": [
|
||||
{"type": "STRING", "value": "("},
|
||||
|
||||
// Error recovery is controlled by wrapping rule subtrees
|
||||
// in an 'ERROR' rule.
|
||||
{
|
||||
"type": "ERROR",
|
||||
"content": {"type": "SYMBOL", "name": "expression"}
|
||||
},
|
||||
|
||||
{"type": "SYMBOL", "name": "expression"},
|
||||
{"type": "STRING", "value": ")"}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ describe("Parser", [&]() {
|
|||
set_text("fn()\n");
|
||||
|
||||
assert_root_node(
|
||||
"(program (expression_statement (function_call (identifier))))");
|
||||
"(program (expression_statement (function_call (identifier) (arguments))))");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -188,7 +188,10 @@ describe("Parser", [&]() {
|
|||
|
||||
assert_root_node(
|
||||
"(program (expression_statement (function_call "
|
||||
"(member_access (function_call (identifier)) (identifier)))))");
|
||||
"(member_access "
|
||||
"(function_call (identifier) (arguments)) "
|
||||
"(identifier)) "
|
||||
"(arguments))))");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -202,9 +205,11 @@ describe("Parser", [&]() {
|
|||
|
||||
assert_root_node(
|
||||
"(program (expression_statement (function_call "
|
||||
"(member_access (function_call (identifier)) "
|
||||
"(member_access "
|
||||
"(function_call (identifier) (arguments)) "
|
||||
"(comment) "
|
||||
"(identifier)))))");
|
||||
"(identifier)) "
|
||||
"(arguments))))");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue