build method

List<Statement> build()

Returns statements for querying the dependency injection hierarchy.

These statements assume that the local variables InjectMethodVars.token and InjectMethodVars.nodeIndex are in scope.

Implementation

List<o.Statement> build() {
  // Eliminate empty nodes so that we don't optimize around their ranges.
  final roots = expandEmptyNodes(_roots);
  final statements = <o.Statement>[];
  _build(roots, statements, 0, -1);
  return statements;
}