Rework evaluation to use shared pointers, fix bugs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include "Parser.hpp"
|
||||
#include "ParsedStatements/ParsedStatement.hpp"
|
||||
#include "UnaryOperatorKind.hpp"
|
||||
@@ -65,7 +66,7 @@ ParsedStatement *Parser::ParseAssignment(IToken *current) {
|
||||
return new ParsedAssignmentStatement(isLocal, ((IdentifierToken*)identifier) -> Value, expression, start, expression->GetEndPosition() - start);
|
||||
}
|
||||
|
||||
ParsedStatement *Parser::ParseBlock(vector<TokenKind> endTokens) {
|
||||
ParsedStatement *Parser::ParseBlock(const vector<TokenKind>& endTokens) {
|
||||
vector<ParsedStatement*> statements;
|
||||
while (true){
|
||||
auto next = this -> Next();
|
||||
|
||||
Reference in New Issue
Block a user