Remove Token::NONE.
This commit is contained in:
parent
541951ec3f
commit
dd2a0a64aa
@ -276,8 +276,6 @@ pub enum Token {
|
|||||||
/// End of the input stream.
|
/// End of the input stream.
|
||||||
/// Used as a placeholder for the end of input.
|
/// Used as a placeholder for the end of input.
|
||||||
EOF,
|
EOF,
|
||||||
/// Placeholder to indicate the lack of a token.
|
|
||||||
NONE,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Token {
|
impl fmt::Display for Token {
|
||||||
@ -303,7 +301,6 @@ impl fmt::Display for Token {
|
|||||||
Comment(s) => f.write_str(s),
|
Comment(s) => f.write_str(s),
|
||||||
|
|
||||||
EOF => f.write_str("{EOF}"),
|
EOF => f.write_str("{EOF}"),
|
||||||
NONE => f.write_str("{NONE}"),
|
|
||||||
|
|
||||||
token => f.write_str(token.literal_syntax()),
|
token => f.write_str(token.literal_syntax()),
|
||||||
}
|
}
|
||||||
@ -332,7 +329,7 @@ impl Token {
|
|||||||
Custom(..) => false,
|
Custom(..) => false,
|
||||||
LexError(..) | Comment(..) => false,
|
LexError(..) | Comment(..) => false,
|
||||||
|
|
||||||
EOF | NONE => false,
|
EOF => false,
|
||||||
|
|
||||||
_ => true,
|
_ => true,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user