2019-05-21 16:09:08 +00:00
|
|
|
|
|
|
|
#ifndef PORYGONLANG_BINDER_HPP
|
|
|
|
#define PORYGONLANG_BINDER_HPP
|
2019-05-21 18:59:26 +00:00
|
|
|
#include "../Parser/ParsedStatements/ParsedStatement.hpp"
|
2019-05-21 16:09:08 +00:00
|
|
|
#include "BoundStatements/BoundStatement.hpp"
|
2019-05-22 10:22:52 +00:00
|
|
|
#include "../Script.hpp"
|
2019-05-28 15:49:03 +00:00
|
|
|
#include "BoundVariables/BoundScope.hpp"
|
2019-05-21 16:09:08 +00:00
|
|
|
|
2019-05-21 18:59:26 +00:00
|
|
|
|
2019-05-21 16:09:08 +00:00
|
|
|
class Binder {
|
2019-05-28 15:49:03 +00:00
|
|
|
Script* _scriptData;
|
|
|
|
BoundScope* _scope;
|
|
|
|
|
|
|
|
~Binder();
|
2019-05-22 10:22:52 +00:00
|
|
|
|
2019-05-21 18:59:26 +00:00
|
|
|
BoundStatement *BindStatement(ParsedStatement *statement);
|
|
|
|
BoundStatement *BindBlockStatement(ParsedStatement *statement);
|
2019-05-21 20:15:51 +00:00
|
|
|
BoundStatement *BindExpressionStatement(ParsedStatement *statement);
|
2019-05-28 15:49:03 +00:00
|
|
|
BoundStatement *BindAssignmentStatement(ParsedStatement *statement);
|
2019-05-21 18:59:26 +00:00
|
|
|
|
|
|
|
BoundExpression *BindExpression(ParsedExpression *expression);
|
2019-05-21 20:15:51 +00:00
|
|
|
BoundExpression *BindBinaryOperator(BinaryExpression *expression);
|
2019-05-22 10:22:52 +00:00
|
|
|
BoundExpression *BindUnaryOperator(UnaryExpression *expression);
|
2019-05-21 20:15:51 +00:00
|
|
|
public:
|
2019-05-28 15:49:03 +00:00
|
|
|
static BoundScriptStatement* Bind(Script* script, ParsedScriptStatement* s, BoundScope* scriptScope);
|
2019-05-21 18:59:26 +00:00
|
|
|
|
2019-05-21 16:09:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif //PORYGONLANG_BINDER_HPP
|