Class BoxArgument

All Implemented Interfaces:
BoxVisitable

public class BoxArgument extends BoxExpression
AST Node representing an argument. Argument can have a name like: a=10
  • Constructor Details

    • BoxArgument

      public BoxArgument(BoxExpression value, Position position, String sourceText)
      Creates the AST node for an anonymous argument
      Parameters:
      value - expression representing the value of the argument
      position - position of the statement in the source code
      sourceText - source code that originated the Node
    • BoxArgument

      public BoxArgument(BoxExpression name, BoxExpression value, Position position, String sourceText)
      Creates the AST node for a named argument
      Parameters:
      name - expression representing the name of the argument
      value - expression representing the value of the argument
      position - position of the statement in the source code
      sourceText - source code that originated the Node
  • Method Details

    • setName

      public void setName(BoxExpression name)
    • setValue

      public void setValue(BoxExpression value)
    • getName

      public BoxExpression getName()
    • getValue

      public BoxExpression getValue()
    • isNamed

      public boolean isNamed()
    • toMap

      public Map<String,Object> toMap()
      Overrides:
      toMap in class BoxNode
    • accept

      public void accept(VoidBoxVisitor v)
      Description copied from interface: BoxVisitable
      Accept method for visitor support.
      Parameters:
      v - the visitor implementation
    • accept

      public BoxNode accept(ReplacingBoxVisitor v)
      Description copied from interface: BoxVisitable
      Accept method for replacing visitor support. Each accept returns the node, or a replacement node.
      Parameters:
      v - the visitor implementation