fn pick_comment_out_func(
        end_mark: String,
    ) -> impl Fn(&Vec<Token>, &mut usize) -> ExpressionNode {
        move |content: &Vec<Token>, ind: &mut usize| -> ExpressionNode {
            let mut cache = vec![];

            loop {
                cache.push(content[*ind].clone());
                *ind += 1;
                if content[*ind] == end_mark {
                    cache.push(content[*ind].clone());
                    *ind += 1;
                    break;
                }
            }

            ExpressionNode::Comments(cache.join(""))
        }
    }
// give comment mark and end mark, return comment picker
give comment mark and end mark, return comment picker
give comment mark and end mark return comment picker
fn pick_comment_out_func(
        end_mark: String,
    ) -> impl Fn(&Vec<Token>, &mut usize) -> ExpressionNode {
        move |content: &Vec<Token>, ind: &mut usize| -> ExpressionNode {
            let mut cache = vec![];
            loop {
                cache.push(content[*ind].clone());
                *ind += 1;
                if content[*ind] == end_mark {
                    cache.push(content[*ind].clone());
                    *ind += 1;
                    break;
                }
            }
            ExpressionNode::Comments(cache.join(""))
        }
    }
fn pick_comment_out_func ( end_mark : String , ) -> impl Fn ( & Vec < Token > , & mut usize ) -> ExpressionNode { move | content : & Vec < Token > , ind : & mut usize | -> ExpressionNode { let mut cache = vec ! [ ] ; loop { cache . push ( content [ * ind ] . clone ( ) ) ; * ind += 1 ; if content [ * ind ] == end_mark { cache . push ( content [ * ind ] . clone ( ) ) ; * ind += 1 ; break ; } } ExpressionNode :: Comments ( cache . join ( " " ) ) } }
give comment mark and end mark, return comment picker
give comment mark and end mark return comment picker
end_mark
String
end_mark
String