@@ -20,6 +20,7 @@ import '../visitor/interface/expression.dart';
20
20
import '../visitor/interface/statement.dart' ;
21
21
import 'reflection.dart' ;
22
22
import 'set.dart' ;
23
+ import 'utils.dart' ;
23
24
import 'visitor/expression.dart' ;
24
25
import 'visitor/statement.dart' ;
25
26
@@ -32,14 +33,16 @@ class ParserExports {
32
33
required Function toCssIdentifier,
33
34
required Function createExpressionVisitor,
34
35
required Function createStatementVisitor,
35
- required Function setToJS});
36
+ required Function setToJS,
37
+ required Function mapToRecord});
36
38
37
39
external set parse (Function function);
38
40
external set parseIdentifier (Function function);
39
41
external set toCssIdentifier (Function function);
40
42
external set createStatementVisitor (Function function);
41
43
external set createExpressionVisitor (Function function);
42
44
external set setToJS (Function function);
45
+ external set mapToRecord (Function function);
43
46
}
44
47
45
48
/// An empty interpolation, used to initialize empty AST entries to modify their
@@ -61,7 +64,8 @@ ParserExports loadParserExports() {
61
64
(JSExpressionVisitorObject inner) => JSExpressionVisitor (inner)),
62
65
createStatementVisitor: allowInterop (
63
66
(JSStatementVisitorObject inner) => JSStatementVisitor (inner)),
64
- setToJS: allowInterop ((Set <Object ?> set ) => JSSet ([...set ])));
67
+ setToJS: allowInterop ((Set <Object ?> set ) => JSSet ([...set ])),
68
+ mapToRecord: allowInterop (mapToObject));
65
69
}
66
70
67
71
/// Modifies the prototypes of the Sass AST classes to provide access to JS.
@@ -88,6 +92,10 @@ void _updateAstPrototypes() {
88
92
'accept' ,
89
93
(Expression self, ExpressionVisitor <Object ?> visitor) =>
90
94
self.accept (visitor));
95
+ var arguments = ArgumentList ([], {}, bogusSpan);
96
+ var include = IncludeRule ('a' , arguments, bogusSpan);
97
+ getJSClass (include)
98
+ .defineGetter ('arguments' , (IncludeRule self) => self.arguments);
91
99
92
100
_addSupportsConditionToInterpolation ();
93
101
0 commit comments