Search in sources :

Example 1 with BLangWithinClause

use of org.wso2.ballerinalang.compiler.tree.clauses.BLangWithinClause in project ballerina by ballerina-lang.

the class SiddhiQueryBuilder method visit.

@Override
public void visit(BLangPatternClause patternClause) {
    if (patternClause.isForAllEvents()) {
        patternStreamingClause.append("every ");
    }
    BLangPatternStreamingInput patternStreamingInput = (BLangPatternStreamingInput) patternClause.getPatternStreamingNode();
    patternStreamingInput.accept(this);
    BLangWithinClause withinClause = (BLangWithinClause) patternClause.getWithinClause();
    if (withinClause != null) {
        withinClause.accept(this);
    }
}
Also used : BLangPatternStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput) BLangWithinClause(org.wso2.ballerinalang.compiler.tree.clauses.BLangWithinClause)

Example 2 with BLangWithinClause

use of org.wso2.ballerinalang.compiler.tree.clauses.BLangWithinClause in project ballerina by ballerina-lang.

the class BLangPackageBuilder method startWithinClause.

public void startWithinClause(DiagnosticPos pos, Set<Whitespace> ws) {
    WithinClause withinClause = TreeBuilder.createWithinClause();
    ((BLangWithinClause) withinClause).pos = pos;
    withinClause.addWS(ws);
    this.withinClauseStack.push(withinClause);
}
Also used : BLangWithinClause(org.wso2.ballerinalang.compiler.tree.clauses.BLangWithinClause) WithinClause(org.ballerinalang.model.tree.clauses.WithinClause)

Example 3 with BLangWithinClause

use of org.wso2.ballerinalang.compiler.tree.clauses.BLangWithinClause in project ballerina by ballerina-lang.

the class BLangPackageBuilder method endWithinClause.

public void endWithinClause(DiagnosticPos pos, Set<Whitespace> ws) {
    WithinClause withinClause = this.withinClauseStack.peek();
    ((BLangWithinClause) withinClause).pos = pos;
    withinClause.addWS(ws);
    withinClause.setWithinTimePeriod(exprNodeStack.pop());
}
Also used : BLangWithinClause(org.wso2.ballerinalang.compiler.tree.clauses.BLangWithinClause) WithinClause(org.ballerinalang.model.tree.clauses.WithinClause)

Aggregations

BLangWithinClause (org.wso2.ballerinalang.compiler.tree.clauses.BLangWithinClause)3 WithinClause (org.ballerinalang.model.tree.clauses.WithinClause)2 BLangPatternStreamingInput (org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput)1