fix(generate): improve error message for nonterminals used in immediate token rule

This commit is contained in:
Will Lillis 2026-05-10 08:50:42 -04:00
parent 21cfae7b56
commit a376ad491f

View file

@ -404,7 +404,7 @@ fn parse_rule(json: RuleJSON, is_token: bool) -> ParseGrammarResult<Rule> {
}),
RuleJSON::TOKEN { content } => parse_rule(*content, true).map(Rule::token),
RuleJSON::IMMEDIATE_TOKEN { content } => {
parse_rule(*content, is_token).map(Rule::immediate_token)
parse_rule(*content, true).map(Rule::immediate_token)
}
}
}