コード例 #1
0
ファイル: Return.cs プロジェクト: hunpody/psimulex
        public override void Do(ICommandContext context)
        {
            BaseType returnValue = null;
            if (HasReturnValue && !context.RunStack.IsEmpty)
            {
                returnValue = context.RunStack.Pop();
            }
            
            context.PopState();

            if (returnValue != null)
            {
                context.RunStack.Push(returnValue.Clone());
            }
        }