luaur-ast 0.1.3

Lexer, parser, and AST for Luau (faithful Rust port).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::records::ast_array::AstArray;
use crate::records::parser::Parser;

#[allow(non_snake_case)]
impl Parser {
    pub fn copy_initializer_list_t<T: Clone>(&mut self, data: &[T]) -> AstArray<T> {
        self.copy_t_usize(
            if data.is_empty() {
                core::ptr::null()
            } else {
                data.as_ptr()
            },
            data.len(),
        )
    }
}