Actually parse int expression from the string
This commit is contained in:
parent
316c3aece6
commit
74a3914fdf
@ -25,7 +25,7 @@ namespace parsing {
|
||||
if (token.type == token::Type::LiteralInt) {
|
||||
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 };
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user