|
@@ -21,12 +21,7 @@ Parser::Parser(const StringView& program, const String& filename, Preprocessor::
|
|
|
if constexpr (CPP_DEBUG) {
|
|
|
dbgln("Tokens:");
|
|
|
for (auto& token : m_tokens) {
|
|
|
- StringView text;
|
|
|
- if (token.start().line != token.end().line || token.start().column > token.end().column)
|
|
|
- text = {};
|
|
|
- else
|
|
|
- text = text_of_token(token);
|
|
|
- dbgln("{} {}:{}-{}:{} ({})", token.to_string(), token.start().line, token.start().column, token.end().line, token.end().column, text);
|
|
|
+ dbgln("{}", token.to_string());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -930,7 +925,7 @@ Optional<size_t> Parser::index_of_token_at(Position pos) const
|
|
|
void Parser::print_tokens() const
|
|
|
{
|
|
|
for (auto& token : m_tokens) {
|
|
|
- dbgln("{}", token.to_string());
|
|
|
+ outln("{}", token.to_string());
|
|
|
}
|
|
|
}
|
|
|
|