Start work toward maintaining external scanner's state during incremental parses

This commit is contained in:
Max Brunsfeld 2016-12-20 17:06:20 -08:00
parent 2b3da512a4
commit e6c82ead2c
9 changed files with 131 additions and 70 deletions

View file

@ -5,6 +5,7 @@
#include "helpers/tree_helpers.h"
#include "helpers/point_helpers.h"
#include "helpers/spy_logger.h"
#include "helpers/stderr_logger.h"
#include "helpers/spy_input.h"
#include "helpers/load_language.h"
@ -112,7 +113,7 @@ describe("Document", [&]() {
assert_node_string_equals(
new_root,
"(object (pair (string) (array (null) (number))))");
AssertThat(spy_input->strings_read, Equals(vector<string>({" [null, 2"})));
AssertThat(spy_input->strings_read, Equals(vector<string>({" [null, 2", ""})));
});
it("reads from the new input correctly when the old input was blank", [&]() {