elsassph / haxe-modular

Haxe-JS code splitting, NPM dependencies bundling, hot-reload
116 stars 14 forks source link

Another JS parser? #26

Open elsassph opened 7 years ago

elsassph commented 7 years ago

https://github.com/cherow/cherow Should support import().

elsassph commented 7 years ago

Thanks, we're using acorn and it doesn't have his option.

elsassph commented 6 years ago

Still considering Cherow, but it doesn't offer some any walker algorithm so it would have to be re-implemented.

elsassph commented 6 years ago

@KFlash I applaud your dedication to making your library easier to use.

A parser delegate sound like a very useful addition for some people, but it doesn't work for me: unfortunately, I need to run the walker on nodes, after parsing.

I don't think it'll be a huge effort so don't worry - Acorn's walker will probably be very easy to adapt.

elsassph commented 6 years ago

Thanks @KFlash, estraverse look like something I could use.

I already do manual traversing up to a certain point, then I delegate to the generic walk algorithm - which could be estraverse or I'll just implement it. I hadn't looked at Acorn's implementation but I wouldn't blindly port it, just make sure I don't miss anything :)