luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::records::json_emitter::JsonEmitter;
use crate::records::scope_snapshot::ScopeSnapshot;

pub fn write_json_emitter_scope_snapshot(emitter: &mut JsonEmitter, snapshot: &ScopeSnapshot) {
    let mut o = emitter.write_object();
    o.write_pair("bindings", &snapshot.bindings);
    o.write_pair("typeBindings", &snapshot.type_bindings);
    o.write_pair("typePackBindings", &snapshot.type_pack_bindings);
    o.write_pair("children", &snapshot.children);
    o.finish();
}