コード例 #1
0
ファイル: AstGenerator.cs プロジェクト: Alxandr/Totem-2.0
        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));
        }
コード例 #2
0
ファイル: AstGenerator.cs プロジェクト: Alxandr/Totem-2.0
 public static Expression Generate(SourceUnitTree tree, AnalysisScope.TopLevel global)
 {
     return new AstGenerator(global).Generate(tree);
 }