buildTree method

Build a tree-based representation of the DartBlock program.

The tree representation is used internally to enable:

Implementation

DartBlockProgramTreeNode buildTree() {
  final DartBlockProgramTreeNode root = DartBlockProgramTreeRootNode();
  for (var customFunction in [mainFunction] + customFunctions) {
    customFunction.buildTree(root);
  }

  return root;
}