summaryrefslogtreecommitdiffhomepage
path: root/cpp.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-03-01 22:34:35 +0100
committerRoland Reichwein <mail@reichwein.it>2020-03-01 22:34:35 +0100
commit6fcfe0a5cf8f53658e50e346076768eec229e695 (patch)
tree69d9ce555c3a671e2d3c0dfe46834d6fcb183753 /cpp.cpp
parent10c2b7f9b6676dafd62d0eeda507b5ee5c6db216 (diff)
Vector invalidation fix
Diffstat (limited to 'cpp.cpp')
-rw-r--r--cpp.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp.cpp b/cpp.cpp
index f02b047..fc614be 100644
--- a/cpp.cpp
+++ b/cpp.cpp
@@ -82,6 +82,7 @@ std::pair<index_t, std::vector<TreeNode>> CPP::preprocessing_tokenize(const std:
{" "}, {"\t"}, {"\n"}, {"\r"}
};
Gram::Compiler compiler(bnf, "file");
+ debug = true;
std::pair<index_t, std::vector<TreeNode>> Tree = compiler.compile(m_charTokens);
debug = true;
@@ -246,12 +247,21 @@ protected:
}
};
+#if 0
TEST_F(CppTest, preprocessing_tokenize) {
CPP cpp;
auto ppTree = cpp.preprocessing_tokenize("int main() { return 1; }");
cpp.tokens_from_pptokens(ppTree);
}
+#endif
+
+TEST_F(CppTest, preprocessing_tokenize2) {
+ CPP cpp;
+ auto ppTree = cpp.preprocessing_tokenize("in ma");
+
+ cpp.tokens_from_pptokens(ppTree);
+}
#if 0
TEST(Cpp, translate) {