terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
RegexCharClass.cs
Go to the documentation of this file.
1using System;
5
7{
8 // Token: 0x020000B4 RID: 180
9 internal sealed class RegexCharClass
10 {
11 // Token: 0x0600038C RID: 908 RVA: 0x0000C5FC File Offset: 0x0000A7FC
13 {
14 this._canonical = true;
15 }
16
17 // Token: 0x0600038D RID: 909 RVA: 0x0000C618 File Offset: 0x0000A818
25
26 // Token: 0x170000BC RID: 188
27 // (get) Token: 0x0600038E RID: 910 RVA: 0x0000C648 File Offset: 0x0000A848
28 public bool CanMerge
29 {
30 get
31 {
32 while (!this._negate)
33 {
34 }
35 }
36 }
37
38 // Token: 0x170000BD RID: 189
39 // (set) Token: 0x0600038F RID: 911 RVA: 0x0000C660 File Offset: 0x0000A860
40 public bool Negate
41 {
42 set
43 {
44 }
45 }
46
47 // Token: 0x06000390 RID: 912 RVA: 0x0000C670 File Offset: 0x0000A870
48 public void AddChar(char c)
49 {
50 this.AddRange(c, c);
51 }
52
53 // Token: 0x06000391 RID: 913 RVA: 0x00002050 File Offset: 0x00000250
55 {
56 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
57 }
58
59 // Token: 0x06000392 RID: 914 RVA: 0x00002050 File Offset: 0x00000250
60 private void AddSet(string set)
61 {
62 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
63 }
64
65 // Token: 0x06000393 RID: 915 RVA: 0x0000C688 File Offset: 0x0000A888
70
71 // Token: 0x06000394 RID: 916 RVA: 0x00002050 File Offset: 0x00000250
72 public void AddRange(char first, char last)
73 {
74 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
75 }
76
77 // Token: 0x06000395 RID: 917 RVA: 0x0000C69C File Offset: 0x0000A89C
78 public void AddCategoryFromName(string categoryName, bool invert, bool caseInsensitive, string pattern)
79 {
80 if (!true)
81 {
82 }
83 if (!true)
84 {
85 }
86 if (!true)
87 {
88 }
89 string text = RegexCharClass.SetFromProperty(categoryName, true, pattern);
90 this.AddSet(text);
91 }
92
93 // Token: 0x06000396 RID: 918 RVA: 0x0000C708 File Offset: 0x0000A908
94 private void AddCategory(string category)
95 {
96 StringBuilder stringBuilder = this._categories.Append(category);
97 }
98
99 // Token: 0x06000397 RID: 919 RVA: 0x0000C724 File Offset: 0x0000A924
101 {
102 int size = this._rangelist._size;
104 }
105
106 // Token: 0x06000398 RID: 920 RVA: 0x0000C750 File Offset: 0x0000A950
108 {
109 int num = 1;
110 if (num == 0)
111 {
112 }
113 if (num == 0)
114 {
115 }
116 }
117
118 // Token: 0x06000399 RID: 921 RVA: 0x0000C780 File Offset: 0x0000A980
119 public void AddWord(bool ecma, bool negate)
120 {
121 }
122
123 // Token: 0x0600039A RID: 922 RVA: 0x0000C7BC File Offset: 0x0000A9BC
124 public void AddSpace(bool ecma, bool negate)
125 {
126 }
127
128 // Token: 0x0600039B RID: 923 RVA: 0x0000C7F8 File Offset: 0x0000A9F8
129 public void AddDigit(bool ecma, bool negate, string pattern)
130 {
131 }
132
133 // Token: 0x0600039C RID: 924 RVA: 0x0000C824 File Offset: 0x0000AA24
134 public static char SingletonChar(string set)
135 {
136 char c;
137 return c;
138 }
139
140 // Token: 0x0600039D RID: 925 RVA: 0x0000C834 File Offset: 0x0000AA34
141 public static bool IsMergeable(string charClass)
142 {
143 if (true)
144 {
145 }
146 if (!false)
147 {
148 }
149 bool flag;
150 return flag;
151 }
152
153 // Token: 0x0600039E RID: 926 RVA: 0x0000C84C File Offset: 0x0000AA4C
154 public static bool IsEmpty(string charClass)
155 {
156 bool flag;
157 return flag;
158 }
159
160 // Token: 0x0600039F RID: 927 RVA: 0x0000C860 File Offset: 0x0000AA60
161 public static bool IsSingleton(string set)
162 {
163 }
164
165 // Token: 0x060003A0 RID: 928 RVA: 0x0000C884 File Offset: 0x0000AA84
166 public static bool IsSingletonInverse(string set)
167 {
168 }
169
170 // Token: 0x060003A1 RID: 929 RVA: 0x0000C8A8 File Offset: 0x0000AAA8
171 private static bool IsSubtraction(string charClass)
172 {
173 }
174
175 // Token: 0x060003A2 RID: 930 RVA: 0x0000C8B8 File Offset: 0x0000AAB8
176 private static bool IsNegated(string set)
177 {
178 }
179
180 // Token: 0x060003A3 RID: 931 RVA: 0x0000C8C8 File Offset: 0x0000AAC8
181 public static bool IsECMAWordChar(char ch)
182 {
183 if (!true)
184 {
185 }
186 bool flag;
187 return flag;
188 }
189
190 // Token: 0x060003A4 RID: 932 RVA: 0x0000C8DC File Offset: 0x0000AADC
191 public static bool IsWordChar(char ch)
192 {
193 if (!true)
194 {
195 }
196 return true;
197 }
198
199 // Token: 0x060003A5 RID: 933 RVA: 0x0000C8F0 File Offset: 0x0000AAF0
200 public static bool CharInClass(char ch, string set)
201 {
202 if (!true)
203 {
204 }
205 bool flag;
206 return flag;
207 }
208
209 // Token: 0x060003A6 RID: 934 RVA: 0x0000C904 File Offset: 0x0000AB04
210 private static bool CharInClassRecursive(char ch, string set, int start)
211 {
212 if (!true)
213 {
214 }
215 bool flag;
216 return flag;
217 }
218
219 // Token: 0x060003A7 RID: 935 RVA: 0x0000C920 File Offset: 0x0000AB20
220 private static bool CharInClassInternal(char ch, string set, int start, int mySetLength, int myCategoryLength)
221 {
222 if (start != 0)
223 {
224 }
225 if (mySetLength != 0)
226 {
227 bool flag;
228 return flag;
229 }
230 }
231
232 // Token: 0x060003A8 RID: 936 RVA: 0x0000C93C File Offset: 0x0000AB3C
233 private static bool CharInCategory(char ch, string set, int start, int mySetLength, int myCategoryLength)
234 {
235 if (!true)
236 {
237 }
238 bool flag;
239 return flag;
240 }
241
242 // Token: 0x060003A9 RID: 937 RVA: 0x00002050 File Offset: 0x00000250
243 private static bool CharInCategoryGroup(char ch, UnicodeCategory chcategory, string category, int i)
244 {
245 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
246 }
247
248 // Token: 0x060003AA RID: 938 RVA: 0x0000C964 File Offset: 0x0000AB64
249 private static string NegateCategory(string category)
250 {
251 long num = 0L;
253 StringBuilder stringBuilder = stringBuilder2.Append((char)num);
255 }
256
257 // Token: 0x060003AB RID: 939 RVA: 0x0000C988 File Offset: 0x0000AB88
258 public static RegexCharClass Parse(string charClass)
259 {
260 if (!true)
261 {
262 }
264 return regexCharClass;
265 }
266
267 // Token: 0x060003AC RID: 940 RVA: 0x0000C99C File Offset: 0x0000AB9C
268 private static RegexCharClass ParseRecursive(string charClass, int start)
269 {
271 return regexCharClass;
272 }
273
274 // Token: 0x060003AD RID: 941 RVA: 0x0000C9B8 File Offset: 0x0000ABB8
275 private int RangeCount()
276 {
277 return this._rangelist._size;
278 }
279
280 // Token: 0x060003AE RID: 942 RVA: 0x0000C9D0 File Offset: 0x0000ABD0
281 public string ToStringClass()
282 {
283 if (!this._canonical)
284 {
285 this.Canonicalize();
286 }
288 StringBuilder categories = this._categories;
289 int size = rangelist._size;
290 StringBuilder stringBuilder = StringBuilderCache.Acquire(categories.Length);
291 bool negate = this._negate;
292 StringBuilder stringBuilder2 = stringBuilder.Append(negate ? '\u0001' : '\0');
293 StringBuilder stringBuilder3 = stringBuilder.Append(negate ? '\u0001' : '\0');
294 int length = this._categories.Length;
295 StringBuilder stringBuilder4 = stringBuilder.Append((char)length);
296 int size2 = this._rangelist._size;
297 long num = 0L;
298 int size3 = this._rangelist._size;
299 int length2 = stringBuilder.Length;
300 int num2 = 1;
301 stringBuilder[num2] = (char)num;
305 if (subtractor != null)
306 {
307 string text = subtractor.ToStringClass();
308 StringBuilder stringBuilder6 = stringBuilder.Append(text);
309 }
310 return StringBuilderCache.GetStringAndRelease(stringBuilder);
311 }
312
313 // Token: 0x060003AF RID: 943 RVA: 0x0000CAB4 File Offset: 0x0000ACB4
315 {
316 /*
317An exception occurred when decompiling this method (060003AF)
318
319ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Text.RegularExpressions.RegexCharClass/SingleRange System.Text.RegularExpressions.RegexCharClass::GetRangeAt(System.Int32)
320
321 ---> System.Exception: Basic block has to end with unconditional control flow.
322{
323 Block_0:
324 stloc:class [mscorlib]System.Collections.Generic.List`1<valuetype System.Text.RegularExpressions.RegexCharClass/SingleRange>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.List`1<valuetype System.Text.RegularExpressions.RegexCharClass/SingleRange>(RegexCharClass::_rangelist, ldloc:RegexCharClass(this)))
325}
326
327 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
328 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
329 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
330 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
331 --- End of inner exception stack trace ---
332 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
333 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
334*/;
335 }
336
337 // Token: 0x060003B0 RID: 944 RVA: 0x0000CAC8 File Offset: 0x0000ACC8
338 private void Canonicalize()
339 {
340 int num = 1;
341 this._canonical = num != 0;
343 if (num == 0)
344 {
345 }
346 int size = this._rangelist._size;
347 int size2 = this._rangelist._size;
348 }
349
350 // Token: 0x060003B1 RID: 945 RVA: 0x0000CB44 File Offset: 0x0000AD44
351 private static string SetFromProperty(string capname, bool invert, string pattern)
352 {
353 int num = 1;
354 if (num == 0)
355 {
356 }
357 if (num == 0)
358 {
359 }
360 int num2;
361 if (num2 != 0)
362 {
363 string text = SR.Format("Unknown property '{0}'.", capname);
364 string text2 = SR.Format("parsing \"{0}\" - {1}", invert, text);
365 }
366 if (num == 0)
367 {
368 }
369 string text3;
370 return text3;
371 }
372
373 // Token: 0x060003B2 RID: 946 RVA: 0x0000CB88 File Offset: 0x0000AD88
374 // Note: this type is marked as 'beforefieldinit'.
376 {
377 }
378
379 // Token: 0x040002D5 RID: 725
380 private static readonly string s_internalRegexIgnoreCase;
381
382 // Token: 0x040002D6 RID: 726
383 private static readonly string s_space;
384
385 // Token: 0x040002D7 RID: 727
386 private static readonly string s_notSpace;
387
388 // Token: 0x040002D8 RID: 728
389 private static readonly string s_word;
390
391 // Token: 0x040002D9 RID: 729
392 private static readonly string s_notWord;
393
394 // Token: 0x040002DA RID: 730
395 public static readonly string SpaceClass;
396
397 // Token: 0x040002DB RID: 731
398 public static readonly string NotSpaceClass;
399
400 // Token: 0x040002DC RID: 732
401 public static readonly string WordClass;
402
403 // Token: 0x040002DD RID: 733
404 public static readonly string NotWordClass;
405
406 // Token: 0x040002DE RID: 734
407 public static readonly string DigitClass;
408
409 // Token: 0x040002DF RID: 735
410 public static readonly string NotDigitClass;
411
412 // Token: 0x040002E0 RID: 736
414
415 // Token: 0x040002E1 RID: 737
416 private static readonly string[][] s_propTable;
417
418 // Token: 0x040002E2 RID: 738
420
421 // Token: 0x040002E3 RID: 739
423
424 // Token: 0x040002E4 RID: 740
426
427 // Token: 0x040002E5 RID: 741
428 private bool _canonical;
429
430 // Token: 0x040002E6 RID: 742
431 private bool _negate;
432
433 // Token: 0x040002E7 RID: 743
435
436 // Token: 0x020000B5 RID: 181
438 {
439 // Token: 0x060003B3 RID: 947 RVA: 0x0000E568 File Offset: 0x0000C768
440 internal LowerCaseMapping(char chMin, char chMax, int lcOp, int data)
441 {
444 this.LcOp = lcOp;
445 }
446
447 // Token: 0x040002E8 RID: 744
448 public readonly char ChMin;
449
450 // Token: 0x040002E9 RID: 745
451 public readonly char ChMax;
452
453 // Token: 0x040002EA RID: 746
454 public readonly int LcOp;
455
456 // Token: 0x040002EB RID: 747
457 public readonly int Data;
458 }
459
460 // Token: 0x020000B6 RID: 182
461 private sealed class SingleRangeComparer : IComparer<RegexCharClass.SingleRange>
462 {
463 // Token: 0x060003B4 RID: 948 RVA: 0x0000E58C File Offset: 0x0000C78C
465 {
466 }
467
468 // Token: 0x060003B5 RID: 949 RVA: 0x0000E5A0 File Offset: 0x0000C7A0
470 {
471 int num;
472 return num;
473 }
474
475 // Token: 0x060003B6 RID: 950 RVA: 0x0000E5B0 File Offset: 0x0000C7B0
476 // Note: this type is marked as 'beforefieldinit'.
478 {
479 }
480
481 // Token: 0x040002EC RID: 748
483 }
484
485 // Token: 0x020000B7 RID: 183
486 private readonly struct SingleRange
487 {
488 // Token: 0x060003B7 RID: 951 RVA: 0x0000E5C0 File Offset: 0x0000C7C0
489 internal SingleRange(char first, char last)
490 {
492 this.Last = last;
493 }
494
495 // Token: 0x040002ED RID: 749
496 public readonly char First;
497
498 // Token: 0x040002EE RID: 750
499 public readonly char Last;
500 }
501 }
502}
class f__AnonymousType0<< Count > j__TPar
static string Format(string resourceFormat, params object[] args)
Definition SR.cs:33
Definition SR.cs:7
int Compare(RegexCharClass.SingleRange x, RegexCharClass.SingleRange y)
static readonly RegexCharClass.SingleRangeComparer Instance
RegexCharClass.SingleRange GetRangeAt(int i)
static readonly RegexCharClass.LowerCaseMapping[] s_lcTable
static readonly Dictionary< string, string > s_definedCategories
static string NegateCategory(string category)
List< RegexCharClass.SingleRange > _rangelist
static RegexCharClass ParseRecursive(string charClass, int start)
static bool CharInClass(char ch, string set)
static bool CharInClassInternal(char ch, string set, int start, int mySetLength, int myCategoryLength)
static bool CharInClassRecursive(char ch, string set, int start)
static bool IsSubtraction(string charClass)
void AddDigit(bool ecma, bool negate, string pattern)
void AddCategoryFromName(string categoryName, bool invert, bool caseInsensitive, string pattern)
static string SetFromProperty(string capname, bool invert, string pattern)
void AddLowercaseRange(char chMin, char chMax, CultureInfo culture)
RegexCharClass(bool negate, List< RegexCharClass.SingleRange > ranges, StringBuilder categories, RegexCharClass subtraction)
static bool CharInCategoryGroup(char ch, UnicodeCategory chcategory, string category, int i)
static bool CharInCategory(char ch, string set, int start, int mySetLength, int myCategoryLength)
static RegexCharClass Parse(string charClass)
static bool IsMergeable(string charClass)
static string GetStringAndRelease(StringBuilder sb)
static StringBuilder Acquire(int capacity=16)
StringBuilder Append(char value, int repeatCount)
LowerCaseMapping(char chMin, char chMax, int lcOp, int data)