Is there an SCSS analyzer that displays AST?

I am wondering if there is an SCSS (or Sass) parser, preferably written in JavaScript, that will output an abstract syntax tree.

These are the perfect examples I'm looking for:

UPDATE: The reason I ask is because I want to create a tool that will apply a specific coding style for SCSS, and I cannot do it using the above, as they re-insert the compiled CSS, move the brackets, and so on. .d.

+4
source share
1 answer

I finally found a tool that might help.

This is a CSS / preprocessor parser called gonzales-pe .

Hope this helps someone else take a look at this.

+6
source

Source: https://habr.com/ru/post/1488787/


All Articles