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

Support non-struct types #61

Closed
philhofer opened this issue Feb 18, 2015 · 2 comments
Closed

Support non-struct types #61

philhofer opened this issue Feb 18, 2015 · 2 comments

Comments

@philhofer
Copy link
Member

Things get rather difficult if we don't want to generate code for arbitrary types, but still want to support something like:

type Chunk [128]byte

type Block struct {
    Meta string
    Data Chunk
}

Right now, Chunk is interpreted as IDENT, even though we could conceivably generate the appropriate code for it in-situ. However, generating the appropriate methods for Chunk is simpler than transitively applying its type information across every location in which it is used.

TL;DR generate code for all valid *ast.TypeDecl nodes.

@philhofer
Copy link
Member Author

See #60

@philhofer
Copy link
Member Author

Fixed by #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant