Interface Stmt.Visitor<R>

Type Parameters:
R - the return type of the executed statement
Enclosing interface:
Stmt

public static interface Stmt.Visitor<R>
Defines operations for the various Stmt implementations.
  • Method Details

    • function

      R function(Stmt.Function stmt)
      Executes a Stmt.Function statement and returns the value.
      Parameters:
      stmt - the Stmt.Function statement
      Returns:
      the evaluated value
    • var

      R var(Stmt.Var stmt)
      Executes a Stmt.Var statement and returns the value.
      Parameters:
      stmt - the Stmt.Var statement
      Returns:
      the evaluated value
    • val

      R val(Stmt.Val stmt)
      Executes a Stmt.Val statement and returns the value.
      Parameters:
      stmt - the Stmt.Val statement
      Returns:
      the evaluated value
    • expression

      R expression(Stmt.Expression stmt)
      Executes an Stmt.Expression statement and returns the value.
      Parameters:
      stmt - the Stmt.Expression statement
      Returns:
      the evaluated value
    • ifVisit

      R ifVisit(Stmt.If stmt)
      Executes an Stmt.If statement and returns the value.
      Parameters:
      stmt - the Stmt.If statement
      Returns:
      the evaluated value
    • returnVisit

      R returnVisit(Stmt.Return stmt)
      Executes a Stmt.Return statement and returns the value.
      Parameters:
      stmt - the Stmt.Return statement
      Returns:
      the evaluated value
    • whileVisit

      R whileVisit(Stmt.While stmt)
      Executes a Stmt.While statement and returns the value.
      Parameters:
      stmt - the Stmt.While statement
      Returns:
      the evaluated value
    • block

      R block(Stmt.Block stmt)
      Executes a Stmt.Block and returns the value.
      Parameters:
      stmt - the Stmt.Block statement
      Returns:
      the evaluated value