diff options
Diffstat (limited to 'lexer.cpp')
-rw-r--r-- | lexer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -292,3 +292,11 @@ std::vector<Token> Lexer::Lex(const std::string& s) return result; } +// C++: Preprocessor Tokens To Tokens +void Lexer::PreprocessorTokensToTokens(std::vector<Token>& tokens) +{ + for (auto& i : tokens) { + if (i.type == "preprocessing-op-or-punc") + i.type = i.value; + } +} |