Cleanup unrecognized statement wrapping 35/95835/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 19 Apr 2021 17:03:19 +0000 (19:03 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 19 Apr 2021 17:08:38 +0000 (19:08 +0200)
commit4c55bcfdbca157ccbec16d458ee860aabe1227bf
tree137623f37e33c977230dcf76e9144a020a081459
parent71f278c99bafb65b43d3cc563a205994a6f8dca9
Cleanup unrecognized statement wrapping

reactor/rfc7950 interaction around inner statements is a bit hacky
in that we end up performing two unrelated semantic checks before
dispatching.

As it turns out, though, this only a special case of a more widely
applicable pattern, where the parent statement chooses to wrap its
children in a different semantic support.

Separating this out makes the intent clear, as it ends up being an
extension trait to StatementSupport on the side of yang-parser-reactor
and has a well-understood anchor in UnrecognizedStatementSupport.

Change-Id: I3b64f58239e22affccc02921efd8cd70b411d7c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-reactor/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java
yang/yang-parser-reactor/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/StatementDefinitionContext.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/extension/UnrecognizedStatementSupport.java
yang/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OverrideChildStatementSupport.java [new file with mode: 0644]
yang/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StatementSupport.java