Search in sources :

Example 1 with StreamActionNode

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

the class SemanticAnalyzer method visit.

public void visit(BLangStreamingQueryStatement streamingQueryStatement) {
    StreamingInput streamingInput = streamingQueryStatement.getStreamingInput();
    if (streamingInput != null) {
        ((BLangStreamingInput) streamingInput).accept(this);
        JoinStreamingInput joinStreamingInput = streamingQueryStatement.getJoiningInput();
        if (joinStreamingInput != null) {
            ((BLangJoinStreamingInput) joinStreamingInput).accept(this);
        }
    }
    SelectClauseNode selectClauseNode = streamingQueryStatement.getSelectClause();
    if (selectClauseNode != null) {
        ((BLangSelectClause) selectClauseNode).accept(this);
    }
    OrderByNode orderByNode = streamingQueryStatement.getOrderbyClause();
    if (orderByNode != null) {
        ((BLangOrderBy) orderByNode).accept(this);
    }
    StreamActionNode streamActionNode = streamingQueryStatement.getStreamingAction();
    if (streamActionNode != null) {
        ((BLangStreamAction) streamActionNode).accept(this);
    }
    BLangPatternClause patternClause = (BLangPatternClause) streamingQueryStatement.getPatternClause();
    if (patternClause != null) {
        patternClause.accept(this);
    }
}
Also used : JoinStreamingInput(org.ballerinalang.model.tree.clauses.JoinStreamingInput) BLangPatternStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput) BLangStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamingInput) BLangJoinStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput) StreamingInput(org.ballerinalang.model.tree.clauses.StreamingInput) BLangSelectClause(org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectClause) BLangJoinStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput) StreamActionNode(org.ballerinalang.model.tree.clauses.StreamActionNode) JoinStreamingInput(org.ballerinalang.model.tree.clauses.JoinStreamingInput) BLangJoinStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput) OrderByNode(org.ballerinalang.model.tree.clauses.OrderByNode) BLangStreamAction(org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamAction) SelectClauseNode(org.ballerinalang.model.tree.clauses.SelectClauseNode) BLangPatternClause(org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternClause) BLangOrderBy(org.wso2.ballerinalang.compiler.tree.clauses.BLangOrderBy) BLangStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamingInput)

Example 2 with StreamActionNode

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

the class BLangPackageBuilder method startStreamActionNode.

public void startStreamActionNode(DiagnosticPos pos, Set<Whitespace> ws, PackageID packageID) {
    StreamActionNode streamActionNode = TreeBuilder.createStreamActionNode();
    ((BLangStreamAction) streamActionNode).pos = pos;
    streamActionNode.addWS(ws);
    this.streamActionNodeStack.push(streamActionNode);
    this.startLambdaFunctionDef(packageID);
}
Also used : StreamActionNode(org.ballerinalang.model.tree.clauses.StreamActionNode)

Example 3 with StreamActionNode

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

the class BLangPackageBuilder method endStreamActionNode.

public void endStreamActionNode(DiagnosticPos pos, Set<Whitespace> ws) {
    StreamActionNode streamActionNode = this.streamActionNodeStack.peek();
    ((BLangStreamAction) streamActionNode).pos = pos;
    streamActionNode.addWS(ws);
    this.addLambdaFunctionDef(pos, ws, true, false, false);
    streamActionNode.setInvokableBody((BLangLambdaFunction) this.exprNodeStack.peek());
}
Also used : StreamActionNode(org.ballerinalang.model.tree.clauses.StreamActionNode)

Aggregations

StreamActionNode (org.ballerinalang.model.tree.clauses.StreamActionNode)3 JoinStreamingInput (org.ballerinalang.model.tree.clauses.JoinStreamingInput)1 OrderByNode (org.ballerinalang.model.tree.clauses.OrderByNode)1 SelectClauseNode (org.ballerinalang.model.tree.clauses.SelectClauseNode)1 StreamingInput (org.ballerinalang.model.tree.clauses.StreamingInput)1 BLangJoinStreamingInput (org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput)1 BLangOrderBy (org.wso2.ballerinalang.compiler.tree.clauses.BLangOrderBy)1 BLangPatternClause (org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternClause)1 BLangPatternStreamingInput (org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput)1 BLangSelectClause (org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectClause)1 BLangStreamAction (org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamAction)1 BLangStreamingInput (org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamingInput)1