OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library csslib.visitor; | 5 library csslib.visitor; |
6 | 6 |
7 import 'package:source_maps/span.dart' show Span; | 7 import 'package:source_maps/span.dart' show Span; |
8 import 'parser.dart'; | 8 import 'parser.dart'; |
9 | 9 |
10 part 'src/css_printer.dart'; | 10 part 'src/css_printer.dart'; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 void visitCharsetDirective(CharsetDirective node) { } | 174 void visitCharsetDirective(CharsetDirective node) { } |
175 | 175 |
176 void visitImportDirective(ImportDirective node) { | 176 void visitImportDirective(ImportDirective node) { |
177 for (var mediaQuery in node.mediaQueries) { | 177 for (var mediaQuery in node.mediaQueries) { |
178 visitMediaQuery(mediaQuery); | 178 visitMediaQuery(mediaQuery); |
179 } | 179 } |
180 } | 180 } |
181 | 181 |
182 void visitKeyFrameDirective(KeyFrameDirective node) { | 182 void visitKeyFrameDirective(KeyFrameDirective node) { |
183 visitIdentifier(node._name); | 183 visitIdentifier(node.name); |
184 _visitNodeList(node._blocks); | 184 _visitNodeList(node._blocks); |
185 } | 185 } |
186 | 186 |
187 void visitKeyFrameBlock(KeyFrameBlock node) { | 187 void visitKeyFrameBlock(KeyFrameBlock node) { |
188 visitExpressions(node._blockSelectors); | 188 visitExpressions(node._blockSelectors); |
189 visitDeclarationGroup(node._declarations); | 189 visitDeclarationGroup(node._declarations); |
190 } | 190 } |
191 | 191 |
192 void visitFontFaceDirective(FontFaceDirective node) { | 192 void visitFontFaceDirective(FontFaceDirective node) { |
193 visitDeclarationGroup(node._declarations); | 193 visitDeclarationGroup(node._declarations); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 251 |
252 void visitExtendDeclaration(ExtendDeclaration node) { | 252 void visitExtendDeclaration(ExtendDeclaration node) { |
253 _visitNodeList(node.selectors); | 253 _visitNodeList(node.selectors); |
254 } | 254 } |
255 | 255 |
256 void visitSelectorGroup(SelectorGroup node) { | 256 void visitSelectorGroup(SelectorGroup node) { |
257 _visitNodeList(node.selectors); | 257 _visitNodeList(node.selectors); |
258 } | 258 } |
259 | 259 |
260 void visitSelector(Selector node) { | 260 void visitSelector(Selector node) { |
261 _visitNodeList(node._simpleSelectorSequences); | 261 _visitNodeList(node.simpleSelectorSequences); |
262 } | 262 } |
263 | 263 |
264 void visitSimpleSelectorSequence(SimpleSelectorSequence node) { | 264 void visitSimpleSelectorSequence(SimpleSelectorSequence node) { |
265 var selector = node._selector; | 265 var selector = node.simpleSelector; |
266 if (selector is NamespaceSelector) { | 266 if (selector is NamespaceSelector) { |
267 visitNamespaceSelector(selector); | 267 visitNamespaceSelector(selector); |
268 } else if (selector is ElementSelector) { | 268 } else if (selector is ElementSelector) { |
269 visitElementSelector(selector); | 269 visitElementSelector(selector); |
270 } else if (selector is IdSelector) { | 270 } else if (selector is IdSelector) { |
271 visitIdSelector(selector); | 271 visitIdSelector(selector); |
272 } else if (selector is ClassSelector) { | 272 } else if (selector is ClassSelector) { |
273 visitClassSelector(selector); | 273 visitClassSelector(selector); |
274 } else if (selector is PseudoClassFunctionSelector) { | 274 } else if (selector is PseudoClassFunctionSelector) { |
275 visitPseudoClassFunctionSelector(selector); | 275 visitPseudoClassFunctionSelector(selector); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 void visitPaddingExpression(PaddingExpression node) { | 475 void visitPaddingExpression(PaddingExpression node) { |
476 // TODO(terry): TBD | 476 // TODO(terry): TBD |
477 throw UnimplementedError; | 477 throw UnimplementedError; |
478 } | 478 } |
479 | 479 |
480 void visitWidthExpression(WidthExpression node) { | 480 void visitWidthExpression(WidthExpression node) { |
481 // TODO(terry): TBD | 481 // TODO(terry): TBD |
482 throw UnimplementedError; | 482 throw UnimplementedError; |
483 } | 483 } |
484 } | 484 } |
OLD | NEW |