Make Lexer use constant Tokens
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -73,7 +73,7 @@ public:
|
||||
}
|
||||
explicit LiteralIntegerExpression(IntegerToken* token)
|
||||
: ParsedExpression(token -> GetStartPosition(), token -> GetLength()),
|
||||
_value(token -> Value)
|
||||
_value(token -> GetValue())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
}
|
||||
explicit LiteralFloatExpression(FloatToken* token)
|
||||
: ParsedExpression(token -> GetStartPosition(), token -> GetLength()),
|
||||
_value(token -> Value)
|
||||
_value(token -> GetValue())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
}
|
||||
explicit LiteralStringExpression(StringToken* token)
|
||||
: ParsedExpression(token -> GetStartPosition(), token -> GetLength()),
|
||||
_value(std::move(token -> Value))
|
||||
_value(std::move(token -> GetValue()))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
const ParsedExpressionKind GetKind() const final{
|
||||
return ParsedExpressionKind::LiteralBool;
|
||||
}
|
||||
explicit LiteralBoolExpression(IToken* token)
|
||||
explicit LiteralBoolExpression(const IToken* token)
|
||||
: ParsedExpression(token -> GetStartPosition(), token -> GetLength()),
|
||||
_value(token -> GetKind() == TokenKind::TrueKeyword)
|
||||
{
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
return ParsedExpressionKind::Variable;
|
||||
}
|
||||
explicit VariableExpression(IdentifierToken* token) : ParsedExpression(token -> GetStartPosition(), token -> GetLength())
|
||||
, _value(HashedString(token -> Value))
|
||||
, _value(HashedString(token -> GetValue()))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user