Package iota

Class IBlock


class IBlock extends IStatement
The AST node for a block, which delimits a nested level of scope.
  • Constructor Details

    • IBlock

      public IBlock(int line, ArrayList<IStatement> statements)
      Constructs an AST node for a block.
      Parameters:
      line - line in which the block occurs in the source file.
      statements - list of statements forming the block body.
  • Method Details

    • analyze

      public IBlock 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.