forked from wghost/UPKUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UTokenFactory.cpp
361 lines (360 loc) · 6.93 KB
/
UTokenFactory.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
#include "UTokenFactory.h"
UScriptToken* UTokenFactory::Create(UToken Type)
{
if (Type == UToken::LocalVariable)
{
return new ULocalVariableToken;
}
else if (Type == UToken::InstanceVariable)
{
return new UInstanceVariableToken;
}
else if (Type == UToken::DefaultVariable)
{
return new UDefaultVariableToken;
}
else if (Type == UToken::StateVariable)
{
return new UStateVariableToken;
}
else if (Type == UToken::Return)
{
return new UReturnToken;
}
else if (Type == UToken::Switch)
{
return new USwitchToken;
}
else if (Type == UToken::Jump)
{
return new UJumpToken;
}
else if (Type == UToken::JumpIfNot)
{
return new UJumpIfNotToken;
}
else if (Type == UToken::Stop)
{
return new UStopToken;
}
else if (Type == UToken::Assert)
{
return new UAssertToken;
}
else if (Type == UToken::Case)
{
return new UCaseToken;
}
else if (Type == UToken::Nothing)
{
return new UNothingToken;
}
else if (Type == UToken::LabelTable)
{
return new ULabelTableToken;
}
else if (Type == UToken::GotoLabel)
{
return new UGotoLabelToken;
}
else if (Type == UToken::EatString)
{
return new UEatStringToken;
}
else if (Type == UToken::Let)
{
return new ULetToken;
}
else if (Type == UToken::DynArrayElement)
{
return new UDynArrayElementToken;
}
else if (Type == UToken::New)
{
return new UNewToken;
}
else if (Type == UToken::ClassContext)
{
return new UClassContextToken;
}
else if (Type == UToken::MetaCast)
{
return new UMetaCastToken;
}
else if (Type == UToken::LetBool)
{
return new ULetBoolToken;
}
else if (Type == UToken::EndParmValue)
{
return new UEndParmValueToken;
}
else if (Type == UToken::EndFunctionParms)
{
return new UEndFunctionParmsToken;
}
else if (Type == UToken::Self)
{
return new USelfToken;
}
else if (Type == UToken::Skip)
{
return new USkipToken;
}
else if (Type == UToken::Context)
{
return new UContextToken;
}
else if (Type == UToken::ArrayElement)
{
return new UArrayElementToken;
}
else if (Type == UToken::VirtualFunction)
{
return new UVirtualFunctionToken;
}
else if (Type == UToken::FinalFunction)
{
return new UFinalFunctionToken;
}
else if (Type == UToken::IntConst)
{
return new UIntConstToken;
}
else if (Type == UToken::FloatConst)
{
return new UFloatConstToken;
}
else if (Type == UToken::StringConst)
{
return new UStringConstToken;
}
else if (Type == UToken::ObjectConst)
{
return new UObjectConstToken;
}
else if (Type == UToken::NameConst)
{
return new UNameConstToken;
}
else if (Type == UToken::RotatorConst)
{
return new URotatorConstToken;
}
else if (Type == UToken::VectorConst)
{
return new UVectorConstToken;
}
else if (Type == UToken::ByteConst)
{
return new UByteConstToken;
}
else if (Type == UToken::IntZero)
{
return new UIntZeroToken;
}
else if (Type == UToken::IntOne)
{
return new UIntOneToken;
}
else if (Type == UToken::True)
{
return new UTrueToken;
}
else if (Type == UToken::False)
{
return new UFalseToken;
}
else if (Type == UToken::NativeParm)
{
return new UNativeParmToken;
}
else if (Type == UToken::NoObject)
{
return new UNoObjectToken;
}
else if (Type == UToken::UnknownDeprecated)
{
return new UUnknownDeprecatedToken(Type);
}
else if (Type == UToken::IntConstByte)
{
return new UIntConstByteToken;
}
else if (Type == UToken::BoolVariable)
{
return new UBoolVariableToken;
}
else if (Type == UToken::DynamicCast)
{
return new UDynamicCastToken;
}
else if (Type == UToken::Iterator)
{
return new UIteratorToken;
}
else if (Type == UToken::IteratorPop)
{
return new UIteratorPopToken;
}
else if (Type == UToken::IteratorNext)
{
return new UIteratorNextToken;
}
else if (Type == UToken::StructCmpEq)
{
return new UStructCmpEqToken;
}
else if (Type == UToken::StructCmpNe)
{
return new UStructCmpNeToken;
}
else if (Type == UToken::UniStringConst)
{
return new UUniStringConstToken;
}
else if (Type == UToken::StructMember)
{
return new UStructMemberToken;
}
else if (Type == UToken::DynArrayLen)
{
return new UDynArrayLenToken;
}
else if (Type == UToken::GlobalFunction)
{
return new UGlobalFunctionToken;
}
else if (Type == UToken::PrimitiveCast)
{
return new UPrimitiveCastToken;
}
else if (Type == UToken::DynArrayInsert)
{
return new UDynArrayInsertToken;
}
else if (Type == UToken::ReturnNothing)
{
return new UReturnNothingToken;
}
else if (Type == UToken::DelegateCmpEq)
{
return new UDelegateCmpEqToken;
}
else if (Type == UToken::DelegateCmpNe)
{
return new UDelegateCmpNeToken;
}
else if (Type == UToken::DelegateFunctionCmpEq)
{
return new UDelegateFunctionCmpEqToken;
}
else if (Type == UToken::DelegateFunctionCmpNE)
{
return new UDelegateFunctionCmpNeToken;
}
else if (Type == UToken::NoDelegate)
{
return new UNoDelegateToken;
}
else if (Type == UToken::DynArrayRemove)
{
return new UDynArrayRemoveToken;
}
else if (Type == UToken::DebugInfo)
{
return new UDebugInfoToken;
}
else if (Type == UToken::DelegateFunction)
{
return new UDelegateFunctionToken;
}
else if (Type == UToken::DelegateProperty)
{
return new UDelegatePropertyToken;
}
else if (Type == UToken::LetDelegate)
{
return new ULetDelegateToken;
}
else if (Type == UToken::TernaryCondition)
{
return new UTernaryConditionToken;
}
else if (Type == UToken::DynArrFind)
{
return new UDynArrFindToken;
}
else if (Type == UToken::DynArrayFindStruct)
{
return new UDynArrayFindStructToken;
}
else if (Type == UToken::OutVariable)
{
return new UOutVariableToken;
}
else if (Type == UToken::DefaultParmValue)
{
return new UDefaultParmValueToken;
}
else if (Type == UToken::NoParm)
{
return new UNoParmToken;
}
else if (Type == UToken::InstanceDelegate)
{
return new UInstanceDelegateToken;
}
else if (Type >= UToken::UnknownDynamicVariable1 && Type <= UToken::UnknownDynamicVariable5)
{
return new UUnknownDynamicVariableToken(Type);
}
else if (Type == UToken::InterfaceContext)
{
return new UInterfaceContextToken;
}
else if (Type == UToken::InterfaceCast)
{
return new UInterfaceCastToken;
}
else if (Type == UToken::EndOfScript)
{
return new UEndOfScriptToken;
}
else if (Type == UToken::DynArrAdd)
{
return new UDynArrAddToken;
}
else if (Type == UToken::DynArrAddItem)
{
return new UDynArrAddItemToken;
}
else if (Type == UToken::DynArrRemoveItem)
{
return new UDynArrRemoveItemToken;
}
else if (Type == UToken::DynArrInsertItem)
{
return new UDynArrInsertItemToken;
}
else if (Type == UToken::DynArrIterator)
{
return new UDynArrIteratorToken;
}
else if (Type == UToken::DynArrSort)
{
return new UDynArrSortToken;
}
else if (Type >= UToken::UnknownFilterEditorOnly1 && Type <= UToken::UnknownFilterEditorOnly6)
{
return new UUnknownFilterEditorOnlyToken(Type);
}
else if (Type >= UToken::ExtendedNative && Type <= UToken::NativeFunctionF)
{
return new UNativeFunctionToken(Type);
}
else
{
return nullptr;
}
}