@Override
  public void compile(QCompiler compiler) {
    AST child = getFirstChild();
    // push receiver, which is any CompiledValue
    ((GemFireAST) child).compile(compiler);
    child = child.getNextSibling();
    while (child != null) {
      switch (child.getType()) {
        case OQLLexerTokenTypes.METHOD_INV:
          // defer to method inv
          ((GemFireAST) child).compile(compiler);
          break;
        case OQLLexerTokenTypes.Identifier:
          compiler.appendPathComponent(child.getText());
          break;
        case OQLLexerTokenTypes.TOK_LBRACK:
          // push the indexExpr List on the stack
          // If the sibling is TOKEN_STAR, push null
          if (child.getFirstChild().getType() == OQLLexerTokenTypes.TOK_STAR) {
            compiler.pushNull();
          } else {
            ((GemFireAST) child).compile(compiler);
          }
          compiler.indexOp();
          break;
        default:
          throw new Error("unexpected node type:" + child.getType());
      }
      child = child.getNextSibling();
    }
  }
This handles paths, method invocations, and index operators that post-fix to a receiver
expression.
geode-core/src/main/java/org/apache/geode/cache/query/internal/parse/ASTPostfix.java