-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2317 from sass/more-statements
Add more statement parsing for `sass-parser`
- Loading branch information
Showing
33 changed files
with
2,860 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
pkg/sass-parser/lib/src/statement/__snapshots__/css-comment.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`a CSS-style comment toJSON 1`] = ` | ||
{ | ||
"inputs": [ | ||
{ | ||
"css": "/* foo */", | ||
"hasBOM": false, | ||
"id": "<input css _____>", | ||
}, | ||
], | ||
"raws": { | ||
"closed": true, | ||
"left": " ", | ||
"right": " ", | ||
}, | ||
"sassType": "comment", | ||
"source": <1:1-1:10 in 0>, | ||
"text": "foo", | ||
"textInterpolation": <foo>, | ||
"type": "comment", | ||
} | ||
`; |
20 changes: 20 additions & 0 deletions
20
pkg/sass-parser/lib/src/statement/__snapshots__/debug-rule.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`a @debug rule toJSON 1`] = ` | ||
{ | ||
"debugExpression": <foo>, | ||
"inputs": [ | ||
{ | ||
"css": "@debug foo", | ||
"hasBOM": false, | ||
"id": "<input css _____>", | ||
}, | ||
], | ||
"name": "debug", | ||
"params": "foo", | ||
"raws": {}, | ||
"sassType": "debug-rule", | ||
"source": <1:1-1:11 in 0>, | ||
"type": "atrule", | ||
} | ||
`; |
25 changes: 25 additions & 0 deletions
25
pkg/sass-parser/lib/src/statement/__snapshots__/each-rule.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`an @each rule toJSON 1`] = ` | ||
{ | ||
"eachExpression": <baz>, | ||
"inputs": [ | ||
{ | ||
"css": "@each $foo, $bar in baz {}", | ||
"hasBOM": false, | ||
"id": "<input css _____>", | ||
}, | ||
], | ||
"name": "each", | ||
"nodes": [], | ||
"params": "$foo, $bar in baz", | ||
"raws": {}, | ||
"sassType": "each-rule", | ||
"source": <1:1-1:27 in 0>, | ||
"type": "atrule", | ||
"variables": [ | ||
"foo", | ||
"bar", | ||
], | ||
} | ||
`; |
20 changes: 20 additions & 0 deletions
20
pkg/sass-parser/lib/src/statement/__snapshots__/error-rule.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`a @error rule toJSON 1`] = ` | ||
{ | ||
"errorExpression": <foo>, | ||
"inputs": [ | ||
{ | ||
"css": "@error foo", | ||
"hasBOM": false, | ||
"id": "<input css _____>", | ||
}, | ||
], | ||
"name": "error", | ||
"params": "foo", | ||
"raws": {}, | ||
"sassType": "error-rule", | ||
"source": <1:1-1:11 in 0>, | ||
"type": "atrule", | ||
} | ||
`; |
24 changes: 24 additions & 0 deletions
24
pkg/sass-parser/lib/src/statement/__snapshots__/for-rule.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`an @for rule toJSON 1`] = ` | ||
{ | ||
"fromExpression": <bar>, | ||
"inputs": [ | ||
{ | ||
"css": "@for $foo from bar to baz {}", | ||
"hasBOM": false, | ||
"id": "<input css _____>", | ||
}, | ||
], | ||
"name": "for", | ||
"nodes": [], | ||
"params": "$foo from bar to baz", | ||
"raws": {}, | ||
"sassType": "for-rule", | ||
"source": <1:1-1:29 in 0>, | ||
"to": "to", | ||
"toExpression": <baz>, | ||
"type": "atrule", | ||
"variable": "foo", | ||
} | ||
`; |
Oops, something went wrong.