Skip whitespace by default in lexer
This commit is contained in:
parent
19804367b3
commit
49ad910474
4 changed files with 14 additions and 8 deletions
|
|
@ -27,10 +27,10 @@ describe("json", []() {
|
|||
TSDocumentSetText(document, "{}");
|
||||
AssertThat(string(TSDocumentToString(document)), Equals("(value (object))"));
|
||||
|
||||
TSDocumentSetText(document, "{\"key1\":1}");
|
||||
TSDocumentSetText(document, "{ \"key1\": 1 }");
|
||||
AssertThat(string(TSDocumentToString(document)), Equals("(value (object (string) (value (number))))"));
|
||||
|
||||
TSDocumentSetText(document, "{\"key1\":1,\"key2\":2}");
|
||||
TSDocumentSetText(document, "{\"key1\": 1, \"key2\": 2 }");
|
||||
AssertThat(string(TSDocumentToString(document)), Equals("(value (object (string) (value (number)) (string) (value (number))))"));
|
||||
});
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ describe("json", []() {
|
|||
TSDocumentSetText(document, "[5]");
|
||||
AssertThat(string(TSDocumentToString(document)), Equals("(value (array (value (number))))"));
|
||||
|
||||
TSDocumentSetText(document, "[1,2,3]");
|
||||
TSDocumentSetText(document, "[1, 2, 3]");
|
||||
AssertThat(string(TSDocumentToString(document)), Equals("(value (array (value (number)) (value (number)) (value (number))))"));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue