use of org.wso2.ballerinalang.compiler.tree.expressions.BLangTypeofExpr in project ballerina by ballerina-lang.
the class TypeChecker method visit.
public void visit(BLangTypeofExpr accessExpr) {
BType actualType = symTable.typeDesc;
accessExpr.resolvedType = symResolver.resolveTypeNode(accessExpr.typeNode, env);
resultTypes = types.checkTypes(accessExpr, Lists.of(actualType), expTypes);
}
use of org.wso2.ballerinalang.compiler.tree.expressions.BLangTypeofExpr in project ballerina by ballerina-lang.
the class CodeGenerator method visit.
public void visit(BLangTypeofExpr accessExpr) {
Operand typeCPIndex = getTypeCPIndex(accessExpr.resolvedType);
emit(InstructionCodes.TYPELOAD, typeCPIndex, calcAndGetExprRegIndex(accessExpr));
}
use of org.wso2.ballerinalang.compiler.tree.expressions.BLangTypeofExpr in project ballerina by ballerina-lang.
the class ASTBuilderUtil method createTypeofExpr.
static BLangTypeofExpr createTypeofExpr(DiagnosticPos pos, BType type, BType resolvedType) {
final BLangTypeofExpr typeofExpr = (BLangTypeofExpr) TreeBuilder.createTypeAccessNode();
typeofExpr.pos = pos;
typeofExpr.type = type;
typeofExpr.resolvedType = resolvedType;
return typeofExpr;
}
use of org.wso2.ballerinalang.compiler.tree.expressions.BLangTypeofExpr in project ballerina by ballerina-lang.
the class EndpointDesugar method getTypeAccessExpression.
private BLangTypeofExpr getTypeAccessExpression(DiagnosticPos pos, BType serviceType) {
BLangTypeofExpr typeAccessExpr = (BLangTypeofExpr) TreeBuilder.createTypeAccessNode();
typeAccessExpr.pos = pos;
typeAccessExpr.resolvedType = serviceType;
typeAccessExpr.type = symTable.typeDesc;
return typeAccessExpr;
}
use of org.wso2.ballerinalang.compiler.tree.expressions.BLangTypeofExpr in project ballerina by ballerina-lang.
the class BLangPackageBuilder method createTypeAccessExpr.
public void createTypeAccessExpr(DiagnosticPos pos, Set<Whitespace> ws) {
BLangTypeofExpr typeAccessExpr = (BLangTypeofExpr) TreeBuilder.createTypeAccessNode();
typeAccessExpr.pos = pos;
typeAccessExpr.addWS(ws);
typeAccessExpr.typeNode = (BLangType) typeNodeStack.pop();
addExpressionNode(typeAccessExpr);
}
Aggregations