Add support for purely-effective substatements (YANGTOOLS-1372)

[YANGTOOLS-1383] Do not emit UndeclaredCaseStatements Created: 13/Dec/21  Updated: 14/Mar/22  Resolved: 15/Dec/21

Status: Resolved
Project: yangtools
Component/s: parser
Affects Version/s: None
Fix Version/s: 8.0.0

Type: Sub-task Priority: High
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to YANGTOOLS-1407 Attempted access to undeclared case s... Resolved

 Description   

Implicit case statements are created during ModelProcessingPhase.FULL_DECLARATION, i.e. while statements are still being loaded.
This leads to them being created in reactor.StatementMap as SubstatementContexts and thus part of StmtContext.declaredSubstatements() – which is what statement inference expects.
When we are building DeclaredStatement, though, we do not want to emit implicit cases, we want to essentially reconstruct what we got from StatementStreamSource.

Rework internal reactor interfaces and implementation to differentiate between declared statement tree (no implicit cases) and effective statement tree (with effective cases).


Generated at Wed Feb 07 20:56:00 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.