use of org.wso2.ballerinalang.compiler.tree.expressions.BLangInvocation.BFunctionPointerInvocation in project ballerina by ballerina-lang.
the class Desugar method visitFunctionPointerInvocation.
// private functions
private void visitFunctionPointerInvocation(BLangInvocation iExpr) {
BLangVariableReference expr;
if (iExpr.expr == null) {
expr = new BLangSimpleVarRef();
} else {
BLangFieldBasedAccess fieldBasedAccess = new BLangFieldBasedAccess();
fieldBasedAccess.expr = iExpr.expr;
fieldBasedAccess.field = iExpr.name;
expr = fieldBasedAccess;
}
expr.symbol = (BVarSymbol) iExpr.symbol;
expr.type = iExpr.symbol.type;
expr = rewriteExpr(expr);
result = new BFunctionPointerInvocation(iExpr, expr);
}
Aggregations