Search in sources :

Example 1 with ExpressionNode

use of org.wso2.charon3.core.utils.codeutils.ExpressionNode in project ballerina by ballerina-lang.

the class SemanticAnalyzer method visit.

public void visit(BLangWhere whereClause) {
    ExpressionNode expressionNode = whereClause.getExpression();
    ((BLangExpression) expressionNode).accept(this);
}
Also used : SelectExpressionNode(org.ballerinalang.model.tree.clauses.SelectExpressionNode) ExpressionNode(org.ballerinalang.model.tree.expressions.ExpressionNode) BLangExpression(org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)

Example 2 with ExpressionNode

use of org.wso2.charon3.core.utils.codeutils.ExpressionNode in project ballerina by ballerina-lang.

the class SemanticAnalyzer method visit.

public void visit(BLangJoinStreamingInput joinStreamingInput) {
    StreamingInput streamingInput = joinStreamingInput.getStreamingInput();
    if (streamingInput != null) {
        ((BLangStreamingInput) streamingInput).accept(this);
    }
    ExpressionNode expressionNode = joinStreamingInput.getOnExpression();
    if (expressionNode != null) {
        ((BLangExpression) expressionNode).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) SelectExpressionNode(org.ballerinalang.model.tree.clauses.SelectExpressionNode) ExpressionNode(org.ballerinalang.model.tree.expressions.ExpressionNode) BLangExpression(org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression) BLangStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamingInput)

Example 3 with ExpressionNode

use of org.wso2.charon3.core.utils.codeutils.ExpressionNode in project ballerina by ballerina-lang.

the class SemanticAnalyzer method visit.

public void visit(BLangSelectExpression selectExpression) {
    ExpressionNode expressionNode = selectExpression.getExpression();
    ((BLangExpression) expressionNode).accept(this);
}
Also used : SelectExpressionNode(org.ballerinalang.model.tree.clauses.SelectExpressionNode) ExpressionNode(org.ballerinalang.model.tree.expressions.ExpressionNode) BLangExpression(org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)

Example 4 with ExpressionNode

use of org.wso2.charon3.core.utils.codeutils.ExpressionNode in project ballerina by ballerina-lang.

the class SemanticAnalyzer method visit.

public void visit(BLangSetAssignment setAssignmentClause) {
    ExpressionNode expressionNode = setAssignmentClause.getExpressionNode();
    ((BLangExpression) expressionNode).accept(this);
    ExpressionNode variableReference = setAssignmentClause.getVariableReference();
    ((BLangExpression) variableReference).accept(this);
}
Also used : SelectExpressionNode(org.ballerinalang.model.tree.clauses.SelectExpressionNode) ExpressionNode(org.ballerinalang.model.tree.expressions.ExpressionNode) BLangExpression(org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)

Example 5 with ExpressionNode

use of org.wso2.charon3.core.utils.codeutils.ExpressionNode in project ballerina by ballerina-lang.

the class SiddhiQueryBuilder method visit.

@Override
public void visit(BLangOrderBy orderBy) {
    List<? extends ExpressionNode> varRefs = orderBy.getVariables();
    Iterator<? extends ExpressionNode> iterator = varRefs.iterator();
    BLangSimpleVarRef variableRef = (BLangSimpleVarRef) iterator.next();
    orderByClause = new StringBuilder("order by ");
    addVarRefToClauseBuilder(variableRef, orderByClause);
    while (iterator.hasNext()) {
        orderByClause.append(",").append(" ");
        variableRef = (BLangSimpleVarRef) iterator.next();
        addVarRefToClauseBuilder(variableRef, orderByClause);
    }
}
Also used : BLangSimpleVarRef(org.wso2.ballerinalang.compiler.tree.expressions.BLangSimpleVarRef)

Aggregations

SelectExpressionNode (org.ballerinalang.model.tree.clauses.SelectExpressionNode)16 ExpressionNode (org.ballerinalang.model.tree.expressions.ExpressionNode)16 BLangExpression (org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)11 BadRequestException (org.wso2.charon3.core.exceptions.BadRequestException)8 Attribute (org.wso2.charon3.core.attributes.Attribute)6 ComplexAttribute (org.wso2.charon3.core.attributes.ComplexAttribute)6 MultiValuedAttribute (org.wso2.charon3.core.attributes.MultiValuedAttribute)6 SimpleAttribute (org.wso2.charon3.core.attributes.SimpleAttribute)6 Map (java.util.Map)4 JSONObject (org.json.JSONObject)3 BLangInvocation (org.wso2.ballerinalang.compiler.tree.expressions.BLangInvocation)3 AbstractSCIMObject (org.wso2.charon3.core.objects.AbstractSCIMObject)3 AttributeSchema (org.wso2.charon3.core.schema.AttributeSchema)3 Iterator (java.util.Iterator)2 List (java.util.List)2 JSONArray (org.json.JSONArray)2 BLangNameReference (org.wso2.ballerinalang.compiler.tree.BLangNameReference)2 BLangSimpleVarRef (org.wso2.ballerinalang.compiler.tree.expressions.BLangSimpleVarRef)2 BLangVariableReference (org.wso2.ballerinalang.compiler.tree.expressions.BLangVariableReference)2 NotImplementedException (org.wso2.charon3.core.exceptions.NotImplementedException)2