Fix handling of token rules directly inside of alias, prec, or field.
Fixes #483
This commit is contained in:
parent
b4a2f4ed60
commit
660efd8c0f
4 changed files with 72 additions and 1 deletions
|
|
@ -366,7 +366,7 @@ impl FromIterator<Symbol> for TokenSet {
|
|||
|
||||
fn add_metadata<T: FnOnce(&mut MetadataParams)>(input: Rule, f: T) -> Rule {
|
||||
match input {
|
||||
Rule::Metadata { rule, mut params } => {
|
||||
Rule::Metadata { rule, mut params } if !params.is_token => {
|
||||
f(&mut params);
|
||||
Rule::Metadata { rule, params }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue