Search in sources :

Example 1 with HavingNode

use of org.ballerinalang.model.tree.clauses.HavingNode 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);
        }
    }
}
Also used : HavingNode(org.ballerinalang.model.tree.clauses.HavingNode) SelectExpressionNode(org.ballerinalang.model.tree.clauses.SelectExpressionNode) BLangSelectExpression(org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectExpression) GroupByNode(org.ballerinalang.model.tree.clauses.GroupByNode) BLangGroupBy(org.wso2.ballerinalang.compiler.tree.clauses.BLangGroupBy) BLangHaving(org.wso2.ballerinalang.compiler.tree.clauses.BLangHaving)

Example 2 with HavingNode

use of org.ballerinalang.model.tree.clauses.HavingNode in project ballerina by ballerina-lang.

the class BLangPackageBuilder method endHavingClauseNode.

public void endHavingClauseNode(DiagnosticPos pos, Set<Whitespace> ws) {
    HavingNode havingNode = this.havingClauseStack.peek();
    ((BLangHaving) havingNode).pos = pos;
    havingNode.addWS(ws);
    havingNode.setExpression(this.exprNodeStack.pop());
}
Also used : HavingNode(org.ballerinalang.model.tree.clauses.HavingNode)

Example 3 with HavingNode

use of org.ballerinalang.model.tree.clauses.HavingNode in project ballerina by ballerina-lang.

the class BLangPackageBuilder method startHavingClauseNode.

public void startHavingClauseNode(DiagnosticPos pos, Set<Whitespace> ws) {
    HavingNode havingNode = TreeBuilder.createHavingNode();
    ((BLangHaving) havingNode).pos = pos;
    havingNode.addWS(ws);
    this.havingClauseStack.push(havingNode);
}
Also used : HavingNode(org.ballerinalang.model.tree.clauses.HavingNode)

Aggregations

HavingNode (org.ballerinalang.model.tree.clauses.HavingNode)3 GroupByNode (org.ballerinalang.model.tree.clauses.GroupByNode)1 SelectExpressionNode (org.ballerinalang.model.tree.clauses.SelectExpressionNode)1 BLangGroupBy (org.wso2.ballerinalang.compiler.tree.clauses.BLangGroupBy)1 BLangHaving (org.wso2.ballerinalang.compiler.tree.clauses.BLangHaving)1 BLangSelectExpression (org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectExpression)1