PackageDefinitionNode packageDefinition = nodeFactory.finishPackage(cx, null);
nodeFactory.statementList(programStatementList, packageDefinition);
CompilerContext context = new CompilerContext();
context.setAscContext(cx);
result.newCompilationUnit(program, context).setSyntaxTree(program);
// Useful when comparing abstract syntax trees
//flash.swf.tools.SyntaxTreeDumper.dump(program, "/tmp/" + className + "New.xml");
As3Compiler.cleanNodeFactory(nodeFactory);