diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-01-25 13:31:51 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-01-25 13:31:51 +0100 |
commit | b97f6b86b85553acd3863ee18a67b8868e0ea7b4 (patch) | |
tree | c20238f4cf70b735c488e5619d11a85da49b1bd3 /test-lexer.cpp | |
parent | c984c05f2f2d6c9cee4a0eb561fd7184786c5d1d (diff) |
Refactor, fix missing files
Diffstat (limited to 'test-lexer.cpp')
-rw-r--r-- | test-lexer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test-lexer.cpp b/test-lexer.cpp index 71f787a..e85fc5c 100644 --- a/test-lexer.cpp +++ b/test-lexer.cpp @@ -1,4 +1,5 @@ #include "bnf.h" +#include "cpp.h" #include "lexer.h" #include "grammer.h" #include "minicc.h" @@ -84,16 +85,19 @@ TEST_F(Test, BNF) { ASSERT_EQ(tokens, tokens_reference); #if 1 + std::cout << "=== Tokens =================================" << std::endl; for (const auto& i: tokens) { std::cout << i.type << ": " << i.value << std::endl; } #endif - Lex::Lexer::PreprocessorTokensToTokens(tokens); + CPP::PreprocessorTokensToTokens(tokens); Gram::Compiler compiler(bnf, Top); auto Tree = compiler.compile(tokens); ASSERT_TRUE(Tree.Valid(Top)); + + Tree.Dump(); } int main(int argc, char* argv[]) { |