mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 13:51:31 +01:00
ExtendRule -> Extend
This commit is contained in:
parent
3fb3ae1f3b
commit
507ae1790a
@ -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';
|
||||
|
@ -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";
|
||||
}
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user