Issue Task New Orphaned

#102103Refactor TS IncludeTree condition detail

Christian Kuhn 10/06/23, 11:51 updated 07/31/24, 10:27

Description

Similar to #102102

The “condition” include object tree structure should be improved: A “body” include should be added as child of the condition that represents the executed body when the condition matches. The condition object itself should just contain the condition snipped. Also, the body include should then have the according body line objects set, those are currently not added at all and are only attached to the parent include, which makes everything harder than it should be, especially in IncludeTreeSyntaxScannerVisitor, and in BE module source rendering.

This change should probably be done before #102102 to simplify the needed IncludeTreeSyntaxScannerVisitor refactoring.

Sidenote: We may want to change [global] and [end] to single objects, too. I think we fiddled in this area once already, but still, it might be good to reconsider again. Having an own object for this would probably simplify the ast builder, may reduce some headaches with source rendering, and would simplify a possible detection of “double” [globals] as well, which could be implemented in IncludeTreeSyntaxScannerVisitor.

Reviews 3

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". The changes above were merged or abandoned: read them before you start. How to create a patch

Commit message
[TASK] Refactor TS IncludeTree condition detail Resolves: #102103 Releases: main