Closed hoonto closed 11 years ago
Not an issue - just needed to run the transform against the top level of the ast. Now just trying to figure out how to re-evaluate the transformed sections, or if this will cause the potential re-entrant issues. Worst case scenario, disposing of the process entirely and re-running though that seems a little heavy handed. Curious if re-entrance is on the roadmap? I did try disposing of the CodeProcessor and Runtime objects and deleting them from the require cache, and re-requiring but that did not seem to work in my limited tests.
Hi there, I am thrilled to see this work, it's really a great leap forward and handles a lot of cases that are incredibly difficult if not impossible in static analysis.
But I've come across a problem, I can't seem to find a straightforward way of performing an AST transform either inside of a plugin or inside of a Rule. I've given it a few shots, such as performing an uglify2 transform on "this" inside of a rule like so:
(I'm not clear on what the return of thisBinding is doing yet, nor am I totally clear on how the preProcess, fireRuleEvent, and postProcess are ultimately affecting things in the existing rules or new rules I might create either - so any clarifications there are very much appreciated as well.)
Thanks in advance, and thanks also for the great work - and thanks Appcelerator for releasing it as well!
Matt