use of edu.rice.cs.caper.bayou.core.dsl.DASTNode in project bayou by capergroup.
the class DOMSwitchStatement method BuildTree.
private DSubTree BuildTree(DSubTree Sexpr, int itPos) {
DSubTree bodyPrev = new DSubTree();
DSubTree caseNodes = new DSubTree();
DSubTree bodyNext;
for (int it1 = itPos; it1 < bodies.size(); it1++) {
int typePrev = nodeType.get(it1);
if (typePrev == 49) {
// checks for 'case' statement
bodyNext = BuildTree(Sexpr, it1 + 1);
DASTNode caseNode = new DBranch(Sexpr.getNodesAsCalls(), bodyPrev.getNodes(), bodyNext.getNodes());
caseNodes.addNode(caseNode);
return caseNodes;
} else {
bodyPrev.addNodes(bodies.get(it1));
}
}
return bodyPrev;
}