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 library csslib.visitor; | 5 library csslib.visitor; |
6 | 6 |
7 import 'package:source_span/source_span.dart'; | 7 import 'package:source_span/source_span.dart'; |
8 import 'parser.dart'; | 8 import 'parser.dart'; |
9 | 9 |
10 part 'src/css_printer.dart'; | 10 part 'src/css_printer.dart'; |
11 part 'src/tree.dart'; | 11 part 'src/tree.dart'; |
12 part 'src/tree_base.dart'; | 12 part 'src/tree_base.dart'; |
13 part 'src/tree_printer.dart'; | 13 part 'src/tree_printer.dart'; |
14 | 14 |
15 abstract class VisitorBase { | 15 abstract class VisitorBase { |
| 16 visitCalcTerm(CalcTerm node); |
16 visitCssComment(CssComment node); | 17 visitCssComment(CssComment node); |
17 visitCommentDefinition(CommentDefinition node); | 18 visitCommentDefinition(CommentDefinition node); |
18 visitStyleSheet(StyleSheet node); | 19 visitStyleSheet(StyleSheet node); |
19 visitNoOp(NoOp node); | 20 visitNoOp(NoOp node); |
20 visitTopLevelProduction(TopLevelProduction node); | 21 visitTopLevelProduction(TopLevelProduction node); |
21 visitDirective(Directive node); | 22 visitDirective(Directive node); |
22 visitMediaExpression(MediaExpression node); | 23 visitMediaExpression(MediaExpression node); |
23 visitMediaQuery(MediaQuery node); | 24 visitMediaQuery(MediaQuery node); |
24 visitMediaDirective(MediaDirective node); | 25 visitMediaDirective(MediaDirective node); |
25 visitHostDirective(HostDirective node); | 26 visitHostDirective(HostDirective node); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 visitStyleSheet(StyleSheet ss) { | 126 visitStyleSheet(StyleSheet ss) { |
126 _visitNodeList(ss.topLevels); | 127 _visitNodeList(ss.topLevels); |
127 } | 128 } |
128 | 129 |
129 visitNoOp(NoOp node) {} | 130 visitNoOp(NoOp node) {} |
130 | 131 |
131 visitTopLevelProduction(TopLevelProduction node) {} | 132 visitTopLevelProduction(TopLevelProduction node) {} |
132 | 133 |
133 visitDirective(Directive node) {} | 134 visitDirective(Directive node) {} |
134 | 135 |
| 136 visitCalcTerm(CalcTerm node) { |
| 137 visitLiteralTerm(node); |
| 138 visitLiteralTerm(node.expr); |
| 139 } |
| 140 |
135 visitCssComment(CssComment node) {} | 141 visitCssComment(CssComment node) {} |
136 | 142 |
137 visitCommentDefinition(CommentDefinition node) {} | 143 visitCommentDefinition(CommentDefinition node) {} |
138 | 144 |
139 visitMediaExpression(MediaExpression node) { | 145 visitMediaExpression(MediaExpression node) { |
140 visitExpressions(node.exprs); | 146 visitExpressions(node.exprs); |
141 } | 147 } |
142 | 148 |
143 visitMediaQuery(MediaQuery node) { | 149 visitMediaQuery(MediaQuery node) { |
144 for (var mediaExpr in node.expressions) { | 150 for (var mediaExpr in node.expressions) { |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 visitPaddingExpression(PaddingExpression node) { | 452 visitPaddingExpression(PaddingExpression node) { |
447 // TODO(terry): TBD | 453 // TODO(terry): TBD |
448 throw new UnimplementedError(); | 454 throw new UnimplementedError(); |
449 } | 455 } |
450 | 456 |
451 visitWidthExpression(WidthExpression node) { | 457 visitWidthExpression(WidthExpression node) { |
452 // TODO(terry): TBD | 458 // TODO(terry): TBD |
453 throw new UnimplementedError(); | 459 throw new UnimplementedError(); |
454 } | 460 } |
455 } | 461 } |
OLD | NEW |