5
5
// DO NOT EDIT. This file was generated from async_evaluate.dart.
6
6
// See tool/grind/synchronize.dart for details.
7
7
//
8
- // Checksum: 05d8589b401932198e1f52434066ea4d6cbf3756
8
+ // Checksum: 6e5710daa106ed0b9b684af8bc61ce9cc233a10b
9
9
//
10
10
// ignore_for_file: unused_import
11
11
@@ -187,6 +187,10 @@ final class _EvaluateVisitor
187
187
/// Whether to track source map information.
188
188
final bool _sourceMap;
189
189
190
+ /// The unique compile context for tracking if [SassFunction] s and
191
+ /// [SassMixin] s belongs to the current compilation or not.
192
+ final Object _compileContext = Object ();
193
+
190
194
/// The current lexical environment.
191
195
Environment _environment;
192
196
@@ -441,7 +445,8 @@ final class _EvaluateVisitor
441
445
442
446
return SassMap ({
443
447
for (var (name, value) in module.functions.pairs)
444
- SassString (name): SassFunction (value),
448
+ SassString (name):
449
+ SassFunction .withCompileContext (value, _compileContext),
445
450
});
446
451
}, url: "sass:meta" ),
447
452
@@ -454,7 +459,8 @@ final class _EvaluateVisitor
454
459
455
460
return SassMap ({
456
461
for (var (name, value) in module.mixins.pairs)
457
- SassString (name): SassMixin (value),
462
+ SassString (name):
463
+ SassMixin .withCompileContext (value, _compileContext),
458
464
});
459
465
}, url: "sass:meta" ),
460
466
@@ -470,7 +476,8 @@ final class _EvaluateVisitor
470
476
if (module != null ) {
471
477
throw r"$css and $module may not both be passed at once." ;
472
478
}
473
- return SassFunction (PlainCssCallable (name.text));
479
+ return SassFunction .withCompileContext (
480
+ PlainCssCallable (name.text), _compileContext);
474
481
}
475
482
476
483
var callable = _addExceptionSpan (_callableNode! , () {
@@ -485,7 +492,7 @@ final class _EvaluateVisitor
485
492
});
486
493
if (callable == null ) throw "Function not found: $name " ;
487
494
488
- return SassFunction (callable);
495
+ return SassFunction . withCompileContext (callable, _compileContext );
489
496
},
490
497
url: "sass:meta" ,
491
498
),
@@ -505,7 +512,7 @@ final class _EvaluateVisitor
505
512
);
506
513
if (callable == null ) throw "Mixin not found: $name " ;
507
514
508
- return SassMixin (callable);
515
+ return SassMixin . withCompileContext (callable, _compileContext );
509
516
}, url: "sass:meta" ),
510
517
511
518
BuiltInCallable .function ("call" , r"$function, $args..." , (
@@ -549,7 +556,10 @@ final class _EvaluateVisitor
549
556
return expression.accept (this );
550
557
}
551
558
552
- var callable = function.assertFunction ("function" ).callable;
559
+ var callable = function
560
+ .assertFunction ("function" )
561
+ .assertCompileContext (_compileContext)
562
+ .callable;
553
563
// ignore: unnecessary_type_check
554
564
if (callable is Callable ) {
555
565
return _runFunctionCallable (
@@ -616,7 +626,10 @@ final class _EvaluateVisitor
616
626
rest: ValueExpression (args, callableNode.span),
617
627
);
618
628
619
- var callable = mixin .assertMixin ("mixin" ).callable;
629
+ var callable = mixin
630
+ .assertMixin ("mixin" )
631
+ .assertCompileContext (_compileContext)
632
+ .callable;
620
633
var content = _environment.content;
621
634
622
635
// ignore: unnecessary_type_check
0 commit comments