use of org.ballerinalang.model.tree.clauses.SelectExpressionNode in project ballerina by ballerina-lang.
the class SemanticAnalyzer method visit.
public void visit(BLangSelectClause selectClause) {
GroupByNode groupByNode = selectClause.getGroupBy();
if (groupByNode != null) {
((BLangGroupBy) groupByNode).accept(this);
}
HavingNode havingNode = selectClause.getHaving();
if (havingNode != null) {
((BLangHaving) havingNode).accept(this);
}
List<? extends SelectExpressionNode> selectExpressionsList = selectClause.getSelectExpressions();
if (selectExpressionsList != null) {
for (SelectExpressionNode selectExpressionNode : selectExpressionsList) {
((BLangSelectExpression) selectExpressionNode).accept(this);
}
}
}
use of org.ballerinalang.model.tree.clauses.SelectExpressionNode in project ballerina by ballerina-lang.
the class BLangPackageBuilder method startSelectExpressionNode.
public void startSelectExpressionNode(DiagnosticPos pos, Set<Whitespace> ws) {
SelectExpressionNode selectExpr = TreeBuilder.createSelectExpressionNode();
((BLangSelectExpression) selectExpr).pos = pos;
selectExpr.addWS(ws);
this.selectExpressionsStack.push(selectExpr);
}
use of org.ballerinalang.model.tree.clauses.SelectExpressionNode in project ballerina by ballerina-lang.
the class BLangPackageBuilder method endSelectExpressionNode.
public void endSelectExpressionNode(String identifier, DiagnosticPos pos, Set<Whitespace> ws) {
SelectExpressionNode selectExpression = this.selectExpressionsStack.peek();
selectExpression.setExpression(exprNodeStack.pop());
((BLangSelectExpression) selectExpression).pos = pos;
selectExpression.addWS(ws);
selectExpression.setIdentifier(identifier);
}
use of org.ballerinalang.model.tree.clauses.SelectExpressionNode in project ballerina by ballerina-lang.
the class BLangPackageBuilder method addSelectExprToSelectExprNodeList.
private void addSelectExprToSelectExprNodeList(List<SelectExpressionNode> selectExprList, int n) {
if (this.selectExpressionsStack.empty()) {
throw new IllegalStateException("Select expression stack cannot be empty in processing a SelectClause");
}
SelectExpressionNode expr = this.selectExpressionsStack.pop();
if (n > 1) {
addSelectExprToSelectExprNodeList(selectExprList, n - 1);
}
selectExprList.add(expr);
}
Aggregations