summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCpp/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibCpp/Parser.cpp')
-rw-r--r--Userland/Libraries/LibCpp/Parser.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibCpp/Parser.cpp b/Userland/Libraries/LibCpp/Parser.cpp
index b6a2a6ffa7..9976c73ac7 100644
--- a/Userland/Libraries/LibCpp/Parser.cpp
+++ b/Userland/Libraries/LibCpp/Parser.cpp
@@ -11,7 +11,7 @@
#include <AK/ScopeLogger.h>
#include <LibCpp/Lexer.h>
-#define LOG_SCOPE() ScopeLogger<CPP_DEBUG> logger(DeprecatedString::formatted("'{}' - {} ({})", peek().text(), peek().type_as_string(), m_state.token_index))
+#define LOG_SCOPE() ScopeLogger<CPP_DEBUG> logger(DeprecatedString::formatted("'{}' - {} ({})", peek().text(), peek().type_as_deprecated_string(), m_state.token_index))
namespace Cpp {
@@ -22,7 +22,7 @@ Parser::Parser(Vector<Token> tokens, DeprecatedString const& filename)
if constexpr (CPP_DEBUG) {
dbgln("Tokens:");
for (size_t i = 0; i < m_tokens.size(); ++i) {
- dbgln("{}- {}", i, m_tokens[i].to_string());
+ dbgln("{}- {}", i, m_tokens[i].to_deprecated_string());
}
}
}
@@ -579,7 +579,7 @@ NonnullRefPtr<Expression> Parser::parse_secondary_expression(ASTNode& parent, No
return func;
}
default: {
- error(DeprecatedString::formatted("unexpected operator for expression. operator: {}", peek().to_string()));
+ error(DeprecatedString::formatted("unexpected operator for expression. operator: {}", peek().to_deprecated_string()));
auto token = consume();
return create_ast_node<InvalidExpression>(parent, token.start(), token.end());
}
@@ -880,7 +880,7 @@ DeprecatedString Parser::text_in_range(Position start, Position end) const
for (auto token : tokens_in_range(start, end)) {
builder.append(token.text());
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
Vector<Token> Parser::tokens_in_range(Position start, Position end) const
@@ -1008,7 +1008,7 @@ Optional<size_t> Parser::index_of_token_at(Position pos) const
void Parser::print_tokens() const
{
for (auto& token : m_tokens) {
- outln("{}", token.to_string());
+ outln("{}", token.to_deprecated_string());
}
}
@@ -1110,7 +1110,7 @@ Token Parser::consume_keyword(DeprecatedString const& keyword)
{
auto token = consume();
if (token.type() != Token::Type::Keyword) {
- error(DeprecatedString::formatted("unexpected token: {}, expected Keyword", token.to_string()));
+ error(DeprecatedString::formatted("unexpected token: {}, expected Keyword", token.to_deprecated_string()));
return token;
}
if (text_of_token(token) != keyword) {