use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol in project ballerina by ballerina-lang.
the class SignatureTreeVisitor method visit.
@Override
public void visit(BLangResource resourceNode) {
BSymbol resourceSymbol = resourceNode.symbol;
SymbolEnv resourceEnv = SymbolEnv.createResourceActionSymbolEnv(resourceNode, resourceSymbol.scope, symbolEnv);
resourceNode.workers.forEach(w -> this.acceptNode(w, resourceEnv));
this.blockOwnerStack.push(resourceNode);
acceptNode(resourceNode.body, resourceEnv);
this.blockOwnerStack.pop();
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol in project ballerina by ballerina-lang.
the class SignatureTreeVisitor method visit.
@Override
public void visit(BLangConnector connectorNode) {
BSymbol connectorSymbol = connectorNode.symbol;
SymbolEnv connectorEnv = SymbolEnv.createConnectorEnv(connectorNode, connectorSymbol.scope, symbolEnv);
connectorNode.actions.forEach(action -> this.acceptNode(action, connectorEnv));
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol in project ballerina by ballerina-lang.
the class SignatureTreeVisitor method visit.
@Override
public void visit(BLangService serviceNode) {
BSymbol serviceSymbol = serviceNode.symbol;
SymbolEnv serviceEnv = SymbolEnv.createPkgLevelSymbolEnv(serviceNode, serviceSymbol.scope, symbolEnv);
serviceNode.resources.forEach(r -> this.acceptNode(r, serviceEnv));
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol in project ballerina by ballerina-lang.
the class SignatureTreeVisitor method visit.
@Override
public void visit(BLangFunction funcNode) {
BSymbol funcSymbol = funcNode.symbol;
if (Symbols.isNative(funcSymbol)) {
return;
}
SymbolEnv funcEnv = SymbolEnv.createFunctionEnv(funcNode, funcSymbol.scope, symbolEnv);
blockOwnerStack.push(funcNode);
this.acceptNode(funcNode.body, funcEnv);
blockOwnerStack.pop();
// Process workers
if (terminateVisitor && !funcNode.workers.isEmpty()) {
terminateVisitor = false;
}
funcNode.workers.forEach(e -> this.symbolEnter.defineNode(e, funcEnv));
funcNode.workers.forEach(e -> this.acceptNode(e, funcEnv));
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol in project ballerina by ballerina-lang.
the class SignatureTreeVisitor method visit.
@Override
public void visit(BLangAction actionNode) {
BSymbol actionSymbol = actionNode.symbol;
SymbolEnv actionEnv = SymbolEnv.createResourceActionSymbolEnv(actionNode, actionSymbol.scope, symbolEnv);
actionNode.workers.forEach(w -> this.acceptNode(w, actionEnv));
this.blockOwnerStack.push(actionNode);
acceptNode(actionNode.body, actionEnv);
this.blockOwnerStack.pop();
}
Aggregations