luaur_ast/methods/parser_copy_parser_alt_c.rs
1use crate::records::ast_array::AstArray;
2use crate::records::parser::Parser;
3
4#[allow(non_snake_case)]
5impl Parser {
6 pub fn copy_initializer_list_t<T: Clone>(&mut self, data: &[T]) -> AstArray<T> {
7 self.copy_t_usize(
8 if data.is_empty() {
9 core::ptr::null()
10 } else {
11 data.as_ptr()
12 },
13 data.len(),
14 )
15 }
16}