2023-08-28 20:46:50 -07:00
|
|
|
#ifdef GEN_INTELLISENSE_DIRECTIVES
|
2024-12-06 21:21:09 -08:00
|
|
|
#pragma once
|
|
|
|
#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
|
|
|
|
2024-12-06 21:21:09 -08:00
|
|
|
enum Operator : u32
|
2024-12-03 10:51:29 -08:00
|
|
|
{
|
2024-12-07 14:17:02 -08:00
|
|
|
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,
|
2024-12-08 13:37:04 -08:00
|
|
|
Op_NumOps,
|
|
|
|
Op_UnderlyingType = 0xffffffffu
|
2024-12-06 21:21:09 -08:00
|
|
|
};
|
2024-12-07 14:17:02 -08:00
|
|
|
|
2024-12-12 09:55:15 -08:00
|
|
|
inline Str operator_to_str( Operator op )
|
2024-12-06 21:21:09 -08:00
|
|
|
{
|
2024-12-12 09:55:15 -08:00
|
|
|
local_persist Str lookup[47] = {
|
2024-12-13 10:20:16 -08:00
|
|
|
{ "INVALID", sizeof( "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( "," ) },
|
|
|
|
{ "new", sizeof( "new" ) },
|
|
|
|
{ "new[]", sizeof( "new[]" ) },
|
|
|
|
{ "delete", sizeof( "delete" ) },
|
|
|
|
{ "delete[]", sizeof( "delete[]" ) },
|
2024-12-07 14:17:02 -08:00
|
|
|
};
|
|
|
|
return lookup[op];
|
2024-12-03 10:51:29 -08:00
|
|
|
}
|
2024-12-06 21:21:09 -08:00
|
|
|
|
2024-12-12 09:55:15 -08:00
|
|
|
forceinline Str to_str( Operator op )
|
2024-12-07 14:17:02 -08:00
|
|
|
{
|
|
|
|
return operator_to_str( op );
|
|
|
|
}
|