feat(generate): warn about unreachable variables (#4567)
This commit is contained in:
parent
85ab2929e9
commit
25c601bd2f
1 changed files with 1 additions and 0 deletions
|
|
@ -247,6 +247,7 @@ pub(crate) fn parse_grammar(input: &str) -> ParseGrammarResult<InputGrammar> {
|
|||
&mut in_progress,
|
||||
)
|
||||
{
|
||||
eprintln!("Warning: unused variable {name:?}");
|
||||
grammar_json.conflicts.retain(|r| !r.contains(name));
|
||||
grammar_json.supertypes.retain(|r| r != name);
|
||||
grammar_json.inline.retain(|r| r != name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue