-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheoperator.hpp
118 lines (114 loc) · 3.11 KB
/
eoperator.hpp
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#ifdef GEN_INTELLISENSE_DIRECTIVES
#pragma once
#include "components/types.hpp"
#endif
// This file was generated automatially by gencpp's bootstrap.cpp (See: https://github.com/Ed94/gencpp)
enum Operator : u32
{
Op_Invalid,
Op_Assign,
Op_Assign_Add,
Op_Assign_Subtract,
Op_Assign_Multiply,
Op_Assign_Divide,
Op_Assign_Modulo,
Op_Assign_BAnd,
Op_Assign_BOr,
Op_Assign_BXOr,
Op_Assign_LShift,
Op_Assign_RShift,
Op_Increment,
Op_Decrement,
Op_Unary_Plus,
Op_Unary_Minus,
Op_UnaryNot,
Op_Add,
Op_Subtract,
Op_Multiply,
Op_Divide,
Op_Modulo,
Op_BNot,
Op_BAnd,
Op_BOr,
Op_BXOr,
Op_LShift,
Op_RShift,
Op_LAnd,
Op_LOr,
Op_LEqual,
Op_LNot,
Op_Lesser,
Op_Greater,
Op_LesserEqual,
Op_GreaterEqual,
Op_Subscript,
Op_Indirection,
Op_AddressOf,
Op_MemberOfPointer,
Op_PtrToMemOfPtr,
Op_FunctionCall,
Op_Comma,
Op_New,
Op_NewArray,
Op_Delete,
Op_DeleteArray,
Op_NumOps,
Op_UnderlyingType = 0xffffffffu
};
inline Str operator_to_str( Operator op )
{
local_persist Str lookup[] = {
{ "INVALID", sizeof( "INVALID" ) - 1 },
{ "=", sizeof( "=" ) - 1 },
{ "+=", sizeof( "+=" ) - 1 },
{ "-=", sizeof( "-=" ) - 1 },
{ "*=", sizeof( "*=" ) - 1 },
{ "/=", sizeof( "/=" ) - 1 },
{ "%=", sizeof( "%=" ) - 1 },
{ "&=", sizeof( "&=" ) - 1 },
{ "|=", sizeof( "|=" ) - 1 },
{ "^=", sizeof( "^=" ) - 1 },
{ "<<=", sizeof( "<<=" ) - 1 },
{ ">>=", sizeof( ">>=" ) - 1 },
{ "++", sizeof( "++" ) - 1 },
{ "--", sizeof( "--" ) - 1 },
{ "+", sizeof( "+" ) - 1 },
{ "-", sizeof( "-" ) - 1 },
{ "!", sizeof( "!" ) - 1 },
{ "+", sizeof( "+" ) - 1 },
{ "-", sizeof( "-" ) - 1 },
{ "*", sizeof( "*" ) - 1 },
{ "/", sizeof( "/" ) - 1 },
{ "%", sizeof( "%" ) - 1 },
{ "~", sizeof( "~" ) - 1 },
{ "&", sizeof( "&" ) - 1 },
{ "|", sizeof( "|" ) - 1 },
{ "^", sizeof( "^" ) - 1 },
{ "<<", sizeof( "<<" ) - 1 },
{ ">>", sizeof( ">>" ) - 1 },
{ "&&", sizeof( "&&" ) - 1 },
{ "||", sizeof( "||" ) - 1 },
{ "==", sizeof( "==" ) - 1 },
{ "!=", sizeof( "!=" ) - 1 },
{ "<", sizeof( "<" ) - 1 },
{ ">", sizeof( ">" ) - 1 },
{ "<=", sizeof( "<=" ) - 1 },
{ ">=", sizeof( ">=" ) - 1 },
{ "[]", sizeof( "[]" ) - 1 },
{ "*", sizeof( "*" ) - 1 },
{ "&", sizeof( "&" ) - 1 },
{ "->", sizeof( "->" ) - 1 },
{ "->*", sizeof( "->*" ) - 1 },
{ "()", sizeof( "()" ) - 1 },
{ ",", sizeof( "," ) - 1 },
{ "new", sizeof( "new" ) - 1 },
{ "new[]", sizeof( "new[]" ) - 1 },
{ "delete", sizeof( "delete" ) - 1 },
{ "delete[]", sizeof( "delete[]" ) - 1 },
};
return lookup[op];
}
forceinline Str to_str( Operator op )
{
return operator_to_str( op );
}