Skip to content

Commit

Permalink
Minor Error Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SujalChoudhari committed Oct 10, 2023
1 parent 04c14a6 commit 352a979
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Runtime/Interpreter/Interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace Coda {
value.startPosition = astNode.startPosition;
value.endPosition = astNode.endPosition;

ValuePtr res;

switch (astNode.type) {
case Frontend::NodeType::IDENTIFIER:
Expand Down Expand Up @@ -55,12 +56,12 @@ namespace Coda {
case Frontend::NodeType::LIST_LITERAL:
return evaluateListExpression(astNode, env);
case Frontend::NodeType::CALL_EXPRESSION:
auto res = evaluateCallExpression(astNode, env);
res = evaluateCallExpression(astNode, env);
if (Error::Manager::isSafe())
Interpreter::callStack.pop();
return res;
case Frontend::NodeType::NATIVE_CALL_EXPRESSION:
auto res = evaluateNativeCallExpression(astNode, env);
res = evaluateNativeCallExpression(astNode, env);
if (Error::Manager::isSafe())
Interpreter::callStack.pop();
return res;
Expand All @@ -71,7 +72,7 @@ namespace Coda {
case Frontend::NodeType::BINARY_EXPRESSION:
return evaluateBinaryExpression(astNode, env);
case Frontend::NodeType::MEMBER_EXPRESSION:
auto res = evaluateMemberExpression(astNode, env);
res = evaluateMemberExpression(astNode, env);
if (Error::Manager::isSafe())
Interpreter::callStack.pop();
return res;
Expand Down

0 comments on commit 352a979

Please sign in to comment.