From b20632245560b70f0605c0df1e56d766f22b4938 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 24 Oct 2025 16:07:57 +0200 Subject: Parse type declarations and variable part --- boot/stage14.elna | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'boot/stage14.elna') diff --git a/boot/stage14.elna b/boot/stage14.elna index e7e8811..5566518 100644 --- a/boot/stage14.elna +++ b/boot/stage14.elna @@ -1593,18 +1593,22 @@ begin _lexer_skip_token(); _lexer_read_token(@token_kind); _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); - 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. *) _write_z(" .zero 819200\0") - else + elsif token_kind = _lexer_token_kind_assignment() then (* Skip the assignment sign with surrounding whitespaces. *) _lexer_skip_token(); - _compile_global_initializer(); - _lexer_read_token(@token_kind) + _compile_global_initializer() + else + _write_z(" .word 0\n\0") end; (* Skip semicolon and newline. *) -- cgit v1.2.3