Parse and bind strings

This commit is contained in:
2019-05-22 13:29:35 +02:00
parent 6eb005ab3f
commit 57cd3efec9
4 changed files with 32 additions and 1 deletions

View File

@@ -83,6 +83,21 @@ public:
}
};
class LiteralStringExpression : public ParsedExpression{
string _value;
public:
ParsedExpressionKind GetKind() final{
return ParsedExpressionKind::LiteralString;
}
explicit LiteralStringExpression(StringToken* token) : ParsedExpression(token -> GetStartPosition(), token -> GetLength()){
_value = std::move(token->Value);
}
string GetValue(){
return _value;
}
};
class LiteralBoolExpression : public ParsedExpression{
bool _value;
public: