extractModifiers — expect/actual platform modifiers, matched by NODE TYPE (never text), in order. Runs inside create_node for every node.
(&self, node: Node)
| 726 | /// extractModifiers — expect/actual platform modifiers, matched by NODE |
| 727 | /// TYPE (never text), in order. Runs inside create_node for every node. |
| 728 | fn extract_modifiers(&self, node: Node) -> Option<Vec<String>> { |
| 729 | let mut mods: Vec<String> = Vec::new(); |
| 730 | for child in node.children(&mut node.walk()) { |
| 731 | if child.kind() != "modifiers" { |
| 732 | continue; |
| 733 | } |
| 734 | for pm in child.children(&mut child.walk()) { |
| 735 | if pm.kind() != "platform_modifier" { |
| 736 | continue; |
| 737 | } |
| 738 | for kw in pm.children(&mut pm.walk()) { |
| 739 | if matches!(kw.kind(), "expect" | "actual") { |
| 740 | mods.push(kw.kind().to_string()); |
| 741 | } |
| 742 | } |
| 743 | } |
| 744 | } |
| 745 | if mods.is_empty() { None } else { Some(mods) } |
| 746 | } |
| 747 | |
| 748 | // --- the visitNode hook (property branch ONLY — fun-interface recovery is |
| 749 | // defer-shielded and not ported) ------------------------------------------------ |
no test coverage detected