Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an SCSS parser that outputs an AST? [closed]

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

These are perfect examples of I'm looking for:

  • css-parse
  • mensch

UPDATE: The reason I'm asking is that I want to build a tool that would enforce a particular style of coding for SCSS and I can't do that with the above as they re-indent the compiled CSS, move braces, etc.

like image 731
alebelcor Avatar asked Jun 28 '13 22:06

alebelcor


1 Answers

I finally found a tool that might help.

It's a CSS/preprocessor parser called gonzales-pe.

I hope this helps anyone else looking at this.

like image 101
alebelcor Avatar answered Oct 02 '22 00:10

alebelcor