parent property

  1. @override
ParseTree? parent
override

Implementation

@override
ParseTree? get parent;
void parent=(covariant ParseTree? parent)
covariant

Set the parent for this node.

This is not backward compatible as it changes the interface but no one was able to create custom nodes anyway so I'm adding as it improves internal code quality.

One could argue for a restructuring of the class/interface hierarchy so that setParent, addChild are moved up to Tree but that's a major change. So I'll do the minimal change, which is to add this method.

@since 4.7

Implementation

set parent(covariant ParseTree? parent);