39 lines
1.5 KiB
C++
39 lines
1.5 KiB
C++
|
|
#ifndef PORYGONLANG_BINDER_HPP
|
|
#define PORYGONLANG_BINDER_HPP
|
|
#include "../Parser/ParsedStatements/ParsedStatement.hpp"
|
|
#include "BoundStatements/BoundStatement.hpp"
|
|
#include "../Script.hpp"
|
|
#include "BoundVariables/BoundScope.hpp"
|
|
using namespace std;
|
|
|
|
class Binder {
|
|
Script* _scriptData;
|
|
BoundScope* _scope;
|
|
shared_ptr<FunctionScriptType> _currentFunction;
|
|
|
|
~Binder();
|
|
|
|
BoundStatement *BindStatement(ParsedStatement *statement);
|
|
BoundStatement *BindBlockStatement(ParsedStatement *statement);
|
|
BoundStatement *BindExpressionStatement(ParsedStatement *statement);
|
|
BoundStatement *BindAssignmentStatement(ParsedStatement *statement);
|
|
BoundStatement *BindFunctionDeclarationStatement(ParsedStatement * statement);
|
|
BoundStatement *BindReturnStatement(ParsedStatement *statement);
|
|
BoundStatement *BindConditionalStatement(ParsedStatement *statement);
|
|
|
|
BoundExpression *BindExpression(ParsedExpression *expression);
|
|
BoundExpression *BindVariableExpression(VariableExpression *expression);
|
|
BoundExpression *BindBinaryOperator(BinaryExpression *expression);
|
|
BoundExpression *BindUnaryOperator(UnaryExpression *expression);
|
|
BoundExpression *BindFunctionCall(FunctionCallExpression *expression);
|
|
BoundExpression *BindIndexExpression(IndexExpression *expression);
|
|
BoundExpression *BindNumericalTableExpression(ParsedNumericalTableExpression *expression);
|
|
public:
|
|
static BoundScriptStatement* Bind(Script* script, ParsedScriptStatement* s, BoundScope* scriptScope);
|
|
|
|
};
|
|
|
|
|
|
#endif //PORYGONLANG_BINDER_HPP
|