summaryrefslogtreecommitdiff
path: root/src/token.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/token.cc')
-rw-r--r--src/token.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/token.cc b/src/token.cc
index 657d37be..cb1a19df 100644
--- a/src/token.cc
+++ b/src/token.cc
@@ -52,7 +52,7 @@ Token::Token(Location loc, TokenType token_type, Type type)
Construct(type_, type);
}
-Token::Token(Location loc, TokenType token_type, string_view text)
+Token::Token(Location loc, TokenType token_type, std::string_view text)
: loc(loc), token_type_(token_type) {
assert(HasText());
Construct(text_, text);
@@ -74,11 +74,11 @@ std::string Token::to_string() const {
if (IsTokenTypeBare(token_type_)) {
return GetTokenTypeName(token_type_);
} else if (HasLiteral()) {
- return literal_.text.to_string();
+ return std::string(literal_.text);
} else if (HasOpcode()) {
return opcode_.GetName();
} else if (HasText()) {
- return text_.to_string();
+ return std::string(text_);
} else if (IsTokenTypeRefKind(token_type_)) {
return type_.GetRefKindName();
} else {