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 13:42:29 -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 ECode
|
|
|
|
{
|
|
|
|
enum Type : u32
|
|
|
|
{
|
|
|
|
Invalid,
|
|
|
|
Untyped,
|
|
|
|
NewLine,
|
|
|
|
Comment,
|
|
|
|
Access_Private,
|
|
|
|
Access_Protected,
|
|
|
|
Access_Public,
|
|
|
|
PlatformAttributes,
|
|
|
|
Class,
|
|
|
|
Class_Fwd,
|
|
|
|
Class_Body,
|
|
|
|
Constructor,
|
|
|
|
Constructor_Fwd,
|
|
|
|
Destructor,
|
|
|
|
Destructor_Fwd,
|
|
|
|
Enum,
|
|
|
|
Enum_Fwd,
|
|
|
|
Enum_Body,
|
|
|
|
Enum_Class,
|
|
|
|
Enum_Class_Fwd,
|
|
|
|
Execution,
|
|
|
|
Export_Body,
|
|
|
|
Extern_Linkage,
|
|
|
|
Extern_Linkage_Body,
|
|
|
|
Friend,
|
|
|
|
Function,
|
|
|
|
Function_Fwd,
|
|
|
|
Function_Body,
|
|
|
|
Global_Body,
|
|
|
|
Module,
|
|
|
|
Namespace,
|
|
|
|
Namespace_Body,
|
|
|
|
Operator,
|
|
|
|
Operator_Fwd,
|
|
|
|
Operator_Member,
|
|
|
|
Operator_Member_Fwd,
|
|
|
|
Operator_Cast,
|
|
|
|
Operator_Cast_Fwd,
|
|
|
|
Parameters,
|
|
|
|
Preprocess_Define,
|
|
|
|
Preprocess_Include,
|
|
|
|
Preprocess_If,
|
|
|
|
Preprocess_IfDef,
|
|
|
|
Preprocess_IfNotDef,
|
|
|
|
Preprocess_ElIf,
|
|
|
|
Preprocess_Else,
|
|
|
|
Preprocess_EndIf,
|
|
|
|
Preprocess_Pragma,
|
|
|
|
Specifiers,
|
|
|
|
Struct,
|
|
|
|
Struct_Fwd,
|
|
|
|
Struct_Body,
|
|
|
|
Template,
|
|
|
|
Typedef,
|
|
|
|
Typename,
|
|
|
|
Union,
|
|
|
|
Union_Body,
|
|
|
|
Using,
|
|
|
|
Using_Namespace,
|
|
|
|
Variable,
|
|
|
|
NumTypes
|
|
|
|
};
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline StrC to_str( Type type )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
local_persist StrC lookup[] {
|
2024-04-17 13:55:22 -07:00
|
|
|
{ sizeof( "Invalid" ), "Invalid" },
|
|
|
|
{ sizeof( "Untyped" ), "Untyped" },
|
|
|
|
{ sizeof( "NewLine" ), "NewLine" },
|
|
|
|
{ sizeof( "Comment" ), "Comment" },
|
|
|
|
{ sizeof( "Access_Private" ), "Access_Private" },
|
|
|
|
{ sizeof( "Access_Protected" ), "Access_Protected" },
|
|
|
|
{ sizeof( "Access_Public" ), "Access_Public" },
|
|
|
|
{ sizeof( "PlatformAttributes" ), "PlatformAttributes" },
|
|
|
|
{ sizeof( "Class" ), "Class" },
|
|
|
|
{ sizeof( "Class_Fwd" ), "Class_Fwd" },
|
|
|
|
{ sizeof( "Class_Body" ), "Class_Body" },
|
|
|
|
{ sizeof( "Constructor" ), "Constructor" },
|
|
|
|
{ sizeof( "Constructor_Fwd" ), "Constructor_Fwd" },
|
|
|
|
{ sizeof( "Destructor" ), "Destructor" },
|
|
|
|
{ sizeof( "Destructor_Fwd" ), "Destructor_Fwd" },
|
|
|
|
{ sizeof( "Enum" ), "Enum" },
|
|
|
|
{ sizeof( "Enum_Fwd" ), "Enum_Fwd" },
|
|
|
|
{ sizeof( "Enum_Body" ), "Enum_Body" },
|
|
|
|
{ sizeof( "Enum_Class" ), "Enum_Class" },
|
|
|
|
{ sizeof( "Enum_Class_Fwd" ), "Enum_Class_Fwd" },
|
|
|
|
{ sizeof( "Execution" ), "Execution" },
|
|
|
|
{ sizeof( "Export_Body" ), "Export_Body" },
|
|
|
|
{ sizeof( "Extern_Linkage" ), "Extern_Linkage" },
|
|
|
|
{ sizeof( "Extern_Linkage_Body" ), "Extern_Linkage_Body" },
|
|
|
|
{ sizeof( "Friend" ), "Friend" },
|
|
|
|
{ sizeof( "Function" ), "Function" },
|
|
|
|
{ sizeof( "Function_Fwd" ), "Function_Fwd" },
|
|
|
|
{ sizeof( "Function_Body" ), "Function_Body" },
|
|
|
|
{ sizeof( "Global_Body" ), "Global_Body" },
|
|
|
|
{ sizeof( "Module" ), "Module" },
|
|
|
|
{ sizeof( "Namespace" ), "Namespace" },
|
|
|
|
{ sizeof( "Namespace_Body" ), "Namespace_Body" },
|
|
|
|
{ sizeof( "Operator" ), "Operator" },
|
|
|
|
{ sizeof( "Operator_Fwd" ), "Operator_Fwd" },
|
|
|
|
{ sizeof( "Operator_Member" ), "Operator_Member" },
|
|
|
|
{ sizeof( "Operator_Member_Fwd" ), "Operator_Member_Fwd" },
|
|
|
|
{ sizeof( "Operator_Cast" ), "Operator_Cast" },
|
|
|
|
{ sizeof( "Operator_Cast_Fwd" ), "Operator_Cast_Fwd" },
|
|
|
|
{ sizeof( "Parameters" ), "Parameters" },
|
|
|
|
{ sizeof( "Preprocess_Define" ), "Preprocess_Define" },
|
|
|
|
{ sizeof( "Preprocess_Include" ), "Preprocess_Include" },
|
|
|
|
{ sizeof( "Preprocess_If" ), "Preprocess_If" },
|
|
|
|
{ sizeof( "Preprocess_IfDef" ), "Preprocess_IfDef" },
|
|
|
|
{ sizeof( "Preprocess_IfNotDef" ), "Preprocess_IfNotDef" },
|
|
|
|
{ sizeof( "Preprocess_ElIf" ), "Preprocess_ElIf" },
|
|
|
|
{ sizeof( "Preprocess_Else" ), "Preprocess_Else" },
|
|
|
|
{ sizeof( "Preprocess_EndIf" ), "Preprocess_EndIf" },
|
|
|
|
{ sizeof( "Preprocess_Pragma" ), "Preprocess_Pragma" },
|
|
|
|
{ sizeof( "Specifiers" ), "Specifiers" },
|
|
|
|
{ sizeof( "Struct" ), "Struct" },
|
|
|
|
{ sizeof( "Struct_Fwd" ), "Struct_Fwd" },
|
|
|
|
{ sizeof( "Struct_Body" ), "Struct_Body" },
|
|
|
|
{ sizeof( "Template" ), "Template" },
|
|
|
|
{ sizeof( "Typedef" ), "Typedef" },
|
|
|
|
{ sizeof( "Typename" ), "Typename" },
|
|
|
|
{ sizeof( "Union" ), "Union" },
|
|
|
|
{ sizeof( "Union_Body" ), "Union_Body" },
|
|
|
|
{ sizeof( "Using" ), "Using" },
|
|
|
|
{ sizeof( "Using_Namespace" ), "Using_Namespace" },
|
|
|
|
{ sizeof( "Variable" ), "Variable" },
|
2023-08-21 20:28:39 -07:00
|
|
|
};
|
2024-04-17 14:40:32 -07:00
|
|
|
return lookup[type];
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace ECode
|
|
|
|
|
|
|
|
using CodeT = ECode::Type;
|