Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
GotoExpression.cs
Go to the documentation of this file.
2
4
5[DebuggerTypeProxy(typeof(GotoExpressionProxy))]
6public sealed class GotoExpression : Expression
7{
8 public sealed override Type Type { get; }
9
10 public sealed override ExpressionType NodeType => ExpressionType.Goto;
11
12 public Expression? Value { get; }
13
14 public LabelTarget Target { get; }
15
16 public GotoExpressionKind Kind { get; }
17
19 {
20 Kind = kind;
21 Value = value;
22 Target = target;
23 Type = type;
24 }
25
26 protected internal override Expression Accept(ExpressionVisitor visitor)
27 {
28 return visitor.VisitGoto(this);
29 }
30
32 {
33 if (target == Target && value == Value)
34 {
35 return this;
36 }
37 return Expression.MakeGoto(Kind, target, value, Type);
38 }
39}
virtual Expression VisitGoto(GotoExpression node)
static GotoExpression MakeGoto(GotoExpressionKind kind, LabelTarget target, Expression? value, Type type)
GotoExpression(GotoExpressionKind kind, LabelTarget target, Expression value, Type type)
override Expression Accept(ExpressionVisitor visitor)
GotoExpression Update(LabelTarget target, Expression? value)