Delcare extern procedures from libc
This commit is contained in:
+11
-3
@@ -668,6 +668,7 @@ var
|
||||
word_type: ^ElnaType
|
||||
char_type: ^ElnaType
|
||||
bool_type: ^ElnaType
|
||||
int_type: ^ElnaType
|
||||
string_type: ^ElnaTypeRecord
|
||||
|
||||
source_code: Word
|
||||
@@ -2342,7 +2343,7 @@ begin
|
||||
token := elna_lexer_read(cursor);
|
||||
|
||||
buffer := malloc(token^.start.length + 1);
|
||||
bzero(buffer, token^.start.length + 1);
|
||||
memset(buffer, 0, token^.start.length + 1);
|
||||
memcpy(buffer, token^.start.ptr, token^.start.length);
|
||||
|
||||
result^.kind := ElnaTreeKind.integer_literal;
|
||||
@@ -5834,6 +5835,13 @@ begin
|
||||
current_info := type_info_create(word_type);
|
||||
elna_symbol_table_enter(symbol_table_global, "Word".ptr, 4, current_info);
|
||||
|
||||
int_type := malloc(#size(ElnaType));
|
||||
int_type^.kind := ElnaTypeKind.primitive;
|
||||
int_type^.size := 4;
|
||||
int_type^.alignment := 4;
|
||||
current_info := type_info_create(int_type);
|
||||
elna_symbol_table_enter(symbol_table_global, "Int".ptr, 3, current_info);
|
||||
|
||||
current_type := malloc(#size(ElnaType));
|
||||
current_type^.kind := ElnaTypeKind.primitive;
|
||||
current_type^.size := 4;
|
||||
@@ -6538,8 +6546,8 @@ end
|
||||
|
||||
proc initialize_global_state()
|
||||
begin
|
||||
stdout := fdopen(1, "w\0");
|
||||
stderr := fdopen(2, "w\0");
|
||||
stdout := fdopen(1, "w\0".ptr);
|
||||
stderr := fdopen(2, "w\0".ptr);
|
||||
compiler_strings_position := @compiler_strings;
|
||||
source_code := malloc(495616)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user