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 visitor; | 5 part of 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, [bool useSpan = false]) { | 10 String treeToDebugString(styleSheet, [bool useSpan = false]) { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 heading('KeyFrameBlock', node); | 110 heading('KeyFrameBlock', node); |
111 output.depth++; | 111 output.depth++; |
112 super.visitKeyFrameBlock(node); | 112 super.visitKeyFrameBlock(node); |
113 output.depth--; | 113 output.depth--; |
114 } | 114 } |
115 | 115 |
116 void visitFontFaceDirective(FontFaceDirective node) { | 116 void visitFontFaceDirective(FontFaceDirective node) { |
117 // TODO(terry): To Be Implemented | 117 // TODO(terry): To Be Implemented |
118 } | 118 } |
119 | 119 |
120 void visitIncludeDirective(IncludeDirective node) { | |
121 heading('IncludeDirective', node); | |
122 output.writeValue('include', node._include); | |
123 output.depth++; | |
124 if (node._stylesheet != null) { | |
125 super.visitIncludeDirective(node); | |
126 } else { | |
127 output.writeValue('StyleSheet', '<EMPTY>'); | |
128 } | |
129 output.depth--; | |
130 } | |
131 | |
132 void visitStyletDirective(StyletDirective node) { | 120 void visitStyletDirective(StyletDirective node) { |
133 heading('StyletDirective', node); | 121 heading('StyletDirective', node); |
134 output.writeValue('dartClassName', node._dartClassName); | 122 output.writeValue('dartClassName', node._dartClassName); |
135 output.depth++; | 123 output.depth++; |
136 output.writeNodeList('rulesets', node._rulesets); | 124 output.writeNodeList('rulesets', node._rulesets); |
137 output.depth--; | 125 output.depth--; |
138 } | 126 } |
139 | 127 |
140 void visitNamespaceDirective(NamespaceDirective node) { | 128 void visitNamespaceDirective(NamespaceDirective node) { |
141 heading('NamespaceDirective', node); | 129 heading('NamespaceDirective', node); |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 } | 469 } |
482 | 470 |
483 void visitPaddingExpression(PaddingExpression node) { | 471 void visitPaddingExpression(PaddingExpression node) { |
484 heading('Dart Style PaddingExpression', node); | 472 heading('Dart Style PaddingExpression', node); |
485 } | 473 } |
486 | 474 |
487 void visitWidthExpression(WidthExpression node) { | 475 void visitWidthExpression(WidthExpression node) { |
488 heading('Dart Style WidthExpression', node); | 476 heading('Dart Style WidthExpression', node); |
489 } | 477 } |
490 } | 478 } |
OLD | NEW |