Class LoopStatement

  • All Implemented Interfaces:
    Statement

    public final class LoopStatement
    extends java.lang.Object
    implements Statement
    The LoopStatement class is used to store information about loop statements declared during compilation.
    Since:
    1.0
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoopStatement

        public LoopStatement​(Token loopToken,
                             Expression lowerBound,
                             Token toToken,
                             Expression upperBound,
                             Statement body)
        Constructs a LoopStatement object, initialised with the statements contents.

        A SourceSpan containing the range of the statement is automatically generated, as well as a LinkedList of its children.

        Parameters:
        loopToken - The loop Token
        lowerBound - The lower bound Expression
        toToken - The to Token
        upperBound - The upper bound Expression
        body - The Statement to be run in the loop body