This commit is contained in:
@@ -72,7 +72,7 @@ namespace Porygon::Parser {
|
||||
return ParsedExpressionKind::LiteralInteger;
|
||||
}
|
||||
|
||||
explicit LiteralIntegerExpression(IntegerToken *token)
|
||||
explicit LiteralIntegerExpression(const IntegerToken *token)
|
||||
: ParsedExpression(token->GetStartPosition(), token->GetLength()),
|
||||
_value(token->GetValue()) {
|
||||
}
|
||||
@@ -89,7 +89,7 @@ namespace Porygon::Parser {
|
||||
return ParsedExpressionKind::LiteralFloat;
|
||||
}
|
||||
|
||||
explicit LiteralFloatExpression(FloatToken *token)
|
||||
explicit LiteralFloatExpression(const FloatToken *token)
|
||||
: ParsedExpression(token->GetStartPosition(), token->GetLength()),
|
||||
_value(token->GetValue()) {
|
||||
}
|
||||
@@ -106,7 +106,7 @@ namespace Porygon::Parser {
|
||||
return ParsedExpressionKind::LiteralString;
|
||||
}
|
||||
|
||||
explicit LiteralStringExpression(StringToken *token)
|
||||
explicit LiteralStringExpression(const StringToken *token)
|
||||
: ParsedExpression(token->GetStartPosition(), token->GetLength()),
|
||||
_value(std::move(token->GetValue())) {
|
||||
}
|
||||
@@ -140,7 +140,7 @@ namespace Porygon::Parser {
|
||||
return ParsedExpressionKind::Variable;
|
||||
}
|
||||
|
||||
explicit VariableExpression(IdentifierToken *token) : ParsedExpression(token->GetStartPosition(),
|
||||
explicit VariableExpression(const IdentifierToken *token) : ParsedExpression(token->GetStartPosition(),
|
||||
token->GetLength()),
|
||||
_value(HashedString(token->GetValue())) {
|
||||
}
|
||||
@@ -314,12 +314,11 @@ namespace Porygon::Parser {
|
||||
|
||||
|
||||
class ParsedNumericalTableExpression : public ParsedExpression {
|
||||
vector<const ParsedExpression *> _expressions;
|
||||
const vector<const ParsedExpression *> _expressions;
|
||||
public:
|
||||
ParsedNumericalTableExpression(vector<const ParsedExpression *> expressions, unsigned int start,
|
||||
unsigned int length)
|
||||
: ParsedExpression(start, length) {
|
||||
_expressions = std::move(expressions);
|
||||
: ParsedExpression(start, length), _expressions(std::move(expressions)) {
|
||||
}
|
||||
|
||||
~ParsedNumericalTableExpression() final {
|
||||
|
||||
Reference in New Issue
Block a user