/// <summary>
        /// Stops the last <see cref="StartLoop(ILoop)">started loop</see>.
        /// </summary>
        public void StopLastLoop()
        {
            ThrowIfDisposed();
            ThrowIfNotRunning();
            ThrowIfThereIsNotLastLoop();

            StackOfLoops.Pop();
        }
        /// <summary>
        /// Takes a step of the last <see cref="StartLoop(ILoop)">started loop</see>.
        /// </summary>
        public void TakeLastLoopStep()
        {
            ThrowIfDisposed();
            ThrowIfNotRunning();
            ThrowIfThereIsNotLastLoop();

            StackOfLoops.Peek().TakeStep();
        }
        /// <summary>
        /// Starts the loop.
        /// </summary>
        /// <param name="loop">The loop to repeated running.</param>
        /// <returns><c>true</c> if new loop started, <c>false</c> if the loop is already started.</returns>
        public void StartLoop(ILoop loop)
        {
            ThrowIfDisposed();
            ThrowIfNotRunning();

            if (loop == null)
            {
                throw new ArgumentNullException(nameof(loop));
            }

            var multilineLoop = new MultilineLoop(Runner.RunningLine, loop);

            StackOfLoops.Push(multilineLoop);
        }
 internal string GetStartLabelOfLastLoop()
 {
     return(StackOfLoops.Peek().StartLine.Label);
 }