Class ConstructFieldDeclarations

java.lang.Object
org.ek9lang.compiler.phase7.support.ConstructFieldDeclarations

public final class ConstructFieldDeclarations extends Object
THE way a construct's field declarations are made - hold one and use it, never build a FieldCreator and a FieldsFromCapture by hand again: addPropertiesAndCapturesTo(IRConstruct, IRGenerationContext, AggregateSymbol) for an aggregate (its properties, then its captures) and addCapturesTo(IRConstruct, IRGenerationContext, ICanCaptureVariables) for a function (captures only).
  • Constructor Details

    • ConstructFieldDeclarations

      public ConstructFieldDeclarations()
  • Method Details

    • addPropertiesAndCapturesTo

      public void addPropertiesAndCapturesTo(IRConstruct construct, IRGenerationContext stackContext, AggregateSymbol aggregateSymbol)
      Declare the fields of an aggregate on construct: each property, then each captured variable.
    • addCapturesTo

      public void addCapturesTo(IRConstruct construct, IRGenerationContext stackContext, ICanCaptureVariables canCaptureVariables)
      Declare the captured variables of a function (or anything that captures) as fields on construct.