ASC questions
Hey,
after some time of playing with the ASC classes I have got some questions regarding the Parser and how to put everything together.
- The Parser does not know about block statements. Is there a reason for that? In parseBlock you just generate a StatementListNode but it would be great to know if those statements have been wrapped wih braces. Especially when you are going to support the let statement. This would be more a feature request. In general: it would be great if one could override any method of Parser. Parser is currently not a final class and most of the methods are private.
- Is it correct that the Context is unique to a compilation unit while the ContextStatics are true for all units? If so, it seems like the global scope is built for each unit. Any reason for that or could I keep that static as well?
- When compiling a single class I need to include of course builtin.abc, playerglobal.abc and toplevel.abc. This leads always to a cyclic dependency when using also the FlowAnalyzer. What is the general strategy one has to follow in order to compile?
- The only thing I really want is the AST from a compilation unit. The OEM version does not offer this feature and I can not see any other class that wold simply return me the ProgramNode instead of emitting any byte code. That is why I try triggering the Parser manually. Is there another way to get to the AST? I mean, I do not want to touch any class or rewrite the code at any position because this would probably break with updates so right now I link only against the asc.jar. This works currently for me pretty good, but I do not have the LintEvaluator or FlowAnalyzer running because of the cyclic dependency problem.
Best,
Joa
