Cleaned up
This commit is contained in:
@@ -208,18 +208,18 @@ shared_ptr<Statement> Parser::matchStatementVariable() {
|
|||||||
Parsee::tokenParsee(TokenKind::LEFT_ARROW, true, false),
|
Parsee::tokenParsee(TokenKind::LEFT_ARROW, true, false),
|
||||||
Parsee::expressionParsee(true)
|
Parsee::expressionParsee(true)
|
||||||
},
|
},
|
||||||
{ }
|
{}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (resultsGroup.getKind() != ParseeResultsGroupKind::SUCCESS)
|
if (resultsGroup.getKind() != ParseeResultsGroupKind::SUCCESS)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
string name = resultsGroup.getResults().at(0).getToken()->getLexme();
|
string identifier = resultsGroup.getResults().at(0).getToken()->getLexme();
|
||||||
shared_ptr<ValueType> valueType = resultsGroup.getResults().at(1).getValueType();
|
shared_ptr<ValueType> valueType = resultsGroup.getResults().at(1).getValueType();
|
||||||
shared_ptr<Expression> expression = resultsGroup.getResults().at(2).getExpression();
|
shared_ptr<Expression> expression = resultsGroup.getResults().at(2).getExpression();
|
||||||
|
|
||||||
return make_shared<StatementVariable>(name, valueType, expression);
|
return make_shared<StatementVariable>(identifier, valueType, expression);
|
||||||
}
|
}
|
||||||
|
|
||||||
shared_ptr<Statement> Parser::matchStatementFunction() {
|
shared_ptr<Statement> Parser::matchStatementFunction() {
|
||||||
|
|||||||
Reference in New Issue
Block a user