| 146 | }; |
| 147 | |
| 148 | class Token{ |
| 149 | public: |
| 150 | TokenType type; |
| 151 | std::string value = ""; |
| 152 | int lineNum; |
| 153 | int linePos; |
| 154 | |
| 155 | Token(){} |
| 156 | |
| 157 | Token(int ln, int pos, TokenType type){ |
| 158 | lineNum = ln; |
| 159 | linePos = pos; |
| 160 | |
| 161 | this->type = type; |
| 162 | } |
| 163 | |
| 164 | Token(int ln, int pos, TokenType type, std::string& text) : value(text) { |
| 165 | lineNum = ln; |
| 166 | linePos = pos; |
| 167 | |
| 168 | this->type = type; |
| 169 | } |
| 170 | }; |
| 171 | |
| 172 | enum { |
| 173 | ParserStateInvalid, |