Add ability to edit multiple times between parses

This commit is contained in:
Max Brunsfeld 2015-09-18 23:20:06 -07:00
parent 6254f45c1b
commit f37f73f92f
13 changed files with 135 additions and 119 deletions

View file

@ -1,4 +1,5 @@
#include "runtime/runtime_spec_helper.h"
#include "runtime/helpers/tree_helpers.h"
extern "C" TSLanguage * ts_language_json();
@ -12,6 +13,8 @@ describe("Node", []() {
document = ts_document_make();
ts_document_set_language(document, ts_language_json());
ts_document_set_input_string(document, " [123, false, {\"x\": null}]");
ts_document_parse(document);
array_node = ts_document_root_node(document);
AssertThat(ts_node_string(array_node, document), Equals(
"(array "
@ -268,7 +271,3 @@ describe("Node", []() {
});
END_TEST
bool operator==(const TSNode &left, const TSNode &right) {
return ts_node_eq(left, right);
}