use of org.wso2.ballerinalang.compiler.tree.statements.BLangExpressionStmt in project ballerina by ballerina-lang.
the class IterableCodeDesugar method generateForeach.
/**
* Generates statements for foreach operation.
*
* lambda(...)
*
* @param blockStmt target
* @param operation operation instance
*/
private void generateForeach(BLangBlockStmt blockStmt, Operation operation) {
final DiagnosticPos pos = operation.pos;
final BLangExpressionStmt exprStmt = ASTBuilderUtil.createExpressionStmt(pos, blockStmt);
exprStmt.expr = ASTBuilderUtil.createInvocationExpr(pos, operation.lambdaSymbol, Lists.of(operation.argVar), symResolver);
}
Aggregations