summaryrefslogtreecommitdiff
path: root/boot/stage17
diff options
context:
space:
mode:
Diffstat (limited to 'boot/stage17')
-rw-r--r--boot/stage17/cl.elna10
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;