diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-01-05 18:24:03 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-01-05 18:24:03 +0100 |
| commit | e4257b08beeb9279e02cb2a50deec4ad8a7c4135 (patch) | |
| tree | 33e8b4c474fcea02c193ea752fe2bad7520825fc /boot/stage17 | |
| parent | 955161b36e9525d7b5ab5fa053c9caf16746a354 (diff) | |
| download | elna-e4257b08beeb9279e02cb2a50deec4ad8a7c4135.tar.gz | |
Allow enumeration field types
Diffstat (limited to 'boot/stage17')
| -rw-r--r-- | boot/stage17/cl.elna | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/boot/stage17/cl.elna b/boot/stage17/cl.elna index 6ca9ff0..e1a8e81 100644 --- a/boot/stage17/cl.elna +++ b/boot/stage17/cl.elna @@ -10,6 +10,7 @@ program; (* - true and false boolean literals. *) (* - the number of local variables is not limited. *) (* - #size(T). *) +(* - Support enumerations as record field type. *) type (** @@ -2032,9 +2033,6 @@ var result: ^ElnaTreeTraitExpression; token_kind: Word; begin - printf("# Comment\n\0"); - fflush(nil); - result := malloc(ElnaTreeTraitExpression_size()); result^.kind := ElnaTreeKind.trait_expression; @@ -2709,14 +2707,14 @@ begin elsif parser_node^.kind = ElnaTreeKind.field_access_expression then field_access_expression := parser_node; expression_type := field_access_expression^.type_decoration; + designator_base := field_access_expression^.aggregate; + aggregate_type := designator_base^.type_decoration; - if expression_type^.kind = ElnaTypeKind.enumeration then + if aggregate_type = nil then first_instruction := elna_tac_enumeration_value(field_access_expression, operand_type, operand_value, operand_length); is_address^ := 0 else - designator_base := field_access_expression^.aggregate; first_instruction := elna_tac_designator(designator_base, symbol_table, is_address, operand_type, operand_value, operand_length); - aggregate_type := designator_base^.type_decoration; field_count := aggregate_type^.length; current_field := aggregate_type^.members; |
