Add integers to lexer

Signed-off-by: CHatingPython <chatingpython@gmail.com>
This commit is contained in:
CHatingPython
2026-05-26 08:52:35 +02:00
committed by CHatingPython
parent cbb2efc187
commit ad84bc50bd
8 changed files with 121 additions and 60 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ TEST(Parser, EmptyFunctions) {
EXPECT_TRUE(first.present());
EXPECT_EQ(first->declaration_type(), declaration_node_t::FunctionDefinition);
node_handle<function_definition_node> funcDef = first;
EXPECT_EQ(funcDef->name().value, "main");
EXPECT_EQ(funcDef->name()->string, "main");
EXPECT_EQ(funcDef->body()->statements.size(), 0);
}
{
@@ -26,7 +26,7 @@ TEST(Parser, EmptyFunctions) {
EXPECT_TRUE(second.present());
EXPECT_EQ(second->declaration_type(), declaration_node_t::FunctionDeclaration);
node_handle<function_declarartion_node> funcDecl = second;
EXPECT_EQ(funcDecl->name().value, "foo");
EXPECT_EQ(funcDecl->name()->string, "foo");
}
}