-
Notifications
You must be signed in to change notification settings - Fork 307
/
Copy pathEmptyValue.cs
72 lines (63 loc) · 1.24 KB
/
EmptyValue.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using Antlr4.Runtime;
using System;
using System.Collections.Generic;
namespace Rubberduck.Parsing.PreProcessing
{
public sealed class EmptyValue : IValue
{
public static readonly EmptyValue Value = new EmptyValue();
public ValueType ValueType
{
get
{
return ValueType.Empty;
}
}
public bool AsBool
{
get
{
return false;
}
}
public byte AsByte
{
get
{
return 0;
}
}
public DateTime AsDate
{
get
{
return new DateTime(1899, 12, 30);
}
}
public decimal AsDecimal
{
get
{
return 0;
}
}
public string AsString
{
get
{
return string.Empty;
}
}
public IEnumerable<IToken> AsTokens
{
get
{
return new List<IToken>();
}
}
public override string ToString()
{
return "<Empty>";
}
}
}