Implements assignment binding

This commit is contained in:
2019-05-28 17:49:03 +02:00
parent dbd7dfdd73
commit 5d1c3ac9ba
20 changed files with 443 additions and 152 deletions

View File

@@ -4,20 +4,25 @@
#include "../Parser/ParsedStatements/ParsedStatement.hpp"
#include "BoundStatements/BoundStatement.hpp"
#include "../Script.hpp"
#include "BoundVariables/BoundScope.hpp"
class Binder {
Script* ScriptData;
Script* _scriptData;
BoundScope* _scope;
~Binder();
BoundStatement *BindStatement(ParsedStatement *statement);
BoundStatement *BindBlockStatement(ParsedStatement *statement);
BoundStatement *BindExpressionStatement(ParsedStatement *statement);
BoundStatement *BindAssignmentStatement(ParsedStatement *statement);
BoundExpression *BindExpression(ParsedExpression *expression);
BoundExpression *BindBinaryOperator(BinaryExpression *expression);
BoundExpression *BindUnaryOperator(UnaryExpression *expression);
public:
static BoundScriptStatement* Bind(Script* script, ParsedScriptStatement* s);
static BoundScriptStatement* Bind(Script* script, ParsedScriptStatement* s, BoundScope* scriptScope);
};