use of org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput in project ballerina by ballerina-lang.
the class SiddhiQueryBuilder method visit.
@Override
public void visit(BLangPatternStreamingInput patternStreamingInput) {
boolean isFollowedByPattern = patternStreamingInput.isFollowedBy();
boolean enclosedInParanthesisPattern = patternStreamingInput.enclosedInParanthesis();
List<PatternStreamingEdgeInputNode> patternStreamingEdgeInputs = patternStreamingInput.getPatternStreamingEdgeInputs();
BLangPatternStreamingInput nestedPatternStreamingInput = (BLangPatternStreamingInput) patternStreamingInput.getPatternStreamingInput();
if (isFollowedByPattern) {
BLangPatternStreamingEdgeInput patternStreamingEdgeInput = (BLangPatternStreamingEdgeInput) patternStreamingEdgeInputs.get(0);
patternStreamingEdgeInput.accept(this);
patternStreamingClause.append(" -> ");
((BLangPatternStreamingInput) patternStreamingInput.getPatternStreamingInput()).accept(this);
}
if (enclosedInParanthesisPattern) {
patternStreamingClause.append("( ");
nestedPatternStreamingInput.accept(this);
patternStreamingClause.append(" ) ");
}
if (!isFollowedByPattern && !enclosedInParanthesisPattern) {
BLangPatternStreamingEdgeInput patternStreamingEdgeInput = (BLangPatternStreamingEdgeInput) patternStreamingEdgeInputs.get(0);
patternStreamingEdgeInput.accept(this);
}
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput 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);
}
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput in project ballerina by ballerina-lang.
the class SemanticAnalyzer method visit.
@Override
public void visit(BLangPatternStreamingInput patternStreamingInput) {
List<PatternStreamingEdgeInputNode> patternStreamingEdgeInputs = patternStreamingInput.getPatternStreamingEdgeInputs();
for (PatternStreamingEdgeInputNode inputNode : patternStreamingEdgeInputs) {
BLangPatternStreamingEdgeInput streamingInput = (BLangPatternStreamingEdgeInput) inputNode;
streamingInput.accept(this);
}
BLangPatternStreamingInput nestedPatternStreamingInput = (BLangPatternStreamingInput) patternStreamingInput.getPatternStreamingInput();
if (nestedPatternStreamingInput != null) {
nestedPatternStreamingInput.accept(this);
}
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput in project ballerina by ballerina-lang.
the class SemanticAnalyzer method visit.
@Override
public void visit(BLangPatternClause patternClause) {
BLangPatternStreamingInput patternStreamingInput = (BLangPatternStreamingInput) patternClause.getPatternStreamingNode();
patternStreamingInput.accept(this);
}
Aggregations