Class PropertyInitialisers

java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.PropertyInitialisers
All Implemented Interfaces:
Function<EK9Parser.AggregatePartsContext, List<IRInstr>>

public final class PropertyInitialisers extends AbstractGenerator implements Function<EK9Parser.AggregatePartsContext, List<IRInstr>>
THE instance initialisation of a type's properties, in declaration order - the body of its _i_init. Use this; do not re-derive it (it was two private copies, in AbstractDfnGenerator and Scenario3SourceIRGenerator).

Each property is declared, and one with an initialiser is given its value. A property's initialiser is in no block statement, so it OWNS the closeable temporaries it makes (text as String: Res("x").read()): it is wrapped in THE owned region (StatementOwnedCloseables.apply(ParserRuleContext, List)) and closes them as it finishes, before the next property and before any constructor body. Which calls those are is phase 5's decision.