private Expression Generate(SourceUnitTree tree) { function.MakeVariables(tree.Scope.Variables); var body = tree.Elements.Select(elm => elm.Generate(this)).SelectMany(e => e); return Expression.Block(typeof(object), FunctionBlock(function, body)); }
public static Expression Generate(SourceUnitTree tree, AnalysisScope.TopLevel global) { return new AstGenerator(global).Generate(tree); }