Don't allow const
to begin a nonterminal
Thanks to Vadim Petrochenkov who [told me what the fix was][z]!
[z]: 220240422
This commit is contained in:
parent
b32e6e6ac8
commit
d6f1787447
2 changed files with 22 additions and 0 deletions
|
@ -27,6 +27,8 @@ impl<'a> Parser<'a> {
|
|||
token.can_begin_expr()
|
||||
// This exception is here for backwards compatibility.
|
||||
&& !token.is_keyword(kw::Let)
|
||||
// This exception is here for backwards compatibility.
|
||||
&& !token.is_keyword(kw::Const)
|
||||
}
|
||||
NonterminalKind::Ty => token.can_begin_type(),
|
||||
NonterminalKind::Ident => get_macro_ident(token).is_some(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue