Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dstruct labels should be optional #23

Open
evie-calico opened this issue Oct 13, 2024 · 0 comments
Open

dstruct labels should be optional #23

evie-calico opened this issue Oct 13, 2024 · 0 comments

Comments

@evie-calico
Copy link
Contributor

The dstruct macro is useful, but sometimes you want to construct an object without creating any labels.

For example, I use this pattern relatively often in esprit:

struct Foo
  words 1, Pointer
end_struct

dstruct Foo, Foo, .Pointer=.ptr ; Error: Foo_Pointer.ptr doesn't exist
.ptr

I'd prefer to do something like this:

Foo:: dstruct_anon Foo, .Pointer=.ptr
.ptr
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

No branches or pull requests

1 participant