fixed: missing box member access in assignment

This commit is contained in:
Sven Vogel 2024-05-28 13:44:40 +02:00
parent 119dfd7796
commit f590e3c42e
1 changed files with 14 additions and 0 deletions

View File

@ -484,8 +484,22 @@ typedef struct Branch_t {
// | Statements |
// '------------------------------------------------'
typedef enum AssignmentKind_t {
// direct access to a variable
AssignmentKindVariable,
// access to a member of a box
// can be nested such as: foo.bar.kee
AssignmentKindBoxMember
} AssignmentKind;
// Can either be a direct variable access or
// a nested box member access
typedef struct Assignment_t {
Variable* variable;
AssignmentKind kind;
union AssignmentImplementation_t {
BoxAccess accees;
} impl;
Expression value;
AST_NODE_PTR nodePtr;
} Assignment;