package gw.rating.flow.domain uses com.google.common.collect.ImmutableList uses javax.naming.OperationNotSupportedException class CompoundStatement extends StatementContainer { construct(stats : ImmutableList) { super(stats) Statements.each(\stmt -> {stmt.Parent = this}) } override function generate(context: GenerationContext) { _start = context.beginCodeGen() Statements.eachWithIndex(\stmt, i -> { stmt.generate(context) if (i < Statements.size() - 1) { context.append('\n') } }) _end = context.endCodeGen() } override function getOffendingOperand(issue: gw.lang.parser.IParseIssue) : CalcStepOperand { throw new OperationNotSupportedException() } override function getOffendingSubStatement(issue: gw.lang.parser.IParseIssue) : Statement { var stmt = Statements.firstWhere(\p -> p.Start.First <= issue.Line and p.End.First >= issue.Line) return stmt.getOffendingSubStatement(issue) } }