{@inheritDoc} This implementation scans the children in left to right order.

@param node  {@inheritDoc}
@param p  {@inheritDoc}
@return the result of scanning
323210
@Override
    public R visitLambdaExpression(LambdaExpressionTree node, P p) {
        R r = scan(node.getParameters(), p);
        r = scanAndReduce(node.getBody(), p, r);
        return r;
    }
1240290
public List<T> next(T node) {
	List<T> sons = new ArrayList<T>();
	if(left(node) != null) sons.add(left(node));
	if(right(node) != null) sons.add(right(node));
	return sons;
    }
280053
@Override
    public R visitUnknownInlineTag(UnknownInlineTagTree node, P p) {
        return scan(node.getContent(), p);
    }
912724
@Override
    public R visitSee(SeeTree node, P p) {
        return scan(node.getReference(), p);
    }
601855
public void scanNode(SiteNode node, boolean incPort, User user) {
 		log.debug("scanNode" + prefix + " node=" + node.getNodeName());
		this.setTabFocus();
		nodeSelected(node, incPort);
		if (currentSite != null && this.getStartScanButton().isEnabled()) {
			startScan(node, false, false, null, user);
		}
	}
822239
@Override
    public R visitStartElement(StartElementTree node, P p) {
        return scan(node.getAttributes(), p);
    }
1306983
public static void sortNode(TreeNode node, Comparator comparator) {
        TreeNodeList children = (TreeNodeList) node.getChildren();

        if (children != null && !children.isEmpty()) {
            Object[] childrenArray = children.toArray();
            Arrays.sort(childrenArray, comparator);
            for (int i = 0; i < childrenArray.length; i++) {
                children.setSibling(i, (TreeNode) childrenArray[i]);
            }

            for (int i = 0; i < children.size(); i++) {
                sortNode(children.get(i), comparator);
            }
        }
    }
441106
@Override
    public R visitPackage(PackageTree node, P p) {
        R r = scan(node.getAnnotations(), p);
        r = scanAndReduce(node.getPackageName(), p, r);
        return r;
    }
1341311
protected List<R> visitChildren(ParentNode<? extends N> node) {
    List<R> results = new ArrayList<>(node.numChildren());
    for (N child : node.getChildren()) {
      results.add(visit(child));
    }
    return results;
  }
53500
public static Iterable<String> iterate(final String node) {
        return new Iterable<String>() {
            @Override
            public Iterator<String> iterator() {
                return new Scanner(node).useDelimiter("/");
            }
        };
    }
107506
@Override
    public R visitCompilationUnit(CompilationUnitTree node, P p) {
        R r = scan(node.getPackage(), p);
        r = scanAndReduce(node.getImports(), p, r);
        r = scanAndReduce(node.getTypeDecls(), p, r);
        return r;
    }
198929
@Override
    public R visitInheritDoc(InheritDocTree node, P p) {
        return defaultAction(node, p);
    }
1341546
private Node getFirstChild(Node node) {

		if (node == null)
			return null;

		Node newNode = node.getFirstChild();
		if (newNode == null)
			return null;

		int accept = acceptNode(newNode);
		if (accept == NodeFilter.FILTER_ACCEPT)
			return newNode;
		else if (accept == NodeFilter.FILTER_SKIP && newNode.hasChildNodes())
			return getFirstChild(newNode);

		// if (accept == NodeFilter.REJECT_NODE)
		return getNextSibling(newNode);
	}
969060
private V findSmallest(Node node) {
        if (node == null) {
            return null;
        }

        while (node.left != null) {
            node = node.left;
        }

        return node.item;
    }
17974
@Override
  public void visit(final NodeTraversal t, final Node n, final Node p) {
    final JSDocInfo info = n.getJSDocInfo();
    if (info == null) {
      return;
    }
    final JSTypeRegistry registry = compiler.getTypeRegistry();

    final List<Node> thrownTypes =
        transform(
            info.getThrownTypes(),
            new Function<JSTypeExpression, Node>() {
              @Override
              public Node apply(JSTypeExpression expr) {
                return expr.getRoot();
              }
            });

    final Scope scope = t.getScope();
    for (Node typeRoot : info.getTypeNodes()) {
      NodeUtil.visitPreOrder(
          typeRoot,
          new NodeUtil.Visitor() {
            @Override
            public void visit(Node node) {
              if (!node.isString()) {
                return;
              }
              if (thrownTypes.contains(node)) {
                return;
              }
              Node parent = node.getParent();
              if (parent != null) {
                switch (parent.getToken()) {
                  case BANG:
                  case QMARK:
                  case THIS: // The names inside function(this:Foo) and
                  case NEW: // function(new:Bar) are already non-null.
                  case TYPEOF: // Names after 'typeof' don't have nullability.
                    return;
                  case PIPE:
                    { // Inside a union
                      Node gp = parent.getParent();
                      if (gp != null && gp.getToken() == Token.QMARK) {
                        return; // Inside an explicitly nullable union
                      }
                      for (Node child : parent.children()) {
                        if ((child.isString() && child.getString().equals("null"))
                            || child.getToken() == Token.QMARK) {
                          return; // Inside a union that contains null or nullable type
                        }
                      }
                      break;
                    }
                  default:
                    break;
                }
              }
              String typeName = node.getString();
              if (typeName.equals("null") || registry.getType(scope, typeName) == null) {
                return;
              }
              JSType type = registry.createTypeFromCommentNode(node);
              if (type.isNullable()) {
                compiler.report(JSError.make(node, IMPLICITLY_NULLABLE_JSDOC, typeName));
              }
            }
          },
          Predicates.alwaysTrue());
    }
  }
1219237
@Override
    public R visitUses(UsesTree node, P p) {
        R r = scan(node.getServiceType(), p);
        r = scanAndReduce(node.getDescription(), p, r);
        return r;
    }
407928
final Node succ(Node p) {
        Node next = p.next;
        return (p == next) ? head : next;
    }