Change repeat to mean zero-or-more in lexical rules
Still need to make it work this way in syntactic rules
This commit is contained in:
parent
70173512f1
commit
7490a7ac94
3 changed files with 10 additions and 2 deletions
|
|
@ -14,6 +14,12 @@ describe("json", []() {
|
|||
});
|
||||
|
||||
it("parses strings", [&]() {
|
||||
TSDocumentSetText(document, "\"\"");
|
||||
AssertThat(string(TSDocumentToString(document)), Equals("(value (string))"));
|
||||
|
||||
TSDocumentSetText(document, "\"simple-string\"");
|
||||
AssertThat(string(TSDocumentToString(document)), Equals("(value (string))"));
|
||||
|
||||
TSDocumentSetText(document, "\"this is a \\\"string\\\" within a string\"");
|
||||
AssertThat(string(TSDocumentToString(document)), Equals("(value (string))"));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue