Parse type declarations and variable part

This commit is contained in:
2025-10-24 16:07:57 +02:00
parent 70eab55cde
commit b206322455
2 changed files with 594 additions and 494 deletions

View File

@@ -1593,18 +1593,22 @@ begin
_lexer_skip_token(); _lexer_skip_token();
_lexer_read_token(@token_kind); _lexer_read_token(@token_kind);
_lexer_skip_token(); _lexer_skip_token();
_read_type_expression();
_lexer_read_token(@token_kind);
name := _lexer_global_get_start();
name_length := _lexer_global_get_end() + -name;
_lexer_skip_token();
_lexer_read_token(@token_kind); _lexer_read_token(@token_kind);
if token_kind <> _lexer_token_kind_assignment() then if _lexer_compare_keyword("Array", 5, name, name_length) = 1 then
(* Else we assume this is a zeroed 819200 bytes big array. *) (* Else we assume this is a zeroed 819200 bytes big array. *)
_write_z(" .zero 819200\0") _write_z(" .zero 819200\0")
else elsif token_kind = _lexer_token_kind_assignment() then
(* Skip the assignment sign with surrounding whitespaces. *) (* Skip the assignment sign with surrounding whitespaces. *)
_lexer_skip_token(); _lexer_skip_token();
_compile_global_initializer(); _compile_global_initializer()
_lexer_read_token(@token_kind) else
_write_z(" .word 0\n\0")
end; end;
(* Skip semicolon and newline. *) (* Skip semicolon and newline. *)

File diff suppressed because it is too large Load Diff