Skip to content

Commit

Permalink
access: Allow accesses on classes
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Oct 2, 2024
1 parent b09df3a commit e411e49
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flamingo/grammar/access.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ static int access_find_var(flamingo_t* flamingo, TSNode node, flamingo_var_t** v
return 0;
}

if (kind == FLAMINGO_VAL_KIND_FN && (*accessed_val)->fn.kind == FLAMINGO_FN_KIND_CLASS) {
return error(flamingo, "static access");
}

// Is PTM access.

size_t const count = flamingo->primitive_type_members[kind].count;
flamingo_var_t* const type_vars = flamingo->primitive_type_members[kind].vars;

Expand Down

0 comments on commit e411e49

Please sign in to comment.