Skip to content

Feature a struct sub params#95

Merged
mdbergmann merged 2 commits into
masterfrom
feature-a-struct-sub-params
Feb 21, 2026
Merged

Feature a struct sub params#95
mdbergmann merged 2 commits into
masterfrom
feature-a-struct-sub-params

Conversation

@mdbergmann
Copy link
Copy Markdown
Owner

No description provided.

mdbergmann and others added 2 commits February 21, 2026 13:46
Allow struct type names as SUB parameter types, e.g. `SUB Foo(MyStruct s)`,
which the compiler treats as ADDRESS internally with auto-generated struct
pointer setup. Eliminates boilerplate of manual DECLARE STRUCT + assignment.

Changes:
- acedef.h: add p_structdef[] to SYM for per-param structdef tracking
- sub.c: extend forward_ref() and sub_params() to recognize struct type
  identifiers, entering struct params as structure objects with correct
  structdef linkage for -> member access

All 221 tests pass including new test_struct_sub_param.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant