Add many lua annotation

This commit is contained in:
2025-06-26 19:25:03 +10:00
parent 240e0111bf
commit 9338be7eb0
2 changed files with 2 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ use std::{
#[allow(non_camel_case_types)] #[allow(non_camel_case_types)]
pub mod stub_types { pub mod stub_types {
pub struct any; pub struct any;
pub struct many;
pub struct nil; pub struct nil;
pub type boolean = bool; pub type boolean = bool;
pub struct lightuserdata; pub struct lightuserdata;

View File

@@ -656,6 +656,7 @@ fn stub_lua_type(ty: &Type) -> Result<Type> {
} else { } else {
match ty_name(ty)?.to_string().as_str() { match ty_name(ty)?.to_string().as_str() {
"any" => quote_spanned!(span => any), "any" => quote_spanned!(span => any),
"many" => quote_spanned!(span => many),
"nil" => quote_spanned!(span => nil), "nil" => quote_spanned!(span => nil),
"boolean" => quote_spanned!(span => boolean), "boolean" => quote_spanned!(span => boolean),
"lightuserdata" => quote_spanned!(span => lightuserdata), "lightuserdata" => quote_spanned!(span => lightuserdata),