diff --git a/include/bolt/CST.hpp b/include/bolt/CST.hpp index 0b2efc6b0..8f3582a79 100644 --- a/include/bolt/CST.hpp +++ b/include/bolt/CST.hpp @@ -900,7 +900,7 @@ namespace bolt { }; - using Value = std::variant; + using LiteralValue = std::variant; class Literal : public Token { public: @@ -908,7 +908,7 @@ namespace bolt { inline Literal(NodeKind Kind, TextLoc StartLoc): Token(Kind, StartLoc) {} - virtual Value getValue() = 0; + virtual LiteralValue getValue() = 0; static bool classof(const Node* N) { return N->getKind() == NodeKind::StringLiteral @@ -927,7 +927,7 @@ namespace bolt { std::string getText() const override; - Value getValue() override; + LiteralValue getValue() override; static bool classof(const Node* N) { return N->getKind() == NodeKind::StringLiteral; @@ -949,7 +949,7 @@ namespace bolt { return V; } - Value getValue() override; + LiteralValue getValue() override; static bool classof(const Node* N) { return N->getKind() == NodeKind::IntegerLiteral; diff --git a/src/CST.cc b/src/CST.cc index 87e8950a5..2d223ed31 100644 --- a/src/CST.cc +++ b/src/CST.cc @@ -953,11 +953,11 @@ namespace bolt { return Text; } - Value StringLiteral::getValue() { + LiteralValue StringLiteral::getValue() { return Text; } - Value IntegerLiteral::getValue() { + LiteralValue IntegerLiteral::getValue() { return V; }