Skip to content

Commit

Permalink
Produce better stack traces for syntax errors loaded via import/use (#…
Browse files Browse the repository at this point in the history
…1404)

Instead of using "root stylesheet" as the member name for the loaded
files, this now uses "@import" or "@use".
  • Loading branch information
nex3 authored Jun 19, 2019
1 parent 38d6195 commit 69252ac
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 49 deletions.
50 changes: 25 additions & 25 deletions spec/css/plain/error/expression.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Error: This function isn't allowed in plain CSS.
2 | x: index(1 2 3, 1);
| ^^^^^^^^^^^^^^^
'
plain.css 2:6 root stylesheet
plain.css 2:6 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -29,7 +29,7 @@ Error: expected ")".
2 | x: hsl(0, 100%, 50%...);
| ^
'
plain.css 2:22 root stylesheet
plain.css 2:22 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -47,7 +47,7 @@ Error: Sass variables aren't allowed in plain CSS.
2 | x: hsl(0, 100%, $lightness: 50%);
| ^^^^^^^^^^
'
plain.css 2:19 root stylesheet
plain.css 2:19 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -65,7 +65,7 @@ Error: Parentheses aren't allowed in plain CSS.
2 | x: ();
| ^
'
plain.css 2:6 root stylesheet
plain.css 2:6 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -83,7 +83,7 @@ Error: Parentheses aren't allowed in plain CSS.
2 | x: (,);
| ^
'
plain.css 2:6 root stylesheet
plain.css 2:6 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -101,7 +101,7 @@ Error: Parentheses aren't allowed in plain CSS.
2 | x: (y: z);
| ^
'
plain.css 2:6 root stylesheet
plain.css 2:6 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -119,7 +119,7 @@ Error: Parentheses aren't allowed in plain CSS.
2 | x: (y);
| ^
'
plain.css 2:6 root stylesheet
plain.css 2:6 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -137,7 +137,7 @@ Error: The parent selector isn't allowed in plain CSS.
2 | x: &;
| ^
'
plain.css 2:6 root stylesheet
plain.css 2:6 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -155,7 +155,7 @@ Error: Sass variables aren't allowed in plain CSS.
2 | x: $var;
| ^^^^
'
plain.css 2:6 root stylesheet
plain.css 2:6 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -171,7 +171,7 @@ Error: Sass variables aren't allowed in plain CSS.
1 | $var: value;
| ^^^^
'
plain.css 1:1 root stylesheet
plain.css 1:1 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -189,7 +189,7 @@ Error: Interpolation isn't allowed in plain CSS.
2 | w: calc(#{1px} + 10%);
| ^^^^^^
'
plain.css 2:11 root stylesheet
plain.css 2:11 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -207,7 +207,7 @@ Error: Interpolation isn't allowed in plain CSS.
2 | w: x#{y}z;
| ^^^^
'
plain.css 2:7 root stylesheet
plain.css 2:7 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -225,7 +225,7 @@ Error: Interpolation isn't allowed in plain CSS.
2 | w: "x#{y}z";
| ^^^^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -243,7 +243,7 @@ Error: Interpolation isn't allowed in plain CSS.
2 | w: #{x};
| ^^^^
'
plain.css 2:6 root stylesheet
plain.css 2:6 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -261,7 +261,7 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y + z;
| ^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -279,7 +279,7 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y - z;
| ^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -297,7 +297,7 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y * z;
| ^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -315,7 +315,7 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y % z;
| ^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -333,7 +333,7 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y < z;
| ^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -351,7 +351,7 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y <= z;
| ^^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -369,7 +369,7 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y > z;
| ^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -387,7 +387,7 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y >= z;
| ^^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -405,7 +405,7 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y == z;
| ^^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -423,7 +423,7 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y != z;
| ^^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet

<===>
Expand All @@ -443,5 +443,5 @@ Error: Silent comments aren't allowed in plain CSS.
2 | b: c // d
| ^^^^
'
plain.css 2:8 root stylesheet
plain.css 2:8 @import
input.scss 1:9 root stylesheet
Loading

0 comments on commit 69252ac

Please sign in to comment.