Package iota

Class CompilationUnitContext

java.lang.Object
iota.Context
iota.CompilationUnitContext

class CompilationUnitContext extends Context
The compilation unit context is always the outermost context and is where methods are declared.
  • Constructor Details

    • CompilationUnitContext

      public CompilationUnitContext(IAST definition)
      Constructs a new compilation unit context given the AST node
      Parameters:
      definition - and its definition.
  • Method Details

    • definition

      public IAST definition()
      Returns the AST node of the compilation unit this context corresponds to.
      Returns:
      the AST node of the compilation unit this context corresponds to.
    • toJSON

      public void toJSON(JSONElement json)
      Adds information pertaining to this context to the given JSON element.
      Overrides:
      toJSON in class Context
      Parameters:
      json - JSON element.