Search in sources :

Example 1 with Projection

use of cn.taketoday.expression.spel.ast.Projection in project today-infrastructure by TAKETODAY.

the class InternalSpelExpressionParser method maybeEatProjection.

// projection: PROJECT^ expression RCURLY!;
private boolean maybeEatProjection(boolean nullSafeNavigation) {
    Token t = peekToken();
    if (!peekToken(TokenKind.PROJECT, true)) {
        return false;
    }
    Assert.state(t != null, "No token");
    SpelNodeImpl expr = eatExpression();
    Assert.state(expr != null, "No node");
    eatToken(TokenKind.RSQUARE);
    this.constructedNodes.push(new Projection(nullSafeNavigation, t.startPos, t.endPos, expr));
    return true;
}
Also used : SpelNodeImpl(cn.taketoday.expression.spel.ast.SpelNodeImpl) Projection(cn.taketoday.expression.spel.ast.Projection)

Example 2 with Projection

use of cn.taketoday.expression.spel.ast.Projection in project today-framework by TAKETODAY.

the class InternalSpelExpressionParser method maybeEatProjection.

// projection: PROJECT^ expression RCURLY!;
private boolean maybeEatProjection(boolean nullSafeNavigation) {
    Token t = peekToken();
    if (!peekToken(TokenKind.PROJECT, true)) {
        return false;
    }
    Assert.state(t != null, "No token");
    SpelNodeImpl expr = eatExpression();
    Assert.state(expr != null, "No node");
    eatToken(TokenKind.RSQUARE);
    this.constructedNodes.push(new Projection(nullSafeNavigation, t.startPos, t.endPos, expr));
    return true;
}
Also used : SpelNodeImpl(cn.taketoday.expression.spel.ast.SpelNodeImpl) Projection(cn.taketoday.expression.spel.ast.Projection)

Aggregations

Projection (cn.taketoday.expression.spel.ast.Projection)2 SpelNodeImpl (cn.taketoday.expression.spel.ast.SpelNodeImpl)2