Fix a spec

This commit is contained in:
Max Brunsfeld 2014-01-11 13:41:31 -08:00
parent 2894ad7447
commit 023a0c4f70
2 changed files with 3 additions and 5 deletions

View file

@ -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))))"));
});
});

View file

@ -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