use of org.ballerinalang.model.tree.statements.BlockNode in project ballerina by ballerina-lang.
the class BLangPackageBuilder method endCallableUnitBody.
public void endCallableUnitBody(Set<Whitespace> ws) {
BlockNode block = this.blockNodeStack.pop();
InvokableNode invokableNode = this.invokableNodeStack.peek();
invokableNode.addWS(ws);
invokableNode.setBody(block);
}
use of org.ballerinalang.model.tree.statements.BlockNode in project ballerina by ballerina-lang.
the class BLangPackageBuilder method addElseBlock.
public void addElseBlock(DiagnosticPos pos, Set<Whitespace> ws) {
IfNode ifNode = ifElseStatementStack.peek();
while (ifNode.getElseStatement() != null) {
ifNode = (IfNode) ifNode.getElseStatement();
}
ifNode.addWS(ws);
BlockNode elseBlock = blockNodeStack.pop();
((BLangBlockStmt) elseBlock).pos = pos;
ifNode.setElseStatement(elseBlock);
}
Aggregations