From b97f6b86b85553acd3863ee18a67b8868e0ea7b4 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 25 Jan 2020 13:31:51 +0100 Subject: Refactor, fix missing files --- test-lexer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test-lexer.cpp') 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[]) { -- cgit v1.2.3