ritwickdey / vscode-live-sass-compiler

Compile Sass or Scss file to CSS at realtime with live browser reload feature.
https://ritwickdey.github.io/vscode-live-sass-compiler/
MIT License
657 stars 169 forks source link

The parent selector (&) in expressions causes hanging compilation. #399

Open DawidArdelli opened 3 years ago

DawidArdelli commented 3 years ago

Hi,

Trying to compile this code causes the compilator to hang.

.main aside:hover, .sidebar p { background-color: &; }

Source: https://sass-lang.com/documentation/style-rules/parent-selector#in-sassscript

Christopher-Hayes commented 3 years ago

Glenn's new repo smoothly handles this parsing bug. I'm not really sure what the expected behavior is considering the given syntax wouldn't make much sense to SASS, but regardless the new repo throws a parsing error without any hanging as far as I can tell. It would be nice if SASS was able to point to the problem symbol like for other errors, but it doesn't seem like this is a possibility because & in this situation is parsed at a lower level. The new repo is at https://github.com/glenn2223/vscode-live-sass-compiler and the new extension is downloadable if you search for "Live SASS Compiler - Glenn Marks" in VSCode.