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

Unified Diff: pkg/csslib/lib/visitor.dart

Issue 23819036: Support for @mixin, @include and @extend (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: All changes ready to commit Created 7 years, 2 months 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_printer.dart ('k') | pkg/csslib/test/big_1_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/csslib/lib/visitor.dart
diff --git a/pkg/csslib/lib/visitor.dart b/pkg/csslib/lib/visitor.dart
index d2f24c9b6f9cc231358c7fd102a757fd1af17ef1..91fa7140293b7650b3e88a82cb121667d0341996 100644
--- a/pkg/csslib/lib/visitor.dart
+++ b/pkg/csslib/lib/visitor.dart
@@ -16,6 +16,7 @@ abstract class VisitorBase {
void visitCssComment(CssComment node);
void visitCommentDefinition(CommentDefinition node);
void visitStyleSheet(StyleSheet node);
+ void visitNoOp(NoOp node);
void visitTopLevelProduction(TopLevelProduction node);
void visitDirective(Directive node);
void visitMediaExpression(MediaExpression node);
@@ -31,12 +32,19 @@ abstract class VisitorBase {
void visitStyletDirective(StyletDirective node);
void visitNamespaceDirective(NamespaceDirective node);
void visitVarDefinitionDirective(VarDefinitionDirective node);
+ void visitMixinDefinition(MixinDefinition node);
+ void visitMixinRulesetDirective(MixinRulesetDirective node);
+ void visitMixinDeclarationDirective(MixinDeclarationDirective node);
+ void visitIncludeDirective(IncludeDirective node);
+ void visitContentDirective(ContentDirective node);
void visitRuleSet(RuleSet node);
void visitDeclarationGroup(DeclarationGroup node);
void visitMarginGroup(DeclarationGroup node);
void visitDeclaration(Declaration node);
void visitVarDefinition(VarDefinition node);
+ void visitIncludeMixinAtDeclaration(IncludeMixinAtDeclaration node);
+ void visitExtendDeclaration(ExtendDeclaration node);
void visitSelectorGroup(SelectorGroup node);
void visitSelector(Selector node);
void visitSimpleSelectorSequence(SimpleSelectorSequence node);
@@ -118,6 +126,8 @@ class Visitor implements VisitorBase {
_visitNodeList(ss.topLevels);
}
+ void visitNoOp(NoOp node) { }
+
void visitTopLevelProduction(TopLevelProduction node) { }
void visitDirective(Directive node) { }
@@ -193,6 +203,27 @@ class Visitor implements VisitorBase {
visitVarDefinition(node.def);
}
+ void visitMixinRulesetDirective(MixinRulesetDirective node) {
+ _visitNodeList(node.rulesets);
+ }
+
+ void visitMixinDefinition(MixinDefinition node) { }
+
+ void visitMixinDeclarationDirective(MixinDeclarationDirective node) {
+ visitDeclarationGroup(node.declarations);
+ }
+
+ void visitIncludeDirective(IncludeDirective node) {
+ for (var index = 0; index < node.args.length; index++) {
+ var param = node.args[index];
+ _visitNodeList(param);
+ }
+ }
+
+ void visitContentDirective(ContentDirective node) {
+ // TODO(terry): TBD
+ }
+
void visitRuleSet(RuleSet node) {
visitSelectorGroup(node._selectorGroup);
visitDeclarationGroup(node._declarationGroup);
@@ -214,6 +245,14 @@ class Visitor implements VisitorBase {
if (node._expression != null) node._expression.visit(this);
}
+ void visitIncludeMixinAtDeclaration(IncludeMixinAtDeclaration node) {
+ visitIncludeDirective(node.include);
+ }
+
+ void visitExtendDeclaration(ExtendDeclaration node) {
+ _visitNodeList(node.selectors);
+ }
+
void visitSelectorGroup(SelectorGroup node) {
_visitNodeList(node.selectors);
}
« no previous file with comments | « pkg/csslib/lib/src/tree_printer.dart ('k') | pkg/csslib/test/big_1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698