luaur-analysis 0.1.0

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::functions::to_pointer_id_dcr_logger::to_pointer_id;
use crate::records::annotation_types_at_location::AnnotationTypesAtLocation;
use crate::records::json_emitter::JsonEmitter;

pub fn write_json_emitter_annotation_types_at_location(
    emitter: &mut JsonEmitter,
    tys: &AnnotationTypesAtLocation,
) {
    let mut o = emitter.write_object();
    o.write_pair("location", &tys.location);
    o.write_pair("resolvedTy", to_pointer_id(tys.resolved_ty as *const _));
    o.finish();
}