OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /** Collects several code emitters for the template tool. */ | 5 /** Collects several code emitters for the template tool. */ |
6 // TODO(sigmund): add visitor that applies all emitters on a component | 6 // TODO(sigmund): add visitor that applies all emitters on a component |
7 // TODO(sigmund): add support for conditionals, so context is changed at that | 7 // TODO(sigmund): add support for conditionals, so context is changed at that |
8 // point. | 8 // point. |
9 library emitters; | 9 library emitters; |
10 | 10 |
11 import 'package:html5lib/dom.dart'; | 11 import 'package:html5lib/dom.dart'; |
| 12 import 'package:html5lib/dom_parsing.dart'; |
12 | 13 |
13 import 'code_printer.dart'; | 14 import 'code_printer.dart'; |
14 import 'codegen.dart' as codegen; | 15 import 'codegen.dart' as codegen; |
15 import 'info.dart'; | 16 import 'info.dart'; |
16 import 'files.dart'; | 17 import 'files.dart'; |
17 import 'world.dart'; | 18 import 'world.dart'; |
18 | 19 |
19 /** | 20 /** |
20 * An emitter for a web component feature. It collects all the logic for | 21 * An emitter for a web component feature. It collects all the logic for |
21 * emitting a particular feature (such as data-binding, event hookup) with | 22 * emitting a particular feature (such as data-binding, event hookup) with |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 | 614 |
614 return new CodePrinter().add( | 615 return new CodePrinter().add( |
615 codegen.mainDartCode( | 616 codegen.mainDartCode( |
616 _info, | 617 _info, |
617 _context.declarations.formatString(0), | 618 _context.declarations.formatString(0), |
618 _context.createdMethod.formatString(1), | 619 _context.createdMethod.formatString(1), |
619 _context.insertedMethod.formatString(1), | 620 _context.insertedMethod.formatString(1), |
620 document.body.innerHTML.trim())).formatString(); | 621 document.body.innerHTML.trim())).formatString(); |
621 } | 622 } |
622 } | 623 } |
OLD | NEW |