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:
parent
cdea9f5339
commit
0c9db38e8f
4 changed files with 18 additions and 12 deletions
|
@ -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; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue