IronLua.Compiler.Scope.CreateRoot C# (CSharp) Méthode

CreateRoot() public static méthode

public static CreateRoot ( ) : Scope
Résultat Scope
        public static Scope CreateRoot()
        {
            return new Scope { returnLabel = Expr.Label(typeof(object)) };
        }

Usage Example

Exemple #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));
        }