private void walkInternal()

in api/src/main/java/com/google/appengine/api/search/query/QueryTreeWalker.java [85:167]


  private void walkInternal(Tree tree, T context) {
    switch (tree.getType()) {
      case QueryLexer.CONJUNCTION:
        context.setInDisjunction(false);
        walkChildren(tree, context);
        visitor.visitConjunction(tree, context);
        postBooleanExpression(context);
        break;
      case QueryLexer.DISJUNCTION:
        context.setInDisjunction(true);
        walkChildren(tree, context);
        visitor.visitDisjunction(tree, context);
        postBooleanExpression(context);
        break;
      case QueryLexer.SEQUENCE:
        context.setInDisjunction(false);
        walkChildren(tree, context);
        visitor.visitSequence(tree, context);
        postBooleanExpression(context);
        break;
      case QueryLexer.NEGATION:
        walkChildren(tree, context);
        visitor.visitNegation(tree, context);
        postBooleanExpression(context);
        break;
      case QueryLexer.HAS:
        walkChildren(tree, context);
        visitor.visitContains(tree, context);
        postBooleanExpression(context);
        break;
      case QueryLexer.EQ:
        walkChildren(tree, context);
        visitor.visitEqual(tree, context);
        postBooleanExpression(context);
        break;
      case QueryLexer.NE:
        throw new SearchQueryException("!= comparison operator is not available");
      case QueryLexer.LESSTHAN:
        walkChildren(tree, context);
        visitor.visitLessThan(tree, context);
        postBooleanExpression(context);
        break;
      case QueryLexer.LE:
        walkChildren(tree, context);
        visitor.visitLessOrEqual(tree, context);
        postBooleanExpression(context);
        break;
      case QueryLexer.GT:
        walkChildren(tree, context);
        visitor.visitGreaterThan(tree, context);
        postBooleanExpression(context);
        break;
      case QueryLexer.GE:
        walkChildren(tree, context);
        visitor.visitGreaterOrEqual(tree, context);
        postBooleanExpression(context);
        break;
      case QueryLexer.FUZZY:
        walkInternal(tree.getChild(0), context);
        visitor.visitFuzzy(tree, context);
        // Type and kind are set by the visitor.
        break;
      case QueryLexer.LITERAL:
        walkInternal(tree.getChild(0), context);
        visitor.visitLiteral(tree, context);
        // Type and kind are set by the visitor.
        break;
      case QueryLexer.VALUE:
        visitor.visitValue(tree, context);
        // Type and kind are set by the visitor.
        break;
      case QueryLexer.FUNCTION:
        walkChildren(tree.getChild(1), context);
        visitor.visitFunction(tree, context);
        // Type and kind are set by the visitor.
        break;
      case QueryLexer.GLOBAL:
        visitor.visitGlobal(tree, context);
        break;
      default:
        visitor.visitOther(tree, context);
    }
  }