From 507ae1790af99139247a8b9e5b88319ba3e28c38 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Sat, 3 Sep 2016 06:48:02 -0700 Subject: [PATCH] ExtendRule -> Extend --- lib/src/ast/sass.dart | 2 +- .../ast/sass/statement/{extend_rule.dart => extend.dart} | 6 +++--- lib/src/parser.dart | 4 ++-- lib/src/visitor/interface/statement.dart | 2 +- lib/src/visitor/perform.dart | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename lib/src/ast/sass/statement/{extend_rule.dart => extend.dart} (81%) diff --git a/lib/src/ast/sass.dart b/lib/src/ast/sass.dart index b302e064..d06e7672 100644 --- a/lib/src/ast/sass.dart +++ b/lib/src/ast/sass.dart @@ -27,7 +27,7 @@ export 'sass/statement/at_rule.dart'; export 'sass/statement/comment.dart'; export 'sass/statement/content.dart'; export 'sass/statement/declaration.dart'; -export 'sass/statement/extend_rule.dart'; +export 'sass/statement/extend.dart'; export 'sass/statement/function_declaration.dart'; export 'sass/statement/if.dart'; export 'sass/statement/import.dart'; diff --git a/lib/src/ast/sass/statement/extend_rule.dart b/lib/src/ast/sass/statement/extend.dart similarity index 81% rename from lib/src/ast/sass/statement/extend_rule.dart rename to lib/src/ast/sass/statement/extend.dart index 89140f58..2a2591bc 100644 --- a/lib/src/ast/sass/statement/extend_rule.dart +++ b/lib/src/ast/sass/statement/extend.dart @@ -8,15 +8,15 @@ import '../../../visitor/interface/statement.dart'; import '../interpolation.dart'; import '../statement.dart'; -class ExtendRule implements Statement { +class Extend implements Statement { final Interpolation selector; final FileSpan span; - ExtendRule(this.selector, this.span); + Extend(this.selector, this.span); /*=T*/ accept/**/(StatementVisitor/**/ visitor) => - visitor.visitExtendRule(this); + visitor.visitExtend(this); String toString() => "@extend $selector"; } diff --git a/lib/src/parser.dart b/lib/src/parser.dart index a007784c..2418ee5f 100644 --- a/lib/src/parser.dart +++ b/lib/src/parser.dart @@ -393,8 +393,8 @@ class Parser { return null; } - ExtendRule _extend(LineScannerState start) => - new ExtendRule(_almostAnyValue(), _scanner.spanFrom(start)); + Extend _extend(LineScannerState start) => + new Extend(_almostAnyValue(), _scanner.spanFrom(start)); FunctionDeclaration _functionDeclaration(LineScannerState start) { var name = _identifier(); diff --git a/lib/src/visitor/interface/statement.dart b/lib/src/visitor/interface/statement.dart index 45d7222b..4e3804ab 100644 --- a/lib/src/visitor/interface/statement.dart +++ b/lib/src/visitor/interface/statement.dart @@ -10,7 +10,7 @@ abstract class StatementVisitor { T visitComment(Comment node); T visitContent(Content node); T visitDeclaration(Declaration node); - T visitExtendRule(ExtendRule node); + T visitExtend(Extend node); T visitFunctionDeclaration(FunctionDeclaration node); T visitIf(If node); T visitImport(Import node); diff --git a/lib/src/visitor/perform.dart b/lib/src/visitor/perform.dart index d24a57cd..9569cb4d 100644 --- a/lib/src/visitor/perform.dart +++ b/lib/src/visitor/perform.dart @@ -197,7 +197,7 @@ class PerformVisitor implements StatementVisitor, ExpressionVisitor { } } - void visitExtendRule(ExtendRule node) { + void visitExtend(Extend node) { if (_selector == null || _declarationName != null) { throw node.span.message("@extend may only be used within style rules."); }