Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ConstantExpression.cs
Go to the documentation of this file.
2
4
5[DebuggerTypeProxy(typeof(ConstantExpressionProxy))]
7{
8 public override Type Type
9 {
10 get
11 {
12 if (Value == null)
13 {
14 return typeof(object);
15 }
16 return Value.GetType();
17 }
18 }
19
20 public sealed override ExpressionType NodeType => ExpressionType.Constant;
21
22 public object? Value { get; }
23
24 internal ConstantExpression(object value)
25 {
26 Value = value;
27 }
28
29 protected internal override Expression Accept(ExpressionVisitor visitor)
30 {
31 return visitor.VisitConstant(this);
32 }
33}
override Expression Accept(ExpressionVisitor visitor)
virtual Expression VisitConstant(ConstantExpression node)