Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CopyStackContext"/> class.
        /// </summary>
        /// <param name="context">The context.</param>
        public CopyStackContext(CopyStackContext context)
        {
            this.variables          = context.variables.Clone();
            this.controllVariables  = context.controllVariables.Clone();
            this.temporaryVariables = context.temporaryVariables.Clone();
            this.arrays             = context.arrays.Clone();

            StackLevel = context.StackLevel;
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public override void AddLocalLevel()
        {
            CopyStackContext context = new CopyStackContext(localLevel);

            context.WriteableVariables.SetUnknownIndex(VariableIndex.CreateUnknown(localLevel));
            context.WriteableControllVariables.SetUnknownIndex(ControlIndex.CreateUnknown(localLevel));

            memoryStack.Add(context);
            localLevel++;
        }