Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Operators.cs
Go to the documentation of this file.
1
namespace
System.Data
;
2
3
internal
sealed
class
Operators
4
{
5
private
static
readonly
int
[]
s_priority
=
new
int
[44]
6
{
7
0, 20, 20, 9, 12, 11, 11, 13, 13, 13,
8
13, 13, 13, 10, 11, 16, 16, 19, 19, 18,
9
17, 21, 8, 7, 6, 9, 8, 7, 2, 22,
10
23, 23, 24, 24, 24, 24, 24, 24, 24, 24,
11
24, 24, 24, 24
12
};
13
14
private
static
readonly
string
[]
s_looks
=
new
string
[40]
15
{
16
""
,
"-"
,
"+"
,
"Not"
,
"BetweenAnd"
,
"In"
,
"Between"
,
"="
,
">"
,
"<"
,
17
">="
,
"<="
,
"<>"
,
"Is"
,
"Like"
,
"+"
,
"-"
,
"*"
,
"/"
,
"\\"
,
18
"Mod"
,
"**"
,
"&"
,
"|"
,
"^"
,
"~"
,
"And"
,
"Or"
,
"Proc"
,
"Iff"
,
19
"."
,
"."
,
"Null"
,
"True"
,
"False"
,
"Date"
,
"GenUniqueId()"
,
"GenGuid()"
,
"Guid {..}"
,
"Is Not"
20
};
21
22
internal
static
bool
IsArithmetical
(
int
op)
23
{
24
if
(op != 15 && op != 16 && op != 17 && op != 18)
25
{
26
return
op == 20;
27
}
28
return
true
;
29
}
30
31
internal
static
bool
IsLogical
(
int
op)
32
{
33
if
(op != 26 && op != 27 && op != 3 && op != 13)
34
{
35
return
op == 39;
36
}
37
return
true
;
38
}
39
40
internal
static
bool
IsRelational
(
int
op)
41
{
42
if
(7 <= op)
43
{
44
return
op <= 12;
45
}
46
return
false
;
47
}
48
49
internal
static
int
Priority
(
int
op)
50
{
51
if
(op >
s_priority
.Length)
52
{
53
return
24;
54
}
55
return
s_priority
[op];
56
}
57
58
internal
static
string
ToString
(
int
op)
59
{
60
if
(op <=
s_looks
.Length)
61
{
62
return
s_looks
[op];
63
}
64
return
"Unknown op"
;
65
}
66
}
System.Data.Operators.s_priority
static readonly int[] s_priority
Definition
Operators.cs:5
System.Data.Operators.s_looks
static readonly string[] s_looks
Definition
Operators.cs:14
System.Data.Operators.IsArithmetical
static bool IsArithmetical(int op)
Definition
Operators.cs:22
System.Data.Operators.Priority
static int Priority(int op)
Definition
Operators.cs:49
System.Data.Operators.IsRelational
static bool IsRelational(int op)
Definition
Operators.cs:40
System.Data.Operators.ToString
static string ToString(int op)
Definition
Operators.cs:58
System.Data.Operators.IsLogical
static bool IsLogical(int op)
Definition
Operators.cs:31
System.Data.Operators
Definition
Operators.cs:4
System.Data
Definition
ADP.cs:12
source
System.Data.Common
System.Data
Operators.cs
Generated by
1.10.0