handle Token::Rickroll in parser

This commit is contained in:
HTG-YT 2021-06-13 13:24:09 +08:00 committed by GitHub
parent 1bba812018
commit aa5000c6c8

View file

@ -78,6 +78,10 @@ impl<'source> Parser<'source> {
self.semi_terminated(StmtKind::Rlyeh)?, self.semi_terminated(StmtKind::Rlyeh)?,
start..self.lexer.span().end, start..self.lexer.span().end,
)), )),
Token::Rickroll => Ok(Stmt::new(
self.semi_terminated(StmtKind::Rickroll)?,
start..self.lexer.span().end
)),
Token::Identifier(_) Token::Identifier(_)
| Token::Char | Token::Char