Collapse nodes with only one child and no additional text content
This commit is contained in:
parent
316adc7788
commit
09e28e7859
8 changed files with 56 additions and 80 deletions
|
|
@ -24,12 +24,7 @@ describe("incremental parsing", [&]() {
|
|||
|
||||
it("parses the input", [&]() {
|
||||
AssertThat(string(ts_document_string(doc)), Equals(
|
||||
"(value "
|
||||
"(object "
|
||||
"(string) "
|
||||
"(value (array "
|
||||
"(value (number)) "
|
||||
"(value (number))))))"));
|
||||
"(value (object (string) (array (number) (number))))"));
|
||||
});
|
||||
|
||||
it("reads the entire input", [&]() {
|
||||
|
|
@ -53,15 +48,7 @@ describe("incremental parsing", [&]() {
|
|||
|
||||
it("updates the parse tree", [&]() {
|
||||
AssertThat(string(ts_document_string(doc)), Equals(
|
||||
"(value "
|
||||
"(object "
|
||||
"(string) "
|
||||
"(value (array "
|
||||
"(value (number)) "
|
||||
"(value (number)))) "
|
||||
"(string) "
|
||||
"(value (number))))"
|
||||
));
|
||||
"(value (object (string) (array (number) (number)) (string) (number)))"));
|
||||
});
|
||||
|
||||
it("re-reads only the changed portion of the input", [&]() {
|
||||
|
|
@ -85,15 +72,7 @@ describe("incremental parsing", [&]() {
|
|||
|
||||
it("2 updates the parse tree", [&]() {
|
||||
AssertThat(string(ts_document_string(doc)), Equals(
|
||||
"(value "
|
||||
"(object "
|
||||
"(string) "
|
||||
"(value (number)) "
|
||||
"(string) "
|
||||
"(value (array "
|
||||
"(value (number)) "
|
||||
"(value (number))))))"
|
||||
));
|
||||
"(value (object (string) (number) (string) (array (number) (number))))"));
|
||||
});
|
||||
|
||||
it_skip("re-reads only the changed portion of the input", [&]() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue