Class IfStatement

java.lang.Object
EDU.purdue.jtb.parser.syntaxtree.IfStatement
All Implemented Interfaces:
INode, Serializable

public class IfStatement extends Object implements INode
JTB node class for the production IfStatement:
Corresponding grammar:
f0 -> "if"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> Statement()
f5 -> [ #0 "else" #1 Statement() ]
s: -1906079982
See Also:
  • Field Details

  • Constructor Details

    • IfStatement

      public IfStatement(Token n0, Token n1, Expression n2, Token n3, Statement n4, NodeOptional n5)
      Constructs the node with all its children nodes.
      Parameters:
      n0 - - first child node
      n1 - - next child node
      n2 - - next child node
      n3 - - next child node
      n4 - - next child node
      n5 - - next child node
  • Method Details

    • accept

      public int accept(IIntVisitor vis)
      Accepts a IIntVisitor visitor with user return data.
      Specified by:
      accept in interface INode
      Parameters:
      vis - - the visitor
      Returns:
      the user Return data
    • accept

      public void accept(IVoidVisitor vis)
      Accepts a IVoidVisitor visitor} visitor with user return data.
      Specified by:
      accept in interface INode
      Parameters:
      vis - - the visitor