Search in sources :

Example 1 with ExpressionNode

use of org.ballerinalang.model.tree.expressions.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.ballerinalang.model.tree.expressions.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.ballerinalang.model.tree.expressions.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.ballerinalang.model.tree.expressions.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.ballerinalang.model.tree.expressions.ExpressionNode in project ballerina by ballerina-lang.

the class SiddhiQueryBuilder method visit.

@Override
public void visit(BLangBinaryExpr expr) {
    binaryExpr = new StringBuilder();
    ExpressionNode leftExpression = expr.getLeftExpression();
    if (leftExpression != null) {
        addVarRefToClauseBuilder((BLangExpression) leftExpression, binaryExpr);
    }
    OperatorKind operatorKind = expr.getOperatorKind();
    if (operatorKind != null) {
        binaryExpr.append(" ").append(getOperandAsString(operatorKind)).append(" ");
    }
    ExpressionNode rightExpression = expr.getRightExpression();
    if (rightExpression != null) {
        addVarRefToClauseBuilder((BLangExpression) rightExpression, binaryExpr);
    }
    varRef = binaryExpr.toString();
}
Also used : OperatorKind(org.ballerinalang.model.tree.OperatorKind) SelectExpressionNode(org.ballerinalang.model.tree.clauses.SelectExpressionNode) ExpressionNode(org.ballerinalang.model.tree.expressions.ExpressionNode)

Aggregations

SelectExpressionNode (org.ballerinalang.model.tree.clauses.SelectExpressionNode)18 ExpressionNode (org.ballerinalang.model.tree.expressions.ExpressionNode)18 BLangExpression (org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)9 BLangInvocation (org.wso2.ballerinalang.compiler.tree.expressions.BLangInvocation)3 BLangNameReference (org.wso2.ballerinalang.compiler.tree.BLangNameReference)2 BLangVariableReference (org.wso2.ballerinalang.compiler.tree.expressions.BLangVariableReference)2 Whitespace (org.ballerinalang.model.Whitespace)1 IdentifierNode (org.ballerinalang.model.tree.IdentifierNode)1 OperatorKind (org.ballerinalang.model.tree.OperatorKind)1 JoinStreamingInput (org.ballerinalang.model.tree.clauses.JoinStreamingInput)1 StreamingInput (org.ballerinalang.model.tree.clauses.StreamingInput)1 WhereNode (org.ballerinalang.model.tree.clauses.WhereNode)1 BLangJoinStreamingInput (org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput)1 BLangPatternStreamingInput (org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput)1 BLangStreamingInput (org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamingInput)1 BLangWhere (org.wso2.ballerinalang.compiler.tree.clauses.BLangWhere)1 BLangArrayLiteral (org.wso2.ballerinalang.compiler.tree.expressions.BLangArrayLiteral)1 BLangTypeInit (org.wso2.ballerinalang.compiler.tree.expressions.BLangTypeInit)1 BLangAssignment (org.wso2.ballerinalang.compiler.tree.statements.BLangAssignment)1 BLangBlockStmt (org.wso2.ballerinalang.compiler.tree.statements.BLangBlockStmt)1