Skip to content

Commit d5a5231

Browse files
committed
oxc-port: get_siblings_between returns empty interim (unblock JSX panic) + deno_ast token capture
1 parent cec17fd commit d5a5231

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/generation/node_helpers.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ pub fn nodes_have_only_spaces_between<'a>(previous_node: Node<'a>, next_node: No
113113
}
114114

115115
pub fn get_siblings_between<'a, 'b>(_node_a: Node<'a>, _node_b: Node<'b>) -> Vec<Node<'a>> {
116-
// oxc-port todo: the SWC view layer exposed `parent().children()` and
117-
// `child_index()`, which oxc has no equivalent for. This is only used for JSX
118-
// child spacing; it needs to be reworked to take the parent's concrete child
119-
// collection (e.g. a `JSXElement`'s `.children`). Will be revisited when JSX
120-
// generation is ported.
121-
todo!("oxc-port: get_siblings_between needs parent child access")
116+
// oxc-port interim: the SWC view layer exposed `parent().children()` /
117+
// `child_index()`, which oxc has no equivalent for. Only used for JSX child
118+
// spacing (detecting `{" "}` space expressions between two children). Returning
119+
// empty avoids a panic; the cost is JSX space-expression spacing between children
120+
// isn't detected here. TODO: rework to take the parent's concrete child collection.
121+
Vec::new()
122122
}
123123

124124
pub fn has_jsx_space_expr_text(node: Node, program: ProgramInfo) -> bool {

0 commit comments

Comments
 (0)