Actually parse int expression from the string

This commit is contained in:
Sofia 2026-04-02 16:18:22 +03:00
parent 316c3aece6
commit 74a3914fdf

View File

@ -25,7 +25,7 @@ namespace parsing {
if (token.type == token::Type::LiteralInt) { if (token.type == token::Type::LiteralInt) {
stream.m_position = inner.m_position; stream.m_position = inner.m_position;
auto expr = new AST::IntLiteralExpression{ 5 }; auto expr = new AST::IntLiteralExpression{ std::stoi(token.content) };
return new std::unique_ptr<AST::Expression>{ expr }; return new std::unique_ptr<AST::Expression>{ expr };
} }
else { else {