Package iota

Class IStatementExpression

java.lang.Object
iota.IAST
iota.IStatement
iota.IStatementExpression

class IStatementExpression extends IStatement
The AST node for an expression that appears as a statement. Only the expressions that have a side effect are valid statement expressions.
  • Field Details

  • Constructor Details

    • IStatementExpression

      public IStatementExpression(int line, IExpression expr)
      Constructs an AST node for a statement expression.
      Parameters:
      line - line in which the expression occurs in the source file.
      expr - the expression.
  • Method Details

    • analyze

      public IStatement analyze(Context context)
      Performs second phase of semantic analysis on this AST and returns the (possibly modified) AST.
      Specified by:
      analyze in class IAST
      Parameters:
      context - the environment (scope) in which code is analyzed.
      Returns:
      the (possibly modified) AST.
    • codegen

      public void codegen(CLEmitter output)
      Performs code generation for this AST.
      Specified by:
      codegen in class IAST
      Parameters:
      output - the code emitter.
    • toJSON

      public void toJSON(JSONElement json)
      Stores information about this AST in JSON format.
      Overrides:
      toJSON in class IAST
      Parameters:
      json - the JSON emitter.