The following example found in the ceylon/ceylon.ast
project shows how to construct some AST programmatically and have it typechecked by the Ceylon typechecker (com.redhat.ceylon.compiler.typechecker.TypeChecker
):
What would then subsequently be the recommended method to be called with the typed syntax tree to compile the typed syntax tree - considering that compilation units are normally given as files not as typed syntax trees (from the ceylon.ast
project) to the typechecker?
This question is related to this one: The Ceylon Typechecker: How to obtain the typed syntax tree?.