IronLua.Compiler.Scope.CreateRoot C# (CSharp) 메소드

CreateRoot() 공개 정적인 메소드

public static CreateRoot ( ) : Scope
리턴 Scope
        public static Scope CreateRoot()
        {
            return new Scope { returnLabel = Expr.Label(typeof(object)) };
        }

Usage Example

예제 #1
0
        public Expression <Func <dynamic> > Compile(Block block)
        {
            scope = Scope.CreateRoot();
            var blockExpr = Visit(block);
            var expr      = Expr.Block(blockExpr, Expr.Label(scope.GetReturnLabel(), Expr.Constant(null)));

            return(Expr.Lambda <Func <dynamic> >(expr));
        }