Class ConstructFieldDeclarations
java.lang.Object
org.ek9lang.compiler.phase7.support.ConstructFieldDeclarations
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCapturesTo(IRConstruct construct, IRGenerationContext stackContext, ICanCaptureVariables canCaptureVariables) Declare the captured variables of a function (or anything that captures) as fields onconstruct.voidaddPropertiesAndCapturesTo(IRConstruct construct, IRGenerationContext stackContext, AggregateSymbol aggregateSymbol) Declare the fields of an aggregate onconstruct: each property, then each captured variable.
-
Constructor Details
-
ConstructFieldDeclarations
public ConstructFieldDeclarations()
-
-
Method Details
-
addPropertiesAndCapturesTo
public void addPropertiesAndCapturesTo(IRConstruct construct, IRGenerationContext stackContext, AggregateSymbol aggregateSymbol) Declare the fields of an aggregate onconstruct: 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 onconstruct.
-