(root: Node<'_>, source: &str, names: &mut BTreeSet<String>)
| 309 | } |
| 310 | |
| 311 | fn binding_names(root: Node<'_>, source: &str, names: &mut BTreeSet<String>) { |
| 312 | let mut stack = vec![root]; |
| 313 | while let Some(node) = stack.pop() { |
| 314 | if matches!( |
| 315 | node.kind(), |
| 316 | "identifier" | "shorthand_property_identifier_pattern" |
| 317 | ) { |
| 318 | names.insert(text(node, source).into()); |
| 319 | } else { |
| 320 | stack.extend(children(node)); |
| 321 | } |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | fn conditional(mut node: Node<'_>, source: &str) -> bool { |
| 326 | loop { |