OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |