Class IntConstantNode

java.lang.Object
com.maroontress.intexpr.syntaxtree.IntConstantNode
All Implemented Interfaces:
SyntaxNode

public final class IntConstantNode extends Object implements SyntaxNode
The syntax node representing an operand and an integer constant.
  • Constructor Details

    • IntConstantNode

      public IntConstantNode(int value)
      Creates a new instance.
      Parameters:
      value - The immediate value.
  • Method Details

    • toString

      public String toString(String firstIndent, String indent)
      Returns the string visualizing the syntax tree.
      Specified by:
      toString in interface SyntaxNode
      Parameters:
      firstIndent - The string to indent the first line.
      indent - The string to indent the second and subsequent lines.
      Returns:
      The string visualizing the syntax tree.