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 core::fmt::Write;
use luaur_ast::records::position::Position;

pub fn operator_lt_ostream_position(
    stream: &mut dyn Write,
    position: &Position,
) -> core::fmt::Result {
    // Add one so that the numbers we display match what people see in their text editors.
    write!(
        stream,
        "{{ line = {}, col = {} }}",
        position.line + 1,
        position.column + 1
    )
}