Class Loop

    • Constructor Detail

      • Loop

        public Loop()
      • Loop

        public Loop​(int pos)
      • Loop

        public Loop​(int pos,
                    int len)
    • Method Detail

      • getBody

        public AstNode getBody()
        Returns loop body
      • setBody

        public void setBody​(AstNode body)
        Sets loop body. Sets the parent of the body to this loop node, and updates its offset to be relative. Extends the length of this node to include the body.
      • getLp

        public int getLp()
        Returns left paren position, -1 if missing
      • setLp

        public void setLp​(int lp)
        Sets left paren position
      • getRp

        public int getRp()
        Returns right paren position, -1 if missing
      • setRp

        public void setRp​(int rp)
        Sets right paren position
      • setParens

        public void setParens​(int lp,
                              int rp)
        Sets both paren positions