Shamoon
Shamoon

Reputation: 43531

How can I generate the Abstract Syntax Tree for a CoffeeScript File?

I realize that CoffeeScript compiles to JavaScript. But is it possible to generate an AST for CoffeeScript without having to convert it first?

Upvotes: 0

Views: 254

Answers (1)

Larry Maccherone
Larry Maccherone

Reputation: 9523

You can find the source for the nodes created by the CoffeeScript compiler here.

It's been a while since I investigated the best way to do this but when I wrote CoffeeDocTest, I used the CoffeeDoc wrapper of the CoffeeScript parser.

Upvotes: 1

Related Questions