11#include "../os/os.h"
22#include "metac_compiler_interface.h"
33#include "../semantic/metac_type.h"
4- extern metac_compiler_t compiler ;
5-
6- /*
7- * void* semanticState;
8-
9- uint32_t StartTimeStamp;
10- uint32_t (*CurrentTimeStamp) ();
11- uint32_t (*BuiltinCount) ();
12-
13- const char* (*PrintType) (type T);
14-
15- const char** (*FieldNames) (type T);
16-
17- const char* (*BuiltinName) (uint32_t builtinNumber);
18- const char* (*help) ();
4+ #include "metac_type_kind.c"
195
20- void (*message) (const char* str);
21- void (*error) (const char* str);
22-
23- void (*RegisterLogCallback) (void (*LogCb)(const char* msg, void* context), void* context);
24- */
6+ extern metac_compiler_t compiler ;
257
268uint32_t compiler_CurrentTimeStamp ()
279{
@@ -38,19 +20,19 @@ void compiler_Message(struct metac_compiler_t* compilerP,
3820void compiler_Error (struct metac_compiler_t * compilerP ,
3921 const char * str )
4022{
41-
23+
4224}
4325
44- type_kind_t compiler_GetTypeKind (uint32_t T )
26+ metac_type_kind_t compiler_GetTypeKind (uint32_t T )
4527{
4628 metac_type_index_t typeIdx ;
4729 typeIdx .v = T ;
48- return TYPE_INDEX_KIND (typeIdx );
30+ return ( metac_type_kind_t ) TYPE_INDEX_KIND (typeIdx );
4931}
5032
51- const char * compiler_TypeKindString (type_kind_t T )
33+ const char * compiler_TypeKindString (metac_type_kind_t T )
5234{
53-
35+ return MetaCTypeKind_toChars ( T );
5436}
5537
5638const char * compiler_Help ()
@@ -69,7 +51,7 @@ void compiler_PrintInt(int32_t value)
6951}
7052metac_enum_members_t * compiler_GetEnumMembers (struct metac_compiler_t * compilerP , uint32_t T )
7153{
72-
54+
7355}
7456
7557metac_node_t compiler_ResolveNode (struct metac_compiler_t * compilerP , const char * name )
@@ -94,9 +76,9 @@ metac_compiler_t compiler = {
9476 compiler_PrintInt ,
9577
9678 compiler_GetEnumMembers ,
97-
79+
9880 compiler_ResolveNode ,
99-
81+
10082 "v0.1" ,
10183 20260205 ,
10284};
0 commit comments