1 #ifndef CppTokenLexer_HPP
2 #define CppTokenLexer_HPP
3
4
5
6 #include <sngcpp/lexer/CppLexerApi.hpp>
7 #include <sngcpp/ast/SourceCodeWriter.hpp>
8 #include <soulng/lexer/Lexer.hpp>
9
10 class CppTokenLexer : public soulng::lexer::Lexer
11 {
12 public:
13 CppTokenLexer(const std::u32string& content_, const std::string& fileName_, int fileIndex_);
14 CppTokenLexer(const char32_t* start_, const char32_t* end_, const std::string& fileName_, int fileIndex_);
15 int NextState(int state, char32_t c) override;
16 bool inBlockComment;
17 sngcpp::ast::SourceCodeWriter* writer;
18 private:
19 int GetTokenId(int statementIndex);
20 };
21 #endif