Add a comment explaining init_info_on_side

accurate_ancestors_v2
Wilfred Hughes 2022-07-18 21:20:51 +07:00
parent 1d8995f04e
commit a4ef836b66
1 changed files with 2 additions and 0 deletions

@ -414,6 +414,8 @@ pub fn init_next_prev<'a>(roots: &[&'a Syntax<'a>]) {
set_prev_is_contiguous(roots); set_prev_is_contiguous(roots);
} }
/// Set all the `SyntaxInfo` values for all the `roots` on a single
/// side (LHS or RHS).
fn init_info_on_side<'a>(roots: &[&'a Syntax<'a>], next_id: &mut SyntaxId) { fn init_info_on_side<'a>(roots: &[&'a Syntax<'a>], next_id: &mut SyntaxId) {
set_parent(roots, None); set_parent(roots, None);
set_num_ancestors(roots, 0); set_num_ancestors(roots, 0);