Add if statement

Signed-off-by: CHatingPython <chatingpython@gmail.com>
This commit is contained in:
CHatingPython
2026-05-31 17:29:17 +02:00
committed by CHatingPython
parent 646d185d40
commit 91ef7f01a4
12 changed files with 170 additions and 44 deletions
+2
View File
@@ -90,6 +90,8 @@ token_handle<> lexer::next_token() {
static std::unordered_map<std::string_view, keyword_token> s_keywords = {
{ "func", keyword_token::Func },
{ "return", keyword_token::Return },
{ "if", keyword_token::If },
{ "else", keyword_token::Else },
};
if (auto it = s_keywords.find(value); it != s_keywords.end()) return { location, it->second, value };