Skip to content
Snippets Groups Projects

Introduction of structural ast nodes

Merged Richard Angersbach requested to merge rangersbach/structural into v2.0-dev
Viewing commit 84b4c13b
Show latest version
2 files
+ 4
4
Preferences
Compare changes
Files
2
@@ -247,7 +247,7 @@ class PsLoop(PsStructuralNode):
self._start.clone(),
self._stop.clone(),
self._step.clone(),
self._body.clone(),
self._body._clone_structural(),
)
def get_children(self) -> tuple[PsAstNode, ...]:
@@ -312,8 +312,8 @@ class PsConditional(PsStructuralNode):
def _clone_structural(self) -> PsConditional:
return PsConditional(
self._condition.clone(),
self._branch_true.clone(),
self._branch_false.clone() if self._branch_false is not None else None,
self._branch_true._clone_structural(),
self._branch_false._clone_structural() if self._branch_false is not None else None,
)
def get_children(self) -> tuple[PsAstNode, ...]: