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
use crate::records::constraint_generation_log::ConstraintGenerationLog;
use crate::records::json_emitter::JsonEmitter;
use crate::records::object_emitter::ObjectEmitter;

pub fn write_json_emitter_constraint_generation_log(
    emitter: &mut JsonEmitter,
    log: &ConstraintGenerationLog,
) {
    let mut o: ObjectEmitter = emitter.write_object();
    o.write_pair("source", &log.source);
    o.write_pair("errors", &log.errors);
    o.write_pair("exprTypeLocations", &log.expr_type_locations);
    o.write_pair("annotationTypeLocations", &log.annotation_type_locations);
    o.finish();
}