Handle nil keyword
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-09-01 16:16:36 +02:00
parent a3e77f650a
commit cf1daf7805
5 changed files with 32 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
#include "EvaluationScope/EvaluationScope.hpp"
#include "EvalValues/ScriptFunctionEvalValue.hpp"
#include "EvalValues/TableEvalValue.hpp"
#include "EvalValues/NilEvalValue.hpp"
#include "../Binder/BoundExpressions/BoundTableExpression.hpp"
#include "../Binder/BoundExpressions/BoundFunctionCallExpression.hpp"
#include "../Binder/BoundExpressions/BoundRequireExpression.hpp"
@@ -239,6 +240,8 @@ namespace Porygon::Evaluation {
return new StringEvalValue(*((BoundLiteralStringExpression *) expression)->GetValue());
case BoundExpressionKind::LiteralBool:
return new BooleanEvalValue(((BoundLiteralBoolExpression *) expression)->GetValue());
case BoundExpressionKind::Nil:
return new NilEvalValue();
case BoundExpressionKind::Variable:
return this -> GetVariable((BoundVariableExpression*)expression);
case BoundExpressionKind::Unary: