ExtendRule -> Extend

This commit is contained in:
Natalie Weizenbaum 2016-09-03 06:48:02 -07:00 committed by Natalie Weizenbaum
parent 3fb3ae1f3b
commit 507ae1790a
5 changed files with 8 additions and 8 deletions

View File

@ -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';

View File

@ -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/*<T>*/(StatementVisitor/*<T>*/ visitor) =>
visitor.visitExtendRule(this);
visitor.visitExtend(this);
String toString() => "@extend $selector";
}

View File

@ -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();

View File

@ -10,7 +10,7 @@ abstract class StatementVisitor<T> {
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);

View File

@ -197,7 +197,7 @@ class PerformVisitor implements StatementVisitor, ExpressionVisitor<Value> {
}
}
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.");
}