Initial layout for binder
This commit is contained in:
16
src/Parser/ParsedStatements/ParsedScriptStatement.hpp
Normal file
16
src/Parser/ParsedStatements/ParsedScriptStatement.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
#ifndef PORYGONLANG_PARSEDSCRIPTSTATEMENT_HPP
|
||||
#define PORYGONLANG_PARSEDSCRIPTSTATEMENT_HPP
|
||||
|
||||
#include "ParsedStatement.hpp"
|
||||
|
||||
class ParsedScriptStatement : public ParsedBlockStatement{
|
||||
public:
|
||||
explicit ParsedScriptStatement(vector<ParsedStatement*> statements) : ParsedBlockStatement(move(statements)){}
|
||||
|
||||
ParsedStatementKind GetKind() final{
|
||||
return ParsedStatementKind ::Script;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //PORYGONLANG_PARSEDSCRIPTSTATEMENT_HPP
|
||||
@@ -1,5 +1,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
#ifndef PORYGONLANG_PARSEDSTATEMENT_HPP
|
||||
#define PORYGONLANG_PARSEDSTATEMENT_HPP
|
||||
@@ -49,15 +51,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class ParsedScriptStatement : public ParsedBlockStatement{
|
||||
public:
|
||||
explicit ParsedScriptStatement(std::vector<ParsedStatement*> statements) : ParsedBlockStatement(statements){}
|
||||
|
||||
ParsedStatementKind GetKind() final{
|
||||
return ParsedStatementKind ::Script;
|
||||
}
|
||||
};
|
||||
|
||||
class ParsedExpressionStatement : public ParsedStatement{
|
||||
ParsedExpression* _expression;
|
||||
public:
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Parser.hpp"
|
||||
#include "UnaryOperatorKind.hpp"
|
||||
#include "BinaryOperatorKind.hpp"
|
||||
#include "ParsedScriptStatement.hpp"
|
||||
|
||||
|
||||
ParsedScriptStatement* Parser::Parse() {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "ParsedStatements/ParsedStatement.hpp"
|
||||
#include "../Script.hpp"
|
||||
#include "ParsedScriptStatement.hpp"
|
||||
|
||||
enum class OperatorPrecedence {
|
||||
No,
|
||||
|
||||
Reference in New Issue
Block a user