diff options
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[]) { |