1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +00:00

LibCpp: Modify Token::to_string() to include more information

Token::to_string() now includes not only the token's type, but also its
text and span in the document.
This commit is contained in:
Itamar 2021-05-21 14:39:42 +03:00 committed by Andreas Kling
parent cdea9f5339
commit 0c9db38e8f
4 changed files with 18 additions and 12 deletions

View file

@ -116,10 +116,9 @@ struct Token {
VERIFY_NOT_REACHED();
}
const char* to_string() const
{
return type_to_string(m_type);
}
String to_string() const;
String type_as_string() const;
const Position& start() const { return m_start; }
const Position& end() const { return m_end; }