JetBrains / Grammar-Kit

Grammar files support & parser/PSI generation for IntelliJ IDEA
Other
715 stars 125 forks source link

Fix false positive "Unresolved BNF References" for methods from `GeneratedParserUtilBase` if `parserUtilClass` does not inherit it #351

Open VladRassokhin opened 1 year ago

gregsh commented 1 year ago

Let's process parser imports correctly. The patch is rather a hack to support that particular single case.

General fix:

Get all parser imports (no semicolons, btw), and cycle through static fqn.* and fqn.method entries.

Funny, but quoted idents with dots are not properly generated, so we can skip fqn imports. Or they too can be supported, because <<<GeneratedParserUtilBase.eof>>> could work 😄 .

That's it