Basic lexer

This commit is contained in:
CHatingPython
2026-05-24 14:57:57 +02:00
commit 28f6deaba5
12 changed files with 458 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#include "furc/front/lexer.hpp"
#include <iostream>
int main(void) {
furc::front::lexer lexer("<TEMP>", "func main() {\n return 0;\n}");
furc::front::token token = {};
while (!furc::front::is_token_type_empty((token = lexer.next_token()).type)) {
std::cout << token << '\n';
}
if (token.type == furc::front::token_t::Error) std::cout << token << '\n';
return 0;
}