Remove some unnecessary invisible delimiter checks.
These seem to have no useful effect... they don't seem useful from a code inspection point of view, and they affect anything in the test suite.
This commit is contained in:
parent
bb398ca594
commit
3cd8e9866d
@ -2109,8 +2109,7 @@ pub(super) fn consume_block(&mut self, delim: Delimiter, consume_close: ConsumeC
|
||||
brace_depth -= 1;
|
||||
continue;
|
||||
}
|
||||
} else if self.token == token::Eof || self.eat(&token::CloseDelim(Delimiter::Invisible))
|
||||
{
|
||||
} else if self.token == token::Eof {
|
||||
return;
|
||||
} else {
|
||||
self.bump();
|
||||
|
@ -79,9 +79,7 @@ fn check_keyword<'a, 'b: 'a>(parser: &'a mut Parser<'b>) -> Option<MacroArg> {
|
||||
for &keyword in RUST_KW.iter() {
|
||||
if parser.token.is_keyword(keyword)
|
||||
&& parser.look_ahead(1, |t| {
|
||||
t.kind == TokenKind::Eof
|
||||
|| t.kind == TokenKind::Comma
|
||||
|| t.kind == TokenKind::CloseDelim(Delimiter::Invisible)
|
||||
t.kind == TokenKind::Eof || t.kind == TokenKind::Comma
|
||||
})
|
||||
{
|
||||
parser.bump();
|
||||
|
Loading…
Reference in New Issue
Block a user