Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Define()

void System.Linq.Expressions.Compiler.LabelInfo.Define ( LabelScopeInfo block)
inlinepackage

Definition at line 58 of file LabelInfo.cs.

59 {
60 for (LabelScopeInfo labelScopeInfo = block; labelScopeInfo != null; labelScopeInfo = labelScopeInfo.Parent)
61 {
62 if (labelScopeInfo.ContainsTarget(_node))
63 {
64 throw Error.LabelTargetAlreadyDefined(_node.Name);
65 }
66 }
68 block.AddLabelInfo(_node, this);
69 if (_definitions.Count == 1)
70 {
71 foreach (LabelScopeInfo reference in _references)
72 {
74 }
75 return;
76 }
78 {
79 throw Error.AmbiguousJump(_node.Name);
80 }
81 _labelDefined = false;
82 }
void Add(TKey key, TValue value)
readonly List< LabelScopeInfo > _references
Definition LabelInfo.cs:19
void ValidateJump(LabelScopeInfo reference)
Definition LabelInfo.cs:84
readonly HashSet< LabelScopeInfo > _definitions
Definition LabelInfo.cs:17

References System.Linq.Expressions.Compiler.LabelInfo._acrossBlockJump, System.Linq.Expressions.Compiler.LabelInfo._definitions, System.Linq.Expressions.Compiler.LabelInfo._labelDefined, System.Linq.Expressions.Compiler.LabelInfo._node, System.Linq.Expressions.Compiler.LabelInfo._references, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Linq.Expressions.Error.AmbiguousJump(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Linq.Expressions.Error.LabelTargetAlreadyDefined(), System.Linq.Expressions.LabelTarget.Name, and System.Linq.Expressions.Compiler.LabelInfo.ValidateJump().