emmylua_code_analysis 0.22.0

A library for analyzing lua code.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[cfg(test)]
mod tests {
    use crate::{DiagnosticCode, VirtualWorkspace};

    #[test]
    fn test_if_number_then() {
        let mut ws = VirtualWorkspace::new();
        assert!(!ws.check_code_for(
            DiagnosticCode::SyntaxError,
            r#"
            if 0then
            end
            "#
        ));
    }
}