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

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

Issue 23819036: Support for @mixin, @include and @extend (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: mixin w/o parameters Created 7 years, 3 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
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 24cca64f1fd741c168c37853f9186d88c781a21b..ce528409c2730031bce352e44f5de289ba7c0744 100644
--- a/pkg/csslib/lib/src/tree_printer.dart
+++ b/pkg/csslib/lib/src/tree_printer.dart
@@ -141,7 +141,38 @@ class _TreePrinter extends Visitor {
void visitVarDefinitionDirective(VarDefinitionDirective node) {
heading('Less variable definition', node);
+ output.depth++;
visitVarDefinition(node.def);
+ output.depth--;
+ }
+
+ void visitMixinRulesetDirective(MixinRulesetDirective node) {
+ heading('Mixin top-level ${node.name}', node);
+ output.depth++;
+ _visitNodeList(node.rulesets);
+ output.depth--;
+ }
+
+ void visitMixinDeclarationDirective(MixinDeclarationDirective node) {
+ heading('Mixin declaration ${node.name}', node);
+ output.depth++;
+ visitDeclarationGroup(node.declarations);
+ output.depth--;
+ }
+
+ /**
+ * Added optional newLine for handling @include at top-level vs/ inside of
+ * a declaration group.
+ */
+ void visitIncludeDirective(IncludeDirective node) {
+ heading('IncludeDirective ${node.name}', node);
+ }
+
+ void visitIncludeMixinAtDeclaration(IncludeMixinAtDeclaration node) {
+ heading('IncludeMixinAtDeclaration ${node.include.name}', node);
+ output.depth++;
+ visitIncludeDirective(node.include);
+ output.depth--;
}
void visitRuleSet(RuleSet node) {

Powered by Google App Engine
This is Rietveld 408576698