> I was thinking, maybe I'm not thinking in enough 5th dimensional thought > here. > > I'm not married to linked tokens, because other than Gordon helping out I > highly doubt I would even have time to implement that with the current > parser. > > The code when parsed has insane AST source offsets to everything in the > actual source file. If we were "injecting" AST into a class/method/etc., we > would just basically be substringing it with a replace. The code generation > could be done already with the AS emitter I have already made with FalconJx! > > Holy #$%@! I think that might actually work! :) >
Hm, sounds pretty sweet. If its not too much work to create a small experiment to proof your theory than this could be a worthy approach :) Generating extra classes etc shouldn't be a problem I suppose? What the AOP bits would do, in a nutshell, would basically be renaming an existing class, creating a new class with the old name of this class (and making it a subclass of the original) and then creating overridden methods in the new class. Come to think of, with this approach we wouldn't even need to inject subtrees into existing AST's... All I need to do is rename certain classes, I'm guessing that that wouldn't be too much of a hassle, right? Roland