Start using the forward move to recover from errors
Some unit tests passing. Corpus tests still failing
This commit is contained in:
parent
b733b0cc81
commit
aef7582a2a
8 changed files with 295 additions and 113 deletions
|
|
@ -191,6 +191,19 @@ describe("Stack", [&]() {
|
|||
|
||||
free_pop_results(&results);
|
||||
});
|
||||
|
||||
it("stops immediately when removing an error", [&]() {
|
||||
trees[2]->symbol = ts_builtin_sym_error;
|
||||
|
||||
StackPopResultArray results = ts_stack_pop(stack, 0, 2, false);
|
||||
AssertThat(results.size, Equals<size_t>(1));
|
||||
|
||||
StackPopResult result = results.contents[0];
|
||||
AssertThat(result.trees, Equals(vector<TSTree *>({ trees[2] })));
|
||||
AssertThat(ts_stack_top_state(stack, 0), Equals(stateB));
|
||||
|
||||
free_pop_results(&results);
|
||||
});
|
||||
});
|
||||
|
||||
describe("splitting the stack", [&]() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue