Search in sources :

Example 1 with VariableDefinitionNode

use of org.ballerinalang.model.tree.statements.VariableDefinitionNode in project ballerina by ballerina-lang.

the class BLangPackageBuilder method addServiceBody.

public void addServiceBody(Set<Whitespace> ws) {
    ServiceNode serviceNode = serviceNodeStack.peek();
    serviceNode.addWS(ws);
    blockNodeStack.pop().getStatements().forEach(varDef -> serviceNode.addVariable((VariableDefinitionNode) varDef));
}
Also used : VariableDefinitionNode(org.ballerinalang.model.tree.statements.VariableDefinitionNode) ServiceNode(org.ballerinalang.model.tree.ServiceNode)

Example 2 with VariableDefinitionNode

use of org.ballerinalang.model.tree.statements.VariableDefinitionNode 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);
}
Also used : VariableDefinitionNode(org.ballerinalang.model.tree.statements.VariableDefinitionNode) ConnectorNode(org.ballerinalang.model.tree.ConnectorNode)

Aggregations

VariableDefinitionNode (org.ballerinalang.model.tree.statements.VariableDefinitionNode)2 ConnectorNode (org.ballerinalang.model.tree.ConnectorNode)1 ServiceNode (org.ballerinalang.model.tree.ServiceNode)1