syntax: Use Token
in Parser
This commit is contained in:
parent
c0c57acd7b
commit
aa6fba98ae
10 changed files with 126 additions and 126 deletions
|
@ -103,7 +103,7 @@ fn parse_assert<'a>(
|
|||
//
|
||||
// Parse this as an actual message, and suggest inserting a comma. Eventually, this should be
|
||||
// turned into an error.
|
||||
let custom_message = if let token::Literal(token::Lit { kind: token::Str, .. }) = parser.token {
|
||||
let custom_message = if let token::Literal(token::Lit { kind: token::Str, .. }) = parser.token.kind {
|
||||
let mut err = cx.struct_span_warn(parser.span, "unexpected string literal");
|
||||
let comma_span = cx.source_map().next_point(parser.prev_span);
|
||||
err.span_suggestion_short(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue