| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 } | 383 } |
| 384 | 384 |
| 385 void visitNumberTerm(NumberTerm node) { | 385 void visitNumberTerm(NumberTerm node) { |
| 386 heading('NumberTerm', node); | 386 heading('NumberTerm', node); |
| 387 output.depth++; | 387 output.depth++; |
| 388 output.writeValue('value', node.text); | 388 output.writeValue('value', node.text); |
| 389 output.depth--; | 389 output.depth--; |
| 390 } | 390 } |
| 391 | 391 |
| 392 void visitUnitTerm(UnitTerm node) { | 392 void visitUnitTerm(UnitTerm node) { |
| 393 String unitValue; | |
| 394 | |
| 395 output.depth++; | 393 output.depth++; |
| 396 output.writeValue('value', node.text); | 394 output.writeValue('value', node.text); |
| 397 output.writeValue('unit', node.unitToString()); | 395 output.writeValue('unit', node.unitToString()); |
| 398 output.depth--; | 396 output.depth--; |
| 399 } | 397 } |
| 400 | 398 |
| 401 void visitLengthTerm(LengthTerm node) { | 399 void visitLengthTerm(LengthTerm node) { |
| 402 heading('LengthTerm', node); | 400 heading('LengthTerm', node); |
| 403 super.visitLengthTerm(node); | 401 super.visitLengthTerm(node); |
| 404 } | 402 } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 } | 549 } |
| 552 | 550 |
| 553 void visitPaddingExpression(PaddingExpression node) { | 551 void visitPaddingExpression(PaddingExpression node) { |
| 554 heading('Dart Style PaddingExpression', node); | 552 heading('Dart Style PaddingExpression', node); |
| 555 } | 553 } |
| 556 | 554 |
| 557 void visitWidthExpression(WidthExpression node) { | 555 void visitWidthExpression(WidthExpression node) { |
| 558 heading('Dart Style WidthExpression', node); | 556 heading('Dart Style WidthExpression', node); |
| 559 } | 557 } |
| 560 } | 558 } |
| OLD | NEW |