luaur-compiler 0.1.3

Luau source-to-bytecode compiler (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::records::value_visitor::ValueVisitor;
use luaur_ast::records::ast_stat_local_function::AstStatLocalFunction;

impl ValueVisitor {
    pub fn visit_ast_stat_local_function(&mut self, node: *mut AstStatLocalFunction) -> bool {
        unsafe {
            let node_ref = &*node;
            self.variables.get_or_insert(node_ref.name as *mut _).init = node_ref.func as *mut _;
        }

        true
    }
}