luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate alloc;

use crate::functions::dump_instruction::dump_instruction;
use crate::records::block::Block;
use crate::type_aliases::definition::Definition;
use alloc::string::String;
use luaur_ast::records::ast_expr::AstExpr;
use luaur_common::records::dense_hash_map::DenseHashMap;

pub fn dump_block(block: &Block, use_defs: &DenseHashMap<*mut AstExpr, *mut Definition>) -> String {
    let mut result = String::new();
    for inst in block.get_instructions() {
        result.push_str("  ");
        result.push_str(&dump_instruction(*inst, use_defs));
        result.push('\n');
    }
    result
}