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

Side by Side Diff: pkg/csslib/lib/src/tree_printer.dart

Issue 60983003: pkg/csslib: fixed analysis error, more cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/csslib/lib/src/tree_base.dart ('k') | pkg/csslib/lib/visitor.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 super.visitKeyFrameBlock(node); 122 super.visitKeyFrameBlock(node);
123 output.depth--; 123 output.depth--;
124 } 124 }
125 125
126 void visitFontFaceDirective(FontFaceDirective node) { 126 void visitFontFaceDirective(FontFaceDirective node) {
127 // TODO(terry): To Be Implemented 127 // TODO(terry): To Be Implemented
128 } 128 }
129 129
130 void visitStyletDirective(StyletDirective node) { 130 void visitStyletDirective(StyletDirective node) {
131 heading('StyletDirective', node); 131 heading('StyletDirective', node);
132 output.writeValue('dartClassName', node._dartClassName); 132 output.writeValue('dartClassName', node.dartClassName);
133 output.depth++; 133 output.depth++;
134 output.writeNodeList('rulesets', node._rulesets); 134 output.writeNodeList('rulesets', node.rulesets);
135 output.depth--; 135 output.depth--;
136 } 136 }
137 137
138 void visitNamespaceDirective(NamespaceDirective node) { 138 void visitNamespaceDirective(NamespaceDirective node) {
139 heading('NamespaceDirective', node); 139 heading('NamespaceDirective', node);
140 output.depth++; 140 output.depth++;
141 output.writeValue('prefix', node._prefix); 141 output.writeValue('prefix', node._prefix);
142 output.writeValue('uri', node._uri); 142 output.writeValue('uri', node._uri);
143 output.depth--; 143 output.depth--;
144 } 144 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void visitRuleSet(RuleSet node) { 193 void visitRuleSet(RuleSet node) {
194 heading('Ruleset', node); 194 heading('Ruleset', node);
195 output.depth++; 195 output.depth++;
196 super.visitRuleSet(node); 196 super.visitRuleSet(node);
197 output.depth--; 197 output.depth--;
198 } 198 }
199 199
200 void visitDeclarationGroup(DeclarationGroup node) { 200 void visitDeclarationGroup(DeclarationGroup node) {
201 heading('DeclarationGroup', node); 201 heading('DeclarationGroup', node);
202 output.depth++; 202 output.depth++;
203 output.writeNodeList('declarations', node._declarations); 203 output.writeNodeList('declarations', node.declarations);
204 output.depth--; 204 output.depth--;
205 } 205 }
206 206
207 void visitMarginGroup(MarginGroup node) { 207 void visitMarginGroup(MarginGroup node) {
208 heading('MarginGroup', node); 208 heading('MarginGroup', node);
209 output.depth++; 209 output.depth++;
210 output.writeValue('@directive', node.margin_sym); 210 output.writeValue('@directive', node.margin_sym);
211 output.writeNodeList('declarations', node._declarations); 211 output.writeNodeList('declarations', node.declarations);
212 output.depth--; 212 output.depth--;
213 } 213 }
214 214
215 void visitDeclaration(Declaration node) { 215 void visitDeclaration(Declaration node) {
216 heading('Declaration', node); 216 heading('Declaration', node);
217 output.depth++; 217 output.depth++;
218 if (node.isIE7) output.write('IE7 property'); 218 if (node.isIE7) output.write('IE7 property');
219 output.write('property'); 219 output.write('property');
220 super.visitDeclaration(node); 220 super.visitDeclaration(node);
221 output.writeNode('expression', node._expression); 221 output.writeNode('expression', node._expression);
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 } 549 }
550 550
551 void visitPaddingExpression(PaddingExpression node) { 551 void visitPaddingExpression(PaddingExpression node) {
552 heading('Dart Style PaddingExpression', node); 552 heading('Dart Style PaddingExpression', node);
553 } 553 }
554 554
555 void visitWidthExpression(WidthExpression node) { 555 void visitWidthExpression(WidthExpression node) {
556 heading('Dart Style WidthExpression', node); 556 heading('Dart Style WidthExpression', node);
557 } 557 }
558 } 558 }
OLDNEW
« no previous file with comments | « pkg/csslib/lib/src/tree_base.dart ('k') | pkg/csslib/lib/visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698