engage/generated/moon_sharp/interpreter/tree/statements/
forloopstatement.rs1#[cfg(feature = "moon_sharp-interpreter-tree-statements-forloopstatement-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 moon_sharp::interpreter::tree::{
10 nodebase::{INodeBase, NodeBase},
11 statement::{IStatement, Statement},
12 },
13 system::object::{IObject, Object},
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/tree/statements/forloopstatement/ForLoopStatement.md"))]
17 #[::unity::class(namespace = "MoonSharp.Interpreter.Tree.Statements", name = "ForLoopStatement")]
18 #[parent(crate::moon_sharp::interpreter::tree::statement::Statement)]
19 pub struct ForLoopStatement {
20 #[offset(32)]
21 #[rename(name = "m_StackFrame")]
22 pub m_stack_frame: crate::moon_sharp::interpreter::execution::runtimescopeblock::RuntimeScopeBlock,
23 #[offset(40)]
24 #[rename(name = "m_InnerBlock")]
25 pub m_inner_block: crate::moon_sharp::interpreter::tree::statement::Statement,
26 #[offset(48)]
27 #[rename(name = "m_VarName")]
28 pub m_var_name: crate::moon_sharp::interpreter::symbolref::SymbolRef,
29 #[offset(56)]
30 #[rename(name = "m_Start")]
31 pub m_start: crate::moon_sharp::interpreter::tree::expression::Expression,
32 #[offset(64)]
33 #[rename(name = "m_End")]
34 pub m_end: crate::moon_sharp::interpreter::tree::expression::Expression,
35 #[offset(72)]
36 #[rename(name = "m_Step")]
37 pub m_step: crate::moon_sharp::interpreter::tree::expression::Expression,
38 #[offset(80)]
39 #[rename(name = "m_RefFor")]
40 pub m_ref_for: crate::moon_sharp::interpreter::debugging::sourceref::SourceRef,
41 #[offset(88)]
42 #[rename(name = "m_RefEnd")]
43 pub m_ref_end: crate::moon_sharp::interpreter::debugging::sourceref::SourceRef,
44 }
45}
46
47#[cfg(feature = "moon_sharp-interpreter-tree-statements-forloopstatement-types")]
48pub use __types::*;
49
50#[cfg(feature = "moon_sharp-interpreter-tree-statements-forloopstatement")]
51#[doc(hidden)]
52#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
53mod __ForLoopStatement_unity_raw {
54 use super::*;
55 #[doc(hidden)]
56 #[allow(non_snake_case)]
57 pub mod __lookup_ctor {
58 use super::*;
59 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
60 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
61 <crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext as ::unity::IlType>::il_type(),
62 <crate::moon_sharp::interpreter::tree::token::Token as ::unity::IlType>::il_type(),
63 <crate::moon_sharp::interpreter::tree::token::Token as ::unity::IlType>::il_type(),
64 ];
65 ::unity::lookup::method_info_on_class_with_signature(
66 <ForLoopStatement as ::unity::ClassIdentity>::class(),
67 ".ctor",
68 3,
69 param_types,
70 false,
71 )
72 });
73 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
74 match &*METHOD {
75 ::core::result::Result::Ok(mi) => *mi,
76 ::core::result::Result::Err(e) => {
77 panic!(
78 "method lookup failed: {}
79::{}
80: {}
81",
82 <ForLoopStatement as ::unity::ClassIdentity>::NAME,
83 ".ctor",
84 e
85 )
86 },
87 }
88 }
89 }
90}
91
92#[cfg(feature = "moon_sharp-interpreter-tree-statements-forloopstatement")]
93pub trait IForLoopStatementMethods: IForLoopStatement {
94 #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext, crate::moon_sharp::interpreter::tree::token::Token, crate::moon_sharp::interpreter::tree::token::Token)` overload"]
95 fn ctor(
96 self,
97 lcontext: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext>,
98 name_token: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::token::Token>,
99 for_token: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::token::Token>,
100 ) -> () {
101 unsafe {
102 let __receiver = <ForLoopStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
103 ::unity::il2cpp_call!(__ForLoopStatement_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
104(ForLoopStatement)__receiver,(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)::core::convert::Into::into(lcontext),(crate::moon_sharp::interpreter::tree::token::Token)::core::convert::Into::into(name_token),(crate::moon_sharp::interpreter::tree::token::Token)::core::convert::Into::into(for_token))
105 }
106 }
107 #[doc = "`Compile(crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode)` overload"]
108 fn compile(self, bc: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode>) -> () {
109 unsafe {
110 let __receiver = <ForLoopStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
111 {
112 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
113 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
114 panic!(
115 "unity: virtual slot {}
116 out of range (vtable len {}
117) on the runtime class behind {}
118 (method `{}
119`)",
120 4usize,
121 __vt.len(),
122 <ForLoopStatement as ::unity::ClassIdentity>::NAME,
123 "Compile",
124 )
125 });
126 let __inner: extern "C" fn(
127 ForLoopStatement,
128 crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
129 ::unity::OptionalMethod,
130 ) -> () = ::core::mem::transmute(__vi.method_ptr);
131 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
132 __inner(__receiver, ::core::convert::Into::into(bc), __mi)
133 }
134 }
135 }
136}
137
138#[cfg(feature = "moon_sharp-interpreter-tree-statements-forloopstatement")]
139impl<__T: IForLoopStatement> IForLoopStatementMethods for __T {}
140
141#[cfg(feature = "moon_sharp-interpreter-tree-statements-forloopstatement")]
142impl ForLoopStatement {
143 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
144 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
145 }
146
147 pub fn compile_method_info() -> &'static ::unity::il2cpp::MethodInfo {
148 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
149 }
150}
151
152#[cfg(feature = "moon_sharp-interpreter-tree-statements-forloopstatement")]
153impl ForLoopStatement {
154 #[doc = "Direct (non-virtual) call to `ForLoopStatement`'s own `Compile`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
155 pub unsafe fn compile(
156 this: impl ::core::convert::Into<::unity::IlInstance>,
157 bc: crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
158 ) -> () {
159 let __mi = Self::compile_method_info();
160 let __inner: extern "C" fn(
161 ::unity::IlInstance,
162 crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
163 ::unity::OptionalMethod,
164 ) -> () = ::core::mem::transmute(__mi.method_ptr);
165 __inner(this.into(), bc, ::core::option::Option::None)
166 }
167}
168
169#[cfg(feature = "moon_sharp-interpreter-tree-statements-forloopstatement")]
170impl ForLoopStatement {
171 #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext, crate::moon_sharp::interpreter::tree::token::Token, crate::moon_sharp::interpreter::tree::token::Token)` — overload selector"]
172 pub fn new(
173 lcontext: crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext,
174 name_token: crate::moon_sharp::interpreter::tree::token::Token,
175 for_token: crate::moon_sharp::interpreter::tree::token::Token,
176 ) -> Self {
177 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
178 panic!(
179 "{}
180::{}
181 failed to instantiate",
182 ::core::stringify!(ForLoopStatement),
183 ::core::stringify!(new),
184 )
185 });
186 <Self as IForLoopStatementMethods>::ctor(this, lcontext, name_token, for_token);
187 this
188 }
189}
190
191#[cfg(feature = "moon_sharp-interpreter-tree-statements-forloopstatement")]
192#[doc(hidden)]
193pub mod prelude {
194 pub use super::{ForLoopStatement, IForLoopStatement, IForLoopStatementMethods};
195 #[cfg(feature = "moon_sharp-interpreter-tree-nodebase")]
196 pub use crate::moon_sharp::interpreter::tree::nodebase::INodeBaseMethods;
197 #[cfg(feature = "moon_sharp-interpreter-tree-statement")]
198 pub use crate::moon_sharp::interpreter::tree::statement::IStatementMethods;
199 #[cfg(feature = "system-object")]
200 pub use crate::system::object::IObjectMethods;
201 pub use crate::{
202 moon_sharp::interpreter::tree::{nodebase::INodeBase, statement::IStatement},
203 system::object::IObject,
204 };
205}