2023-08-28 20:46:50 -07:00
|
|
|
#ifdef GEN_INTELLISENSE_DIRECTIVES
|
2023-08-21 20:28:39 -07:00
|
|
|
#pragma once
|
2023-09-25 09:12:11 -07:00
|
|
|
#include "components/types.hpp"
|
2023-08-28 20:46:50 -07:00
|
|
|
#endif
|
2023-08-21 20:28:39 -07:00
|
|
|
|
2023-08-22 21:05:58 -07:00
|
|
|
// This file was generated automatially by gencpp's bootstrap.cpp (See: https://github.com/Ed94/gencpp)
|
2023-08-21 22:51:59 -07:00
|
|
|
|
2023-08-21 20:28:39 -07:00
|
|
|
namespace EOperator
|
|
|
|
{
|
|
|
|
enum Type : u32
|
|
|
|
{
|
|
|
|
Invalid,
|
|
|
|
Assign,
|
|
|
|
Assign_Add,
|
|
|
|
Assign_Subtract,
|
|
|
|
Assign_Multiply,
|
|
|
|
Assign_Divide,
|
|
|
|
Assign_Modulo,
|
|
|
|
Assign_BAnd,
|
|
|
|
Assign_BOr,
|
|
|
|
Assign_BXOr,
|
|
|
|
Assign_LShift,
|
|
|
|
Assign_RShift,
|
|
|
|
Increment,
|
|
|
|
Decrement,
|
|
|
|
Unary_Plus,
|
|
|
|
Unary_Minus,
|
|
|
|
UnaryNot,
|
|
|
|
Add,
|
|
|
|
Subtract,
|
|
|
|
Multiply,
|
|
|
|
Divide,
|
|
|
|
Modulo,
|
|
|
|
BNot,
|
|
|
|
BAnd,
|
|
|
|
BOr,
|
|
|
|
BXOr,
|
|
|
|
LShift,
|
|
|
|
RShift,
|
|
|
|
LAnd,
|
|
|
|
LOr,
|
|
|
|
LEqual,
|
|
|
|
LNot,
|
|
|
|
Lesser,
|
|
|
|
Greater,
|
|
|
|
LesserEqual,
|
|
|
|
GreaterEqual,
|
|
|
|
Subscript,
|
|
|
|
Indirection,
|
|
|
|
AddressOf,
|
|
|
|
MemberOfPointer,
|
|
|
|
PtrToMemOfPtr,
|
|
|
|
FunctionCall,
|
|
|
|
Comma,
|
2024-04-17 14:40:32 -07:00
|
|
|
New,
|
|
|
|
NewArray,
|
|
|
|
Delete,
|
|
|
|
DeleteArray,
|
2023-08-21 20:28:39 -07:00
|
|
|
NumOps
|
|
|
|
};
|
|
|
|
|
|
|
|
StrC to_str( Type op )
|
|
|
|
{
|
|
|
|
local_persist StrC lookup[] {
|
2024-04-17 14:40:32 -07:00
|
|
|
{ sizeof( "INVALID" ), "INVALID" },
|
|
|
|
{ sizeof( "=" ), "=" },
|
|
|
|
{ sizeof( "+=" ), "+=" },
|
|
|
|
{ sizeof( "-=" ), "-=" },
|
|
|
|
{ sizeof( "*=" ), "*=" },
|
|
|
|
{ sizeof( "/=" ), "/=" },
|
|
|
|
{ sizeof( "%=" ), "%=" },
|
|
|
|
{ sizeof( "&=" ), "&=" },
|
|
|
|
{ sizeof( "|=" ), "|=" },
|
|
|
|
{ sizeof( "^=" ), "^=" },
|
|
|
|
{ sizeof( "<<=" ), "<<=" },
|
|
|
|
{ sizeof( ">>=" ), ">>=" },
|
|
|
|
{ sizeof( "++" ), "++" },
|
|
|
|
{ sizeof( "--" ), "--" },
|
|
|
|
{ sizeof( "+" ), "+" },
|
|
|
|
{ sizeof( "-" ), "-" },
|
|
|
|
{ sizeof( "!" ), "!" },
|
|
|
|
{ sizeof( "+" ), "+" },
|
|
|
|
{ sizeof( "-" ), "-" },
|
|
|
|
{ sizeof( "*" ), "*" },
|
|
|
|
{ sizeof( "/" ), "/" },
|
|
|
|
{ sizeof( "%" ), "%" },
|
|
|
|
{ sizeof( "~" ), "~" },
|
|
|
|
{ sizeof( "&" ), "&" },
|
|
|
|
{ sizeof( "|" ), "|" },
|
|
|
|
{ sizeof( "^" ), "^" },
|
|
|
|
{ sizeof( "<<" ), "<<" },
|
|
|
|
{ sizeof( ">>" ), ">>" },
|
|
|
|
{ sizeof( "&&" ), "&&" },
|
|
|
|
{ sizeof( "||" ), "||" },
|
|
|
|
{ sizeof( "==" ), "==" },
|
|
|
|
{ sizeof( "!=" ), "!=" },
|
|
|
|
{ sizeof( "<" ), "<" },
|
|
|
|
{ sizeof( ">" ), ">" },
|
|
|
|
{ sizeof( "<=" ), "<=" },
|
|
|
|
{ sizeof( ">=" ), ">=" },
|
|
|
|
{ sizeof( "[]" ), "[]" },
|
|
|
|
{ sizeof( "*" ), "*" },
|
|
|
|
{ sizeof( "&" ), "&" },
|
|
|
|
{ sizeof( "->" ), "->" },
|
|
|
|
{ sizeof( "->*" ), "->*" },
|
|
|
|
{ sizeof( "()" ), "()" },
|
|
|
|
{ sizeof( "," ), "," },
|
|
|
|
{ sizeof( "new" ), "new" },
|
|
|
|
{ sizeof( "new[]" ), "new[]" },
|
|
|
|
{ sizeof( "delete" ), "delete" },
|
|
|
|
{ sizeof( "delete[]" ), "delete[]" },
|
2023-08-21 20:28:39 -07:00
|
|
|
};
|
2024-04-17 14:40:32 -07:00
|
|
|
return lookup[op];
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace EOperator
|
|
|
|
|
|
|
|
using OperatorT = EOperator::Type;
|