1
0

Delcare extern procedures from libc

This commit is contained in:
2026-06-19 23:52:02 +02:00
parent 9515e2f77e
commit c8cddbe271
3 changed files with 6648 additions and 3 deletions
+11 -3
View File
@@ -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
+6637
View File
File diff suppressed because it is too large Load Diff
View File