Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1097)

Unified Diff: pkg/csslib/lib/src/tree_printer.dart

Issue 64373003: pkg/csslib: types, fixes, cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: more Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/csslib/lib/src/tree_base.dart ('k') | pkg/csslib/lib/src/validate.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/csslib/lib/src/tree_printer.dart
diff --git a/pkg/csslib/lib/src/tree_printer.dart b/pkg/csslib/lib/src/tree_printer.dart
index 3dc2afd56fbd30d530e3ed49c5c0c17cc6a51c73..8c394766f008acb4c42c3569268acd4d5f339bd9 100644
--- a/pkg/csslib/lib/src/tree_printer.dart
+++ b/pkg/csslib/lib/src/tree_printer.dart
@@ -7,7 +7,7 @@ part of csslib.visitor;
// TODO(terry): Enable class for debug only; when conditional imports enabled.
/** Helper function to dump the CSS AST. */
-String treeToDebugString(styleSheet, [bool useSpan = false]) {
+String treeToDebugString(StyleSheet styleSheet, [bool useSpan = false]) {
var to = new TreeOutput();
new _TreePrinter(to, useSpan)..visitTree(styleSheet);
return to.toString();
@@ -15,11 +15,11 @@ String treeToDebugString(styleSheet, [bool useSpan = false]) {
/** Tree dump for debug output of the CSS AST. */
class _TreePrinter extends Visitor {
- var output;
+ final TreeOutput output;
final bool useSpan;
_TreePrinter(this.output, this.useSpan) { output.printer = this; }
- void visitTree(tree) => visitStylesheet(tree);
+ void visitTree(StyleSheet tree) => visitStylesheet(tree);
void heading(String heading, node) {
if (useSpan) {
@@ -66,7 +66,7 @@ class _TreePrinter extends Visitor {
}
void visitMediaQueries(MediaQuery query) {
- output.headeing('MediaQueries');
+ output.heading('MediaQueries');
output.writeValue('unary', query.unary);
output.writeValue('media type', query.mediaType);
output.writeNodeList('media expressions', query.expressions);
@@ -111,7 +111,7 @@ class _TreePrinter extends Visitor {
heading('KeyFrameDirective', node);
output.depth++;
output.writeValue('keyframe', node.keyFrameName);
- output.writeValue('name', node._name);
+ output.writeValue('name', node.name);
output.writeNodeList('blocks', node._blocks);
output.depth--;
}
@@ -244,7 +244,7 @@ class _TreePrinter extends Visitor {
heading('Selector', node);
output.depth++;
output.writeNodeList('simpleSelectorsSequences',
- node._simpleSelectorSequences);
+ node.simpleSelectorSequences);
output.depth--;
}
« no previous file with comments | « pkg/csslib/lib/src/tree_base.dart ('k') | pkg/csslib/lib/src/validate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698