Skip to content

Commit cbe1fcb

Browse files
authored
Add support for "@use with" (#1412)
1 parent 88f14b9 commit cbe1fcb

File tree

3 files changed

+744
-0
lines changed

3 files changed

+744
-0
lines changed

spec/directives/use/error/syntax.hrx

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,3 +418,108 @@ Error: Private members can't be accessed from outside their modules.
418418
| ^^^^^^^
419419
'
420420
input.scss 4:21 root stylesheet
421+
422+
<===>
423+
================================================================================
424+
<===> with/empty/input.scss
425+
@use "other" with ();
426+
427+
<===> with/empty/error
428+
Error: expected "$".
429+
,
430+
1 | @use "other" with ();
431+
| ^
432+
'
433+
input.scss 1:20 root stylesheet
434+
435+
<===>
436+
================================================================================
437+
<===> with/missing_keyword/input.scss
438+
@use "other" with (a);
439+
440+
<===> with/missing_keyword/error
441+
Error: expected "$".
442+
,
443+
1 | @use "other" with (a);
444+
| ^
445+
'
446+
input.scss 1:20 root stylesheet
447+
448+
<===>
449+
================================================================================
450+
<===> with/missing_value/input.scss
451+
@use "other" with ($a);
452+
453+
<===> with/missing_value/error
454+
Error: expected ":".
455+
,
456+
1 | @use "other" with ($a);
457+
| ^
458+
'
459+
input.scss 1:22 root stylesheet
460+
461+
<===>
462+
================================================================================
463+
<===> with/space_after_dollar/input.scss
464+
@use "other" with ($ a: b);
465+
466+
<===> with/space_after_dollar/error
467+
Error: Expected identifier.
468+
,
469+
1 | @use "other" with ($ a: b);
470+
| ^
471+
'
472+
input.scss 1:21 root stylesheet
473+
474+
<===>
475+
================================================================================
476+
<===> with/namespace_variable/input.scss
477+
@use "other" with ($a.b: c);
478+
479+
<===> with/namespace_variable/error
480+
Error: expected ":".
481+
,
482+
1 | @use "other" with ($a.b: c);
483+
| ^
484+
'
485+
input.scss 1:22 root stylesheet
486+
487+
<===>
488+
================================================================================
489+
<===> with/extra_comma/input.scss
490+
@use "other" with ($a,,);
491+
492+
<===> with/extra_comma/error
493+
Error: expected ":".
494+
,
495+
1 | @use "other" with ($a,,);
496+
| ^
497+
'
498+
input.scss 1:22 root stylesheet
499+
500+
<===>
501+
================================================================================
502+
<===> with/no_arguments/input.scss
503+
@use "other" with;
504+
505+
<===> with/no_arguments/error
506+
Error: expected "(".
507+
,
508+
1 | @use "other" with;
509+
| ^
510+
'
511+
input.scss 1:18 root stylesheet
512+
513+
<===>
514+
================================================================================
515+
<===> with/before_as/input.scss
516+
@use "other" with ($a: b) as c;
517+
518+
519+
<===> with/before_as/error
520+
Error: expected ";".
521+
,
522+
1 | @use "other" with ($a: b) as c;
523+
| ^
524+
'
525+
input.scss 1:27 root stylesheet

0 commit comments

Comments
 (0)