-
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 #2439 from sass/function
Add sass-parser support for `@function`
- Loading branch information
Showing
25 changed files
with
2,735 additions
and
164 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
20 changes: 20 additions & 0 deletions
20
pkg/sass-parser/lib/src/__snapshots__/parameter-list.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 parameter list toJSON 1`] = ` | ||
{ | ||
"inputs": [ | ||
{ | ||
"css": "@function x($foo, $bar...) {}", | ||
"hasBOM": false, | ||
"id": "<input css _____>", | ||
}, | ||
], | ||
"nodes": [ | ||
<$foo>, | ||
], | ||
"raws": {}, | ||
"restParameter": "bar", | ||
"sassType": "parameter-list", | ||
"source": <1:12-1:27 in 0>, | ||
} | ||
`; |
34 changes: 34 additions & 0 deletions
34
pkg/sass-parser/lib/src/__snapshots__/parameter.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,34 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`a parameter toJSON with a default 1`] = ` | ||
{ | ||
"defaultValue": <"qux">, | ||
"inputs": [ | ||
{ | ||
"css": "@function x($baz: "qux") {}", | ||
"hasBOM": false, | ||
"id": "<input css _____>", | ||
}, | ||
], | ||
"name": "baz", | ||
"raws": {}, | ||
"sassType": "parameter", | ||
"source": <1:13-1:24 in 0>, | ||
} | ||
`; | ||
|
||
exports[`a parameter toJSON with no default 1`] = ` | ||
{ | ||
"inputs": [ | ||
{ | ||
"css": "@function x($baz) {}", | ||
"hasBOM": false, | ||
"id": "<input css _____>", | ||
}, | ||
], | ||
"name": "baz", | ||
"raws": {}, | ||
"sassType": "parameter", | ||
"source": <1:13-1:17 in 0>, | ||
} | ||
`; |
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
Oops, something went wrong.