Search in sources :

Example 1 with Indexer

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

the class InternalSpelExpressionParser method maybeEatIndexer.

private boolean maybeEatIndexer() {
    Token t = peekToken();
    if (!peekToken(TokenKind.LSQUARE, 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 Indexer(t.startPos, t.endPos, expr));
    return true;
}
Also used : SpelNodeImpl(cn.taketoday.expression.spel.ast.SpelNodeImpl) Indexer(cn.taketoday.expression.spel.ast.Indexer)

Example 2 with Indexer

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

the class InternalSpelExpressionParser method maybeEatIndexer.

private boolean maybeEatIndexer() {
    Token t = peekToken();
    if (!peekToken(TokenKind.LSQUARE, 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 Indexer(t.startPos, t.endPos, expr));
    return true;
}
Also used : SpelNodeImpl(cn.taketoday.expression.spel.ast.SpelNodeImpl) Indexer(cn.taketoday.expression.spel.ast.Indexer)

Aggregations

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