@@ -17,22 +17,19 @@ class BuiltInModule<T extends AsyncCallable> implements Module<T> {
17
17
final Uri url;
18
18
final Map <String , T > functions;
19
19
final Map <String , T > mixins;
20
- final Map <String , Value > variables;
21
20
22
21
List <Module <T >> get upstream => const [];
22
+ Map <String , Value > get variables => const {};
23
23
Map <String , AstNode > get variableNodes => const {};
24
24
Extender get extender => Extender .empty;
25
25
CssStylesheet get css => CssStylesheet .empty (url: url);
26
26
bool get transitivelyContainsCss => false ;
27
27
bool get transitivelyContainsExtensions => false ;
28
28
29
- BuiltInModule (String name,
30
- {Iterable <T > functions, Iterable <T > mixins, Map <String , Value > variables})
29
+ BuiltInModule (String name, {Iterable <T > functions, Iterable <T > mixins})
31
30
: url = Uri (scheme: "sass" , path: name),
32
31
functions = _callableMap (functions),
33
- mixins = _callableMap (mixins),
34
- variables =
35
- variables == null ? const {} : UnmodifiableMapView (variables);
32
+ mixins = _callableMap (mixins);
36
33
37
34
/// Returns a map from [callables] ' names to their values.
38
35
static Map <String , T > _callableMap <T extends AsyncCallable >(
@@ -43,10 +40,7 @@ class BuiltInModule<T extends AsyncCallable> implements Module<T> {
43
40
{for (var callable in callables) callable.name: callable}));
44
41
45
42
void setVariable (String name, Value value, AstNode nodeWithSpan) {
46
- if (! variables.containsKey (name)) {
47
- throw SassScriptException ("Undefined variable." );
48
- }
49
- throw SassScriptException ("Cannot modify built-in variable." );
43
+ throw SassScriptException ("Undefined variable." );
50
44
}
51
45
52
46
Module <T > cloneCss () => this ;
0 commit comments