mirror of
https://github.com/RustPython/Parser.git
synced 2025-09-03 09:07:54 +00:00
Include comment text in token
This commit is contained in:
parent
2dfd053bed
commit
a4a5366504
4 changed files with 11 additions and 10 deletions
|
@ -37,7 +37,7 @@ pub enum Tok {
|
|||
Rsqb,
|
||||
Colon,
|
||||
Comma,
|
||||
Comment,
|
||||
Comment(String),
|
||||
Semi,
|
||||
Plus,
|
||||
Minus,
|
||||
|
@ -148,7 +148,7 @@ impl fmt::Display for Tok {
|
|||
Rsqb => f.write_str("']'"),
|
||||
Colon => f.write_str("':'"),
|
||||
Comma => f.write_str("','"),
|
||||
Comment => f.write_str("#"),
|
||||
Comment(value) => f.write_str(value),
|
||||
Semi => f.write_str("';'"),
|
||||
Plus => f.write_str("'+'"),
|
||||
Minus => f.write_str("'-'"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue