Skip to content

Commit

Permalink
Everythings working now
Browse files Browse the repository at this point in the history
Accidentaly deleted some needed code earlier

Variable references weren't working, they are now
  • Loading branch information
RdStudios9145 committed Jan 25, 2025
1 parent 284aa93 commit 19c2e63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ast/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ std::optional<std::unique_ptr<ExprAST>> Parser::parseIdentifierExpr() {
std::string identifierString = current->lexeme;
current++;

// if (current->type != TokenType::LEFT_PAREN) // Simple variable ref.
// return std::make_unique<VariableExprAST>(identifierString);
if (current->type != TokenType::LEFT_PAREN) // Simple variable ref.
return std::make_unique<VariableExprAST>(identifierString);

// Call.
std::vector<std::unique_ptr<ExprAST>> Args;
Expand Down

0 comments on commit 19c2e63

Please sign in to comment.