Website Summary Files Commits Branches @commit @diff @stats
path: root / JSImpl / src / ASTInterpreter.h
diff options
context:
space:
mode:
1 files changed, 5 insertions, 5 deletions
-rw-r--r--JSImpl/src/ASTInterpreter.h10
diff --git a/JSImpl/src/ASTInterpreter.h b/JSImpl/src/ASTInterpreter.h
index 16aebfa..e8dae37 100644
--- a/JSImpl/src/ASTInterpreter.h
+++ b/JSImpl/src/ASTInterpreter.h
@@ -2,6 +2,8 @@
#include "ExpressionVisitor.h"
+#include <variant>
+
class ASTInterpreter : public ExpressionVisitor
{
public:
@@ -9,10 +11,8 @@ public:
~ASTInterpreter();
- // TODO: Changing this to a shared_ptr<Value> (or GC-enabled value*) will
- // allow for much simpler implementation of all varible assignments.
- typedef IPLSharedPtr<double> value_type;
- typedef IPLVector<value_type> ValueStack;
+ typedef IPLSharedPtr<double> ValuePtr;
+ typedef IPLVector<ValuePtr> ValueStack;
ValueStack Run(Expression* program);
@@ -39,7 +39,7 @@ public:
virtual void Visit(EmptyExpression* e) override;
virtual void Visit(CallExpression* e) override;
- value_type& ModifyVariable(const IPLString& name);
+ ValuePtr& ModifyVariable(const IPLString& name);
bool HasVariable(const IPLString& name);
class Printer