diff --git a/Code/DqnInspect.h b/Code/DqnInspect.h index 9f29c27..8a6fbe7 100644 --- a/Code/DqnInspect.h +++ b/Code/DqnInspect.h @@ -793,6 +793,8 @@ void ParseCPPStruct(CPPTokeniser *tokeniser) { if (token.type == CPPTokenType::Identifier) { + if (IsIdentifierToken(token, STR_LITERAL("const"))) + token = CPPTokeniser_NextToken(tokeniser); #if 0 int asterisks_count = 0; @@ -809,6 +811,12 @@ void ParseCPPStruct(CPPTokeniser *tokeniser) { CPPToken const variable_type = token; CPPToken variable_name = peek_token; + if (IsIdentifierToken(variable_name, STR_LITERAL("const"))) + { + token = CPPTokeniser_NextToken(tokeniser); + variable_name = CPPTokeniser_PeekToken(tokeniser); + } + for (;;) { auto *link = MEM_ARENA_ALLOC_STRUCT(&global_main_arena, CPPDeclLinkedList); diff --git a/Data/DqnInspect_TestData.h b/Data/DqnInspect_TestData.h index 6e25559..7dddc91 100644 --- a/Data/DqnInspect_TestData.h +++ b/Data/DqnInspect_TestData.h @@ -28,7 +28,11 @@ DQN_INSPECT struct OpenGLState { // #if 0 // #endif - u32 ebo DQN_INSPECT_META(DisplayName = "Element Buffer Object"), vbo, vao DQN_INSPECT_META(DisplayName = "Vertex Array Object", OpenGLVersion = "330"); + const int c; + int const d; + + // void *win32_handle; + int ebo DQN_INSPECT_META(DisplayName = "Element Buffer Object"), vbo, vao DQN_INSPECT_META(DisplayName = "Vertex Array Object", OpenGLVersion = "330"); // u32 shaders[(int)OpenGLShader::Count]; V4 draw_color DQN_INSPECT_META(DisplayName = "HelloWorld"); V3 lighting_ambient_coeff; @@ -36,4 +40,9 @@ DQN_INSPECT struct OpenGLState // FixedArray lights; // FixedArray camera_matrixes; int draw_call_count; + + // const int *const a; + // int const *const b; + // int *const e; + // int const* f; };