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

Side by Side Diff: utils/template/parser.dart

Issue 11273041: Make first and last getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « utils/template/htmltree.dart ('k') | utils/tests/template/real_app.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 3
4 class TagStack { 4 class TagStack {
5 List<ASTNode> _stack; 5 List<ASTNode> _stack;
6 6
7 TagStack(var elem) : _stack = [] { 7 TagStack(var elem) : _stack = [] {
8 _stack.add(elem); 8 _stack.add(elem);
9 } 9 }
10 10
11 void push(var elem) { 11 void push(var elem) {
12 _stack.add(elem); 12 _stack.add(elem);
13 } 13 }
14 14
15 ASTNode pop() { 15 ASTNode pop() {
16 return _stack.removeLast(); 16 return _stack.removeLast();
17 } 17 }
18 18
19 top() { 19 top() {
20 return _stack.last(); 20 return _stack.last;
21 } 21 }
22 } 22 }
23 23
24 // TODO(terry): Cleanup returning errors from CSS to common World error 24 // TODO(terry): Cleanup returning errors from CSS to common World error
25 // handler. 25 // handler.
26 class ErrorMsgRedirector { 26 class ErrorMsgRedirector {
27 void displayError(String msg) { 27 void displayError(String msg) {
28 if (world.printHandler != null) { 28 if (world.printHandler != null) {
29 world.printHandler(msg); 29 world.printHandler(msg);
30 } else { 30 } else {
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 } 711 }
712 712
713 if (stringValue.length > 0) { 713 if (stringValue.length > 0) {
714 nodes.add(new TemplateText(stringValue.toString(), _makeSpan(start))); 714 nodes.add(new TemplateText(stringValue.toString(), _makeSpan(start)));
715 } 715 }
716 716
717 return nodes; 717 return nodes;
718 } 718 }
719 719
720 } 720 }
OLDNEW
« no previous file with comments | « utils/template/htmltree.dart ('k') | utils/tests/template/real_app.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698