Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
fix(parser_generator): use parser getter/setter generator instead
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelgj authored and mhevery committed Feb 20, 2014
1 parent 5451d63 commit 42c8d8c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/tools/expression_extractor.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
library angular.tools.html_expression_extractor;

import 'dart:async';
import 'dart:io';
import 'package:angular/tools/html_extractor.dart';
import 'package:angular/tools/source_metadata_extractor.dart';
Expand All @@ -13,6 +14,7 @@ import 'package:di/dynamic_injector.dart';

import 'package:angular/core/module.dart';
import 'package:angular/core/parser/parser.dart';
import 'package:angular/tools/parser_getter_setter/generator.dart';
import 'package:angular/tools/parser_generator/generator.dart';

main(args) {
Expand Down Expand Up @@ -53,14 +55,19 @@ main(args) {
printer.printSrc('// Found ${expressions.length} expressions');
Module module = new Module()
..type(Parser, implementedBy: DynamicParser)
..type(ParserBackend, implementedBy: DynamicParserBackend)
..type(ParserBackend, implementedBy: DartGetterSetterGen)
..type(FilterMap, implementedBy: NullFilterMap)
..value(SourcePrinter, printer);
Injector injector =
new DynamicInjector(modules: [module], allowImplicitInjection: true);

// Run the generator.
injector.get(ParserGenerator).generateParser(htmlExtractor.expressions);
runZoned(() {
// Run the generator.
injector.get(ParserGetterSetter).generateParser(htmlExtractor.expressions);
}, zoneSpecification: new ZoneSpecification(print: (_, __, ___, String line) {
printer.printSrc(line);
}));


// Output footer last.
if (footerFile != '') {
Expand Down

0 comments on commit 42c8d8c

Please sign in to comment.