ArgumentScope() public method

public ArgumentScope ( ) : Scope
return Scope
        protected EXPR CreateWraps(EXPRBOUNDLAMBDA anonmeth)
        {
            EXPR sequence = null;
            for (Symbol sym = anonmeth.ArgumentScope().firstChild; sym != null; sym = sym.nextChild)
            {
                if (!sym.IsLocalVariableSymbol())
                {
                    continue;
                }
                LocalVariableSymbol local = sym.AsLocalVariableSymbol();
                if (local.isThis)
                {
                    continue;
                }
                Debug.Assert(anonmeth.OptionalBody != null);
                EXPR create = GenerateParameter(local.name.Text, local.GetType());
                local.wrap = GetExprFactory().CreateWrapNoAutoFree(anonmeth.OptionalBody.OptionalScopeSymbol, create);
                EXPR save = GetExprFactory().CreateSave(local.wrap);
                if (sequence == null)
                {
                    sequence = save;
                }
                else
                {
                    sequence = GetExprFactory().CreateSequence(sequence, save);
                }
            }

            return sequence;
        }
 protected EXPR DestroyWraps(EXPRBOUNDLAMBDA anonmeth, EXPR sequence)
 {
     for (Symbol sym = anonmeth.ArgumentScope(); sym != null; sym = sym.nextChild)
     {
         if (!sym.IsLocalVariableSymbol())
         {
             continue;
         }
         LocalVariableSymbol local = sym.AsLocalVariableSymbol();
         if (local.isThis)
         {
             continue;
         }
         Debug.Assert(local.wrap != null);
         Debug.Assert(anonmeth.OptionalBody != null);
         EXPR freeWrap = GetExprFactory().CreateWrap(anonmeth.OptionalBody.OptionalScopeSymbol, local.wrap);
         sequence = GetExprFactory().CreateReverseSequence(sequence, freeWrap);
     }
     return sequence;
 }
        protected EXPR RewriteLambdaParameters(EXPRBOUNDLAMBDA anonmeth)
        {
            Debug.Assert(anonmeth != null);

            // new ParameterExpression[2] {Parameter(typeof(type1), name1), Parameter(typeof(type2), name2)}

            EXPR paramArrayInitializerArgs = null;
            EXPR paramArrayInitializerArgsTail = paramArrayInitializerArgs;

            for (Symbol sym = anonmeth.ArgumentScope(); sym != null; sym = sym.nextChild)
            {
                if (!sym.IsLocalVariableSymbol())
                {
                    continue;
                }
                LocalVariableSymbol local = sym.AsLocalVariableSymbol();
                if (local.isThis)
                {
                    continue;
                }
                GetExprFactory().AppendItemToList(local.wrap, ref paramArrayInitializerArgs, ref paramArrayInitializerArgsTail);
            }

            return GenerateParamsArray(paramArrayInitializerArgs, PredefinedType.PT_PARAMETEREXPRESSION);
        }