Return an iterable object that iterates over this node's children. The iterator does not support the optional operation {@link Iterator#remove()}.
To iterate over a node's children, one can write
Node n = ...; for (Node child : n.children()) { ...
187188189190191192193194195196197
JSDocInfo info = NodeUtil.getBestJSDocInfo(fn); if (templateParametersNode.hasChildren()) { Preconditions.checkNotNull(info, "Missing JSDoc declaration for template function %s", fnName); } for (Node paramNode : templateParametersNode.children()) { String name = paramNode.getString(); JSTypeExpression expression = info.getParameterType(name); Preconditions.checkNotNull(expression, "Missing JSDoc for parameter %s of template function %s", name, fnName);
217218219220221222223224225226227
if (name.equals(current.getQualifiedName()) && current.getJSType() != null) { return current.getJSType(); } for (Node child : current.children()) { queue.push(child); } } return null; }
465466467468469470471472473474475
Preconditions.checkState(caseNode == executingCase || !executingCase.isDefaultCase()); Node block = executingCase.getLastChild(); Preconditions.checkState(block.isBlock()); if (block.hasChildren()) { for (Node blockChild : block.children()) { // If this is a block with a labelless break, it is useless. switch (blockChild.getType()) { case Token.BREAK: // A break to a different control structure isn't useless. return blockChild.getFirstChild() == null;
21582159216021612162216321642165216621672168
if (matcher.apply(current) && current.getJSType() != null) { return current.getJSType(); } for (Node child : current.children()) { queue.push(child); } } return null; }
751752753754755756757758759760761
return; } // Last, read the object-literal properties and create the EnumType. JSDocInfo jsdoc = NodeUtil.getBestJSDocInfo(qnameNode); Set<String> propNames = new HashSet<>(); for (Node prop : init.children()) { String pname = NodeUtil.getObjectLitKeyName(prop); if (propNames.contains(pname)) { warnings.add(JSError.make(qnameNode, DUPLICATE_PROP_IN_ENUM, pname)); } if (!convention.isValidEnumKey(pname)) {
595596597598599600601602603604605
Node returnNode = fnChild.getFirstChild(); if (!returnNode.isReturn()) { throw new MalformedException("RETURN node expected; found: " + getReadableTokenName(returnNode), returnNode); } for (Node child : returnNode.children()) { extractFromReturnDescendant(builder, child); } // Check that all placeholders from the message text have appropriate // object literal keys
897898899900901902903904905906907
} /* * Check to see if locally created EventHandler is assigned to field */ for (Node sibling : parent.children()) { if (sibling.isExprResult()) { Node assign = sibling.getFirstChild(); if (assign.isAssign()) { // assign.getLastChild().isEquivalentTo(propertyNode) did not work if (propertyNode.matchesQualifiedName(assign.getLastChild())) {
275276277278279280281282283284285
} public Iterable<Node> getParameters() { Node n = getParametersNode(); if (n != null) { return n.children(); } else { return Collections.emptySet(); } }
12381239124012411242124312441245124612471248
} if (!variableNode.isArrayLit()) { eventfulObjectDisposed(t, variableNode); } else { for (Node child : variableNode.children()) { eventfulObjectDisposed(t, child); } } }
336337338339340341342343344345346
String rename = getObfuscatedName( arg, callName, nameGenerator, arg.getString()); parent.replaceChild(n, IR.string(rename)); compiler.reportCodeChange(); } else if (arg.isObjectLit()) { for (Node key : arg.children()) { String rename = getObfuscatedName( key, callName, nameGenerator, key.getString()); key.setString(rename); // Prevent standard renaming by marking the key as quoted. key.putBooleanProp(Node.QUOTED_PROP, true);