Skip to content

Conversation

brokenhappy
Copy link

#305

  • Added inspections for sealed rules
  • Updated default Java version to 17

 - Added sealed support to BnfDiagram
 - Added inspections for sealed rules
 - Updated default Java version to 17
@brokenhappy
Copy link
Author

brokenhappy commented Nov 25, 2022

The concept of having rules with interface but without implementations are new to the PSI structure. There are many concepts that rely on this, such as mixin, extends, elementType etc.

So far the behavior presented here pretty much ignores all of them but methods. methods is forwarded down the sealed hierarchy, and all leaves (non-sealed) implement all methods from all of their sealed super-rules.
This is not consistent with extends or mixin etc.

Also, if someone accidentally extends a sealed type, the sealed type semantics are dropped. (there's an inspection for this, see org.intellij.grammar.BnfSealedRuleInspectionsTest#testSealedRulesMayNotBeExtendedTo)

Any thoughts on this, and are there any assumptions that are broken by this approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants