You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unhandled rejection Error: Selector ("class") expected "identifier" or "interpolation" (5:6)
at InputStream.err ([...]/node_modules/scss-parser/dist/input-stream.js:122:13)
at Object.err ([...]/node_modules/scss-parser/dist/input-stream.js:161:20)
at TokenStream.err ([...]/node_modules/scss-parser/dist/token-stream.js:297:40)
at Object.err ([...]/node_modules/scss-parser/dist/token-stream.js:634:20)
at Parser.parse_selector ([...]/node_modules/scss-parser/dist/parse.js:728:21)
at [...]/node_modules/scss-parser/dist/parse.js:435:25
at Parser.maybe_function ([...]/node_modules/scss-parser/dist/parse.js:609:14)
at Parser.parse_atom ([...]/node_modules/scss-parser/dist/parse.js:420:19)
at Parser.parse_expression ([...]/node_modules/scss-parser/dist/parse.js:394:25)
at Parser.parse_arguments ([...]/node_modules/scss-parser/dist/parse.js:581:37)
at Parser.parse_at_rule ([...]/node_modules/scss-parser/dist/parse.js:665:27)
at Parser.parse_node ([...]/node_modules/scss-parser/dist/parse.js:350:36)
at Parser.parse_block ([...]/node_modules/scss-parser/dist/parse.js:539:25)
at Parser.parse_rule ([...]/node_modules/scss-parser/dist/parse.js:692:24)
at Parser.parse_node ([...]/node_modules/scss-parser/dist/parse.js:357:51)
at Parser.parse_stylesheet ([...]/node_modules/scss-parser/dist/parse.js:267:25)
The text was updated successfully, but these errors were encountered:
This seems to relate to the ellipsis (variable arguments), because the same error is thrown when the following code is executed:
let{ parse, stringify }=require('scss-parser')// Create an AST from a string of SCSSletast=parse('@mixin box-shadow($shadow...) { @if enable-shadows { box-shadow: $shadow; } }')// Modify the AST (see below for a better way to do this)ast.value[0].value[0].value[0].value[0].value='world'// Convert the modified AST back to SCSSletscss=stringify(ast)// .world { color: $red; }
debagger
added a commit
to debagger/scss-parser
that referenced
this issue
Oct 3, 2019
scss-parser throws a parse error when a mixin using a map for parameters (also see https://www.sitepoint.com/sass-multiple-arguments-lists-or-arglist/) is included.
Input SCSS:
Parse error:
The text was updated successfully, but these errors were encountered: