compile method

DartSourceOutput compile(
  1. Library library,
  2. String moduleUrl
)

Implementation

DartSourceOutput compile(ir.Library library, String moduleUrl) {
  /// Line-by-line (approximately) "statements" to write as dart source.
  final statements = <o.Statement>[];

  // Output *Views.
  for (final component in library.components) {
    _compileComponent(component, statements);
  }

  // Output DirectiveChangeDetector (for some Directives).
  for (final directive in library.directives) {
    if (directive.requiresDirectiveChangeDetector) {
      _compileDirective(directive, statements);
    }
  }

  return _createSourceModule(moduleUrl, statements);
}