use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol in project ballerina by ballerina-lang.
the class SymbolResolver method resolveConnector.
public BSymbol resolveConnector(DiagnosticPos pos, DiagnosticCode code, SymbolEnv env, Name pkgAlias, Name connectorName) {
BSymbol pkgSymbol = resolvePkgSymbol(pos, env, pkgAlias);
if (pkgSymbol == symTable.notFoundSymbol) {
return pkgSymbol;
}
BSymbol symbol = lookupMemberSymbol(pos, pkgSymbol.scope, env, connectorName, SymTag.CONNECTOR);
// }
return symbol;
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol in project ballerina by ballerina-lang.
the class SymbolResolver method resolveImplicitConversionOp.
public BSymbol resolveImplicitConversionOp(BType sourceType, BType targetType) {
BSymbol symbol = resolveOperator(Names.CONVERSION_OP, Lists.of(sourceType, targetType));
if (symbol == symTable.notFoundSymbol) {
return symbol;
}
BConversionOperatorSymbol castSymbol = (BConversionOperatorSymbol) symbol;
if (castSymbol.implicit) {
return symbol;
}
return symTable.notFoundSymbol;
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol in project ballerina by ballerina-lang.
the class SymbolResolver method visitBuiltInTypeNode.
private void visitBuiltInTypeNode(BLangType typeNode, TypeKind typeKind, SymbolEnv env) {
Name typeName = names.fromTypeKind(typeKind);
BSymbol typeSymbol = lookupMemberSymbol(typeNode.pos, symTable.rootScope, env, typeName, SymTag.TYPE);
if (typeSymbol == symTable.notFoundSymbol) {
dlog.error(typeNode.pos, diagCode, typeName);
}
resultType = typeNode.type = typeSymbol.type;
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol in project ballerina by ballerina-lang.
the class TaintAnalyzer method visit.
public void visit(BLangObject objectNode) {
BSymbol objectSymbol = objectNode.symbol;
SymbolEnv objectEnv = SymbolEnv.createPkgLevelSymbolEnv(objectNode, objectSymbol.scope, env);
objectNode.fields.forEach(field -> analyzeNode(field, objectEnv));
analyzeNode(objectNode.initFunction, objectEnv);
objectNode.functions.forEach(f -> analyzeNode(f, objectEnv));
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol in project ballerina by ballerina-lang.
the class TaintAnalyzer method visit.
public void visit(BLangStruct structNode) {
BSymbol structSymbol = structNode.symbol;
SymbolEnv structEnv = SymbolEnv.createPkgLevelSymbolEnv(structNode, structSymbol.scope, env);
structNode.fields.forEach(field -> analyzeNode(field, structEnv));
}
Aggregations