use of org.wso2.ballerinalang.compiler.tree.statements.BLangBind in project ballerina by ballerina-lang.
the class SemanticAnalyzer method visit.
public void visit(BLangBind bindNode) {
List<BType> expTypes = new ArrayList<>();
// Check each LHS expression.
BLangExpression varRef = bindNode.varRef;
((BLangVariableReference) varRef).lhsVar = true;
expTypes.add(typeChecker.checkExpr(varRef, env).get(0));
checkConstantAssignment(varRef);
typeChecker.checkExpr(bindNode.expr, this.env, expTypes);
}
use of org.wso2.ballerinalang.compiler.tree.statements.BLangBind in project ballerina by ballerina-lang.
the class Desugar method visit.
@Override
public void visit(BLangBind bindNode) {
bindNode.varRef = rewriteExpr(bindNode.varRef);
bindNode.expr = rewriteExpr(bindNode.expr);
result = new BLangAssignment(bindNode.pos, Arrays.asList(bindNode.varRef), bindNode.expr, false);
}
Aggregations