Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: lib/src/template/emitters.dart

Issue 11092092: Support compiling templates in the browser. Base URL: git@github.com:dart-lang/dart-web-components.git@master
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/template/dartio_stub.dart ('k') | lib/src/template/file_system.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « lib/src/template/dartio_stub.dart ('k') | lib/src/template/file_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698