Fix a spec
This commit is contained in:
parent
2894ad7447
commit
023a0c4f70
2 changed files with 3 additions and 5 deletions
|
|
@ -20,7 +20,7 @@ describe("arithmetic", []() {
|
|||
|
||||
it("parses products of variables", [&]() {
|
||||
TSDocumentSetText(document, "x*y");
|
||||
AssertThat(string(TSDocumentToString(document)), Equals("(expression (term (factor (number)) (factor (number)))"));
|
||||
AssertThat(string(TSDocumentToString(document)), Equals("(expression (term (factor (variable)) (3) (factor (variable))))"));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -9,15 +9,13 @@ using std::to_string;
|
|||
#define TS_DEBUG_LEX
|
||||
|
||||
#ifdef TS_DEBUG_LEX
|
||||
#define DEBUG_LEX(...) \
|
||||
fprintf(stderr, __VA_ARGS__)
|
||||
#define DEBUG_LEX(...) fprintf(stderr, __VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG_LEX(...)
|
||||
#endif
|
||||
|
||||
#ifdef TS_DEBUG_PARSE
|
||||
#define DEBUG_PARSE(...) \
|
||||
fprintf(stderr, __VA_ARGS__)
|
||||
#define DEBUG_PARSE(...) fprintf(stderr, __VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG_PARSE(...)
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue