buildTree method
Build a tree-based representation of the DartBlock program.
The tree representation is used internally to enable:
- the DartBlockVariableCountEvaluationSchema schema,
- to determine the defined variables available in a given scope.
Implementation
DartBlockProgramTreeNode buildTree() {
final DartBlockProgramTreeNode root = DartBlockProgramTreeRootNode();
for (var customFunction in [mainFunction] + customFunctions) {
customFunction.buildTree(root);
}
return root;
}