OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of csslib.visitor; | 5 part of csslib.visitor; |
6 | 6 |
7 // TODO(terry): Enable class for debug only; when conditional imports enabled. | 7 // TODO(terry): Enable class for debug only; when conditional imports enabled. |
8 | 8 |
9 /** Helper function to dump the CSS AST. */ | 9 /** Helper function to dump the CSS AST. */ |
10 String treeToDebugString(StyleSheet styleSheet, [bool useSpan = false]) { | 10 String treeToDebugString(StyleSheet styleSheet, [bool useSpan = false]) { |
(...skipping 28 matching lines...) Expand all Loading... |
39 } | 39 } |
40 | 40 |
41 void visitTopLevelProduction(TopLevelProduction node) { | 41 void visitTopLevelProduction(TopLevelProduction node) { |
42 heading('TopLevelProduction', node); | 42 heading('TopLevelProduction', node); |
43 } | 43 } |
44 | 44 |
45 void visitDirective(Directive node) { | 45 void visitDirective(Directive node) { |
46 heading('Directive', node); | 46 heading('Directive', node); |
47 } | 47 } |
48 | 48 |
| 49 void visitCalcTerm(CalcTerm node) { |
| 50 heading('CalcTerm', node); |
| 51 output.depth++; |
| 52 super.visitCalcTerm(node); |
| 53 output.depth--; |
| 54 } |
| 55 |
49 void visitCssComment(CssComment node) { | 56 void visitCssComment(CssComment node) { |
50 heading('Comment', node); | 57 heading('Comment', node); |
51 output.depth++; | 58 output.depth++; |
52 output.writeValue('comment value', node.comment); | 59 output.writeValue('comment value', node.comment); |
53 output.depth--; | 60 output.depth--; |
54 } | 61 } |
55 | 62 |
56 void visitCommentDefinition(CommentDefinition node) { | 63 void visitCommentDefinition(CommentDefinition node) { |
57 heading('CommentDefinition (CDO/CDC)', node); | 64 heading('CommentDefinition (CDO/CDC)', node); |
58 output.depth++; | 65 output.depth++; |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 } | 556 } |
550 | 557 |
551 void visitPaddingExpression(PaddingExpression node) { | 558 void visitPaddingExpression(PaddingExpression node) { |
552 heading('Dart Style PaddingExpression', node); | 559 heading('Dart Style PaddingExpression', node); |
553 } | 560 } |
554 | 561 |
555 void visitWidthExpression(WidthExpression node) { | 562 void visitWidthExpression(WidthExpression node) { |
556 heading('Dart Style WidthExpression', node); | 563 heading('Dart Style WidthExpression', node); |
557 } | 564 } |
558 } | 565 } |
OLD | NEW |