engage/generated/moon_sharp/interpreter/tree/
lexerutils.rs1#[cfg(feature = "moon_sharp-interpreter-tree-lexerutils-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/tree/lexerutils/LexerUtils.md"))]
11 #[::unity::class(namespace = "MoonSharp.Interpreter.Tree", name = "LexerUtils")]
12 #[parent(crate::system::object::Object)]
13 pub struct LexerUtils {}
14}
15
16#[cfg(feature = "moon_sharp-interpreter-tree-lexerutils-types")]
17pub use __types::*;
18
19#[cfg(feature = "moon_sharp-interpreter-tree-lexerutils")]
20#[doc(hidden)]
21#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
22mod __LexerUtils_unity_raw {
23 use super::*;
24 #[doc(hidden)]
25 #[allow(non_snake_case)]
26 pub mod __lookup_parse_number {
27 use super::*;
28 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
29 let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
30 &[<crate::moon_sharp::interpreter::tree::token::Token as ::unity::IlType>::il_type()];
31 ::unity::lookup::method_info_on_class_with_signature(<LexerUtils as ::unity::ClassIdentity>::class(), "ParseNumber", 1, param_types, true)
32 });
33 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
34 match &*METHOD {
35 ::core::result::Result::Ok(mi) => *mi,
36 ::core::result::Result::Err(e) => {
37 panic!(
38 "method lookup failed: {}
39::{}
40: {}
41",
42 <LexerUtils as ::unity::ClassIdentity>::NAME,
43 "ParseNumber",
44 e
45 )
46 },
47 }
48 }
49 }
50 #[doc(hidden)]
51 #[allow(non_snake_case)]
52 pub mod __lookup_parse_hex_integer {
53 use super::*;
54 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
55 let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
56 &[<crate::moon_sharp::interpreter::tree::token::Token as ::unity::IlType>::il_type()];
57 ::unity::lookup::method_info_on_class_with_signature(
58 <LexerUtils as ::unity::ClassIdentity>::class(),
59 "ParseHexInteger",
60 1,
61 param_types,
62 true,
63 )
64 });
65 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
66 match &*METHOD {
67 ::core::result::Result::Ok(mi) => *mi,
68 ::core::result::Result::Err(e) => {
69 panic!(
70 "method lookup failed: {}
71::{}
72: {}
73",
74 <LexerUtils as ::unity::ClassIdentity>::NAME,
75 "ParseHexInteger",
76 e
77 )
78 },
79 }
80 }
81 }
82 #[doc(hidden)]
83 #[allow(non_snake_case)]
84 pub mod __lookup_read_hex_progressive {
85 use super::*;
86 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
87 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
88 <::unity::Il2CppString as ::unity::IlType>::il_type(),
89 <f64 as ::unity::IlType>::il_type(),
90 <i32 as ::unity::IlType>::il_type(),
91 ];
92 ::unity::lookup::method_info_on_class_with_signature(
93 <LexerUtils as ::unity::ClassIdentity>::class(),
94 "ReadHexProgressive",
95 3,
96 param_types,
97 true,
98 )
99 });
100 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
101 match &*METHOD {
102 ::core::result::Result::Ok(mi) => *mi,
103 ::core::result::Result::Err(e) => {
104 panic!(
105 "method lookup failed: {}
106::{}
107: {}
108",
109 <LexerUtils as ::unity::ClassIdentity>::NAME,
110 "ReadHexProgressive",
111 e
112 )
113 },
114 }
115 }
116 }
117 #[doc(hidden)]
118 #[allow(non_snake_case)]
119 pub mod __lookup_parse_hex_float {
120 use super::*;
121 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
122 let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
123 &[<crate::moon_sharp::interpreter::tree::token::Token as ::unity::IlType>::il_type()];
124 ::unity::lookup::method_info_on_class_with_signature(
125 <LexerUtils as ::unity::ClassIdentity>::class(),
126 "ParseHexFloat",
127 1,
128 param_types,
129 true,
130 )
131 });
132 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
133 match &*METHOD {
134 ::core::result::Result::Ok(mi) => *mi,
135 ::core::result::Result::Err(e) => {
136 panic!(
137 "method lookup failed: {}
138::{}
139: {}
140",
141 <LexerUtils as ::unity::ClassIdentity>::NAME,
142 "ParseHexFloat",
143 e
144 )
145 },
146 }
147 }
148 }
149 #[doc(hidden)]
150 #[allow(non_snake_case)]
151 pub mod __lookup_hex_digit2_value {
152 use super::*;
153 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
154 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<u16 as ::unity::IlType>::il_type()];
155 ::unity::lookup::method_info_on_class_with_signature(
156 <LexerUtils as ::unity::ClassIdentity>::class(),
157 "HexDigit2Value",
158 1,
159 param_types,
160 true,
161 )
162 });
163 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
164 match &*METHOD {
165 ::core::result::Result::Ok(mi) => *mi,
166 ::core::result::Result::Err(e) => {
167 panic!(
168 "method lookup failed: {}
169::{}
170: {}
171",
172 <LexerUtils as ::unity::ClassIdentity>::NAME,
173 "HexDigit2Value",
174 e
175 )
176 },
177 }
178 }
179 }
180 #[doc(hidden)]
181 #[allow(non_snake_case)]
182 pub mod __lookup_char_is_digit {
183 use super::*;
184 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
185 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<u16 as ::unity::IlType>::il_type()];
186 ::unity::lookup::method_info_on_class_with_signature(<LexerUtils as ::unity::ClassIdentity>::class(), "CharIsDigit", 1, param_types, true)
187 });
188 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
189 match &*METHOD {
190 ::core::result::Result::Ok(mi) => *mi,
191 ::core::result::Result::Err(e) => {
192 panic!(
193 "method lookup failed: {}
194::{}
195: {}
196",
197 <LexerUtils as ::unity::ClassIdentity>::NAME,
198 "CharIsDigit",
199 e
200 )
201 },
202 }
203 }
204 }
205 #[doc(hidden)]
206 #[allow(non_snake_case)]
207 pub mod __lookup_char_is_hex_digit {
208 use super::*;
209 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
210 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<u16 as ::unity::IlType>::il_type()];
211 ::unity::lookup::method_info_on_class_with_signature(
212 <LexerUtils as ::unity::ClassIdentity>::class(),
213 "CharIsHexDigit",
214 1,
215 param_types,
216 true,
217 )
218 });
219 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
220 match &*METHOD {
221 ::core::result::Result::Ok(mi) => *mi,
222 ::core::result::Result::Err(e) => {
223 panic!(
224 "method lookup failed: {}
225::{}
226: {}
227",
228 <LexerUtils as ::unity::ClassIdentity>::NAME,
229 "CharIsHexDigit",
230 e
231 )
232 },
233 }
234 }
235 }
236 #[doc(hidden)]
237 #[allow(non_snake_case)]
238 pub mod __lookup_adjust_lua_long_string {
239 use super::*;
240 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
241 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<::unity::Il2CppString as ::unity::IlType>::il_type()];
242 ::unity::lookup::method_info_on_class_with_signature(
243 <LexerUtils as ::unity::ClassIdentity>::class(),
244 "AdjustLuaLongString",
245 1,
246 param_types,
247 true,
248 )
249 });
250 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
251 match &*METHOD {
252 ::core::result::Result::Ok(mi) => *mi,
253 ::core::result::Result::Err(e) => {
254 panic!(
255 "method lookup failed: {}
256::{}
257: {}
258",
259 <LexerUtils as ::unity::ClassIdentity>::NAME,
260 "AdjustLuaLongString",
261 e
262 )
263 },
264 }
265 }
266 }
267 #[doc(hidden)]
268 #[allow(non_snake_case)]
269 pub mod __lookup_unescape_lua_string {
270 use super::*;
271 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
272 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
273 <crate::moon_sharp::interpreter::tree::token::Token as ::unity::IlType>::il_type(),
274 <::unity::Il2CppString as ::unity::IlType>::il_type(),
275 ];
276 ::unity::lookup::method_info_on_class_with_signature(
277 <LexerUtils as ::unity::ClassIdentity>::class(),
278 "UnescapeLuaString",
279 2,
280 param_types,
281 true,
282 )
283 });
284 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
285 match &*METHOD {
286 ::core::result::Result::Ok(mi) => *mi,
287 ::core::result::Result::Err(e) => {
288 panic!(
289 "method lookup failed: {}
290::{}
291: {}
292",
293 <LexerUtils as ::unity::ClassIdentity>::NAME,
294 "UnescapeLuaString",
295 e
296 )
297 },
298 }
299 }
300 }
301 #[doc(hidden)]
302 #[allow(non_snake_case)]
303 pub mod __lookup_convert_utf32_to_char {
304 use super::*;
305 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
306 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<i32 as ::unity::IlType>::il_type()];
307 ::unity::lookup::method_info_on_class_with_signature(
308 <LexerUtils as ::unity::ClassIdentity>::class(),
309 "ConvertUtf32ToChar",
310 1,
311 param_types,
312 true,
313 )
314 });
315 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
316 match &*METHOD {
317 ::core::result::Result::Ok(mi) => *mi,
318 ::core::result::Result::Err(e) => {
319 panic!(
320 "method lookup failed: {}
321::{}
322: {}
323",
324 <LexerUtils as ::unity::ClassIdentity>::NAME,
325 "ConvertUtf32ToChar",
326 e
327 )
328 },
329 }
330 }
331 }
332}
333
334#[cfg(feature = "moon_sharp-interpreter-tree-lexerutils")]
335impl LexerUtils {
336 #[doc = "`ParseNumber(crate::moon_sharp::interpreter::tree::token::Token)` overload"]
337 pub fn parse_number(t: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::token::Token>) -> f64 {
338 unsafe {
339 ::unity::il2cpp_call!(__LexerUtils_unity_raw::__lookup_parse_number::get_method_info().method_ptr,f64;
340(crate::moon_sharp::interpreter::tree::token::Token)::core::convert::Into::into(t))
341 }
342 }
343
344 #[doc = "`ParseHexInteger(crate::moon_sharp::interpreter::tree::token::Token)` overload"]
345 pub fn parse_hex_integer(t: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::token::Token>) -> f64 {
346 unsafe {
347 ::unity::il2cpp_call!(__LexerUtils_unity_raw::__lookup_parse_hex_integer::get_method_info().method_ptr,f64;
348(crate::moon_sharp::interpreter::tree::token::Token)::core::convert::Into::into(t))
349 }
350 }
351
352 #[doc = "`ReadHexProgressive(::unity::Il2CppString, *mutf64, *muti32)` overload"]
353 pub fn read_hex_progressive(s: impl ::core::convert::Into<::unity::Il2CppString>) -> (::unity::Il2CppString, f64, i32) {
354 unsafe {
355 let mut __out_0 = ::core::mem::MaybeUninit::<f64>::uninit();
356 let mut __out_1 = ::core::mem::MaybeUninit::<i32>::uninit();
357 let __ret = {
358 ::unity::il2cpp_call!(__LexerUtils_unity_raw::__lookup_read_hex_progressive::get_method_info().method_ptr, ::unity::Il2CppString;
359(::unity::Il2CppString)::core::convert::Into::into(s),(*mut f64)__out_0.as_mut_ptr(),(*mut i32)__out_1.as_mut_ptr())
360 };
361 (__ret, __out_0.assume_init(), __out_1.assume_init())
362 }
363 }
364
365 #[doc = "`ParseHexFloat(crate::moon_sharp::interpreter::tree::token::Token)` overload"]
366 pub fn parse_hex_float(t: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::token::Token>) -> f64 {
367 unsafe {
368 ::unity::il2cpp_call!(__LexerUtils_unity_raw::__lookup_parse_hex_float::get_method_info().method_ptr,f64;
369(crate::moon_sharp::interpreter::tree::token::Token)::core::convert::Into::into(t))
370 }
371 }
372
373 #[doc = "`HexDigit2Value(u16)` overload"]
374 pub fn hex_digit2_value(c: impl ::core::convert::Into<u16>) -> i32 {
375 unsafe {
376 ::unity::il2cpp_call!(__LexerUtils_unity_raw::__lookup_hex_digit2_value::get_method_info().method_ptr,i32;
377(u16)::core::convert::Into::into(c))
378 }
379 }
380
381 #[doc = "`CharIsDigit(u16)` overload"]
382 pub fn char_is_digit(c: impl ::core::convert::Into<u16>) -> bool {
383 unsafe {
384 ::unity::il2cpp_call!(__LexerUtils_unity_raw::__lookup_char_is_digit::get_method_info().method_ptr,bool;
385(u16)::core::convert::Into::into(c))
386 }
387 }
388
389 #[doc = "`CharIsHexDigit(u16)` overload"]
390 pub fn char_is_hex_digit(c: impl ::core::convert::Into<u16>) -> bool {
391 unsafe {
392 ::unity::il2cpp_call!(__LexerUtils_unity_raw::__lookup_char_is_hex_digit::get_method_info().method_ptr,bool;
393(u16)::core::convert::Into::into(c))
394 }
395 }
396
397 #[doc = "`AdjustLuaLongString(::unity::Il2CppString)` overload"]
398 pub fn adjust_lua_long_string(str: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
399 unsafe {
400 ::unity::il2cpp_call!(__LexerUtils_unity_raw::__lookup_adjust_lua_long_string::get_method_info().method_ptr, ::unity::Il2CppString;
401(::unity::Il2CppString)::core::convert::Into::into(str))
402 }
403 }
404
405 #[doc = "`UnescapeLuaString(crate::moon_sharp::interpreter::tree::token::Token, ::unity::Il2CppString)` overload"]
406 pub fn unescape_lua_string(
407 token: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::token::Token>,
408 str: impl ::core::convert::Into<::unity::Il2CppString>,
409 ) -> ::unity::Il2CppString {
410 unsafe {
411 ::unity::il2cpp_call!(__LexerUtils_unity_raw::__lookup_unescape_lua_string::get_method_info().method_ptr, ::unity::Il2CppString;
412(crate::moon_sharp::interpreter::tree::token::Token)::core::convert::Into::into(token),(::unity::Il2CppString)::core::convert::Into::into(str))
413 }
414 }
415
416 #[doc = "`ConvertUtf32ToChar(i32)` overload"]
417 pub fn convert_utf32_to_char(i: impl ::core::convert::Into<i32>) -> ::unity::Il2CppString {
418 unsafe {
419 ::unity::il2cpp_call!(__LexerUtils_unity_raw::__lookup_convert_utf32_to_char::get_method_info().method_ptr, ::unity::Il2CppString;
420(i32)::core::convert::Into::into(i))
421 }
422 }
423}
424
425#[cfg(feature = "moon_sharp-interpreter-tree-lexerutils")]
426impl LexerUtils {
427 pub fn parse_number_method_info() -> &'static ::unity::il2cpp::MethodInfo {
428 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
429 }
430
431 pub fn parse_hex_integer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
432 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
433 }
434
435 pub fn read_hex_progressive_method_info() -> &'static ::unity::il2cpp::MethodInfo {
436 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
437 }
438
439 pub fn parse_hex_float_method_info() -> &'static ::unity::il2cpp::MethodInfo {
440 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
441 }
442
443 pub fn hex_digit2_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
444 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
445 }
446
447 pub fn char_is_digit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
448 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
449 }
450
451 pub fn char_is_hex_digit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
452 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
453 }
454
455 pub fn adjust_lua_long_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
456 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
457 }
458
459 pub fn unescape_lua_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
460 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
461 }
462
463 pub fn convert_utf32_to_char_method_info() -> &'static ::unity::il2cpp::MethodInfo {
464 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
465 }
466}
467
468#[cfg(feature = "moon_sharp-interpreter-tree-lexerutils")]
469#[doc(hidden)]
470pub mod prelude {
471 pub use super::{ILexerUtils, LexerUtils};
472 pub use crate::system::object::IObject;
473 #[cfg(feature = "system-object")]
474 pub use crate::system::object::IObjectMethods;
475}