Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
LocalScope.cs
Go to the documentation of this file.
4
6
7internal sealed class LocalScope
8{
9 public readonly LocalScope parent;
10
12
13 public LocalBuilder this[string key]
14 {
15 get
16 {
18 return value;
19 }
21 set
22 {
23 _locals[key] = value;
24 }
25 }
26
27 public LocalScope()
28 {
30 }
31
33 : this()
34 {
36 }
37
38 public bool TryGetValue(string key, [NotNullWhen(true)] out LocalBuilder value)
39 {
41 {
42 return true;
43 }
44 if (parent != null)
45 {
47 }
48 value = null;
49 return false;
50 }
51
53 {
55 {
56 (Type, string) key = (local.Value.LocalType, local.Key);
58 {
59 value.Enqueue(local.Value);
60 continue;
61 }
63 value.Enqueue(local.Value);
65 }
66 }
67}
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
readonly Dictionary< string, LocalBuilder > _locals
Definition LocalScope.cs:11
bool TryGetValue(string key, [NotNullWhen(true)] out LocalBuilder value)
Definition LocalScope.cs:38
void AddToFreeLocals(Dictionary<(Type, string), Queue< LocalBuilder > > freeLocals)
Definition LocalScope.cs:52