use of org.ballerinalang.model.tree.ConnectorNode in project ballerina by ballerina-lang.
the class BLangPackageBuilder method startConnectorDef.
public void startConnectorDef() {
ConnectorNode connectorNode = TreeBuilder.createConnectorNode();
attachAnnotations(connectorNode);
attachDocumentations(connectorNode);
attachDeprecatedNode(connectorNode);
this.connectorNodeStack.push(connectorNode);
startEndpointDeclarationScope(((BLangConnector) connectorNode).endpoints);
}
use of org.ballerinalang.model.tree.ConnectorNode in project ballerina by ballerina-lang.
the class BLangPackageBuilder method startConnectorBody.
public void startConnectorBody() {
/* end of connector definition header, so let's populate
* the connector information before processing the body */
ConnectorNode connectorNode = this.connectorNodeStack.peek();
if (!this.varListStack.empty()) {
this.varListStack.pop().forEach(variableNode -> {
((BLangVariable) variableNode).docTag = DocTag.PARAM;
connectorNode.addParameter(variableNode);
});
}
/* add a temporary block node to contain connector variable definitions */
this.blockNodeStack.add(TreeBuilder.createBlockNode());
/* action node list to contain the actions of the connector */
this.actionNodeStack.add(new ArrayList<>());
}
use of org.ballerinalang.model.tree.ConnectorNode in project ballerina by ballerina-lang.
the class BLangPackageBuilder method endConnectorBody.
public void endConnectorBody(Set<Whitespace> ws) {
ConnectorNode connectorNode = this.connectorNodeStack.peek();
connectorNode.addWS(ws);
this.blockNodeStack.pop().getStatements().forEach(e -> connectorNode.addVariableDef((VariableDefinitionNode) e));
this.actionNodeStack.pop().forEach(connectorNode::addAction);
}
Aggregations