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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 visitDeclarationGroup(node.declarations); | 165 visitDeclarationGroup(node.declarations); |
166 output.depth--; | 166 output.depth--; |
167 } | 167 } |
168 | 168 |
169 /** | 169 /** |
170 * Added optional newLine for handling @include at top-level vs/ inside of | 170 * Added optional newLine for handling @include at top-level vs/ inside of |
171 * a declaration group. | 171 * a declaration group. |
172 */ | 172 */ |
173 void visitIncludeDirective(IncludeDirective node) { | 173 void visitIncludeDirective(IncludeDirective node) { |
174 heading('IncludeDirective ${node.name}', node); | 174 heading('IncludeDirective ${node.name}', node); |
175 output.writeNodeList('parameters', node.args); | 175 var flattened = node.args.expand((e) => e).toList(); |
| 176 output.writeNodeList('parameters', flattened); |
176 } | 177 } |
177 | 178 |
178 void visitIncludeMixinAtDeclaration(IncludeMixinAtDeclaration node) { | 179 void visitIncludeMixinAtDeclaration(IncludeMixinAtDeclaration node) { |
179 heading('IncludeMixinAtDeclaration ${node.include.name}', node); | 180 heading('IncludeMixinAtDeclaration ${node.include.name}', node); |
180 output.depth++; | 181 output.depth++; |
181 visitIncludeDirective(node.include); | 182 visitIncludeDirective(node.include); |
182 output.depth--; | 183 output.depth--; |
183 } | 184 } |
184 | 185 |
185 void visitExtendDeclaration(ExtendDeclaration node) { | 186 void visitExtendDeclaration(ExtendDeclaration node) { |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 } | 549 } |
549 | 550 |
550 void visitPaddingExpression(PaddingExpression node) { | 551 void visitPaddingExpression(PaddingExpression node) { |
551 heading('Dart Style PaddingExpression', node); | 552 heading('Dart Style PaddingExpression', node); |
552 } | 553 } |
553 | 554 |
554 void visitWidthExpression(WidthExpression node) { | 555 void visitWidthExpression(WidthExpression node) { |
555 heading('Dart Style WidthExpression', node); | 556 heading('Dart Style WidthExpression', node); |
556 } | 557 } |
557 } | 558 } |
OLD | NEW |