11#include <stdio.h>
2- #include "../os/os.c"
32#include "metac_compiler_interface.h"
43#include "../semantic/metac_type.h"
54#include "metac_type_kind.c"
65
76extern metac_compiler_t compiler ;
87
9- uint32_t compiler_CurrentTimeStamp ()
10- {
11- uint32_t ts ;
12- OS .GetTimeStamp (& ts );
13- return ts ;
14- }
15-
16- void compiler_Message (struct metac_compiler_t * compilerP ,
8+ static void compiler_Message (struct metac_compiler_t * compilerP ,
179 const char * str )
1810{
1911}
2012
21- void compiler_Error (struct metac_compiler_t * compilerP ,
13+ static void compiler_Error (struct metac_compiler_t * compilerP ,
2214 const char * str )
2315{
2416
2517}
2618
27- metac_type_kind_t compiler_GetTypeKind (uint32_t T )
19+ static metac_type_kind_t compiler_GetTypeKind (uint32_t T )
2820{
2921 metac_type_index_t typeIdx ;
3022 typeIdx .v = T ;
3123 return (metac_type_kind_t )TYPE_INDEX_KIND (typeIdx );
3224}
3325
34- const char * compiler_TypeKindString (metac_type_kind_t T )
26+ static const char * compiler_TypeKindString (metac_type_kind_t T )
3527{
3628 return MetaCTypeKind_toChars (T );
3729}
3830
39- const char * compiler_Help ()
31+ static const char * compiler_Help ()
4032{
4133 return "Hello I am Mr. compiler. I cannot help you ..." ;
4234}
4335
4436
45- void compiler_PrintInt (int32_t value )
46- {
47- char Buffer [24 ];
48- int len = sprintf (Buffer , "%d" , value );
49- Buffer [len ] = '\0' ;
50- //compiler.Message(&compiler, Buffer, 0);
51- fprintf (stderr , "-> %s\n" , Buffer );
52- }
53- metac_enum_members_t * compiler_GetEnumMembers (struct metac_compiler_t * compilerP , uint32_t T )
37+ static metac_enum_members_t * compiler_GetEnumMembers (struct metac_compiler_t * compilerP , uint32_t T )
5438{
5539
5640}
@@ -61,7 +45,6 @@ metac_enum_members_t* compiler_GetEnumMembers (struct metac_compiler_t* compiler
6145metac_compiler_t compiler = {
6246 0 ,
6347
64- compiler_CurrentTimeStamp ,
6548 compiler_Help ,
6649
6750 compiler_Message ,
@@ -70,8 +53,6 @@ metac_compiler_t compiler = {
7053 compiler_GetTypeKind ,
7154 compiler_TypeKindString ,
7255
73- compiler_PrintInt ,
74-
7556 compiler_GetEnumMembers ,
7657
7758 "v0.1" ,
0 commit comments