diff options
| author | Roland Reichwein <mail@reichwein.it> | 2020-10-24 19:29:28 +0200 | 
|---|---|---|
| committer | Roland Reichwein <mail@reichwein.it> | 2020-10-24 19:29:28 +0200 | 
| commit | addbdf3cf71c6d332bdf86a101a7df544fe5a9a2 (patch) | |
| tree | e67470f4d794326d3713cfb2b62666e3a7fe1ff0 | |
| parent | 1011655d2ef76a0c0aa29dbbff091dab139198e3 (diff) | |
Minor improvements
| -rw-r--r-- | cpp.cpp | 22 | ||||
| -rw-r--r-- | tests/test-cpp.cpp | 2 | ||||
| -rw-r--r-- | tests/test-minicc.cpp | 2 | 
3 files changed, 14 insertions, 12 deletions
| @@ -262,25 +262,25 @@ void CPP::link()  // phases of translation, according to standard  void CPP::compile(const std::string& code)  { - source_charset_map(); + source_charset_map(); // phase 1 - backslash_escape(); + backslash_escape(); // phase 2 - auto pp_tokens = preprocessing_tokenize(code); + auto pp_tokens = preprocessing_tokenize(code); // phase 3 - preprocess(); + preprocess(); // phase 4 - execution_charset_map(); + execution_charset_map(); // phase 5 - concatenate_strings(); + concatenate_strings(); // phase 6 - auto tokens = tokens_from_pptokens(pp_tokens); - m_nodes = analysis(tokens); - translate(); + auto tokens = tokens_from_pptokens(pp_tokens); // phase 7a + m_nodes = analysis(tokens); // phase 7b + translate(); // phase 7c - instantiate(); + instantiate(); // phase 8 - link(); + link(); // phase 9  }  std::vector<uint8_t> CPP::getCode() diff --git a/tests/test-cpp.cpp b/tests/test-cpp.cpp index 513a3a5..e5b2a1a 100644 --- a/tests/test-cpp.cpp +++ b/tests/test-cpp.cpp @@ -24,7 +24,7 @@ class CppTest: public ::testing::Test  {  protected:   CppTest() { -  debug = true; +  //debug = true;   }   ~CppTest() {   } diff --git a/tests/test-minicc.cpp b/tests/test-minicc.cpp index baf8b3f..4bb64c8 100644 --- a/tests/test-minicc.cpp +++ b/tests/test-minicc.cpp @@ -1,3 +1,5 @@ +// Main loop of test program +  #include "gmock/gmock.h"  #include "gtest/gtest.h" | 
