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

Elements []Visitee and Comment/InlineComment on a given Visitee? #27

Closed
bufdev opened this issue Dec 6, 2017 · 1 comment
Closed

Elements []Visitee and Comment/InlineComment on a given Visitee? #27

bufdev opened this issue Dec 6, 2017 · 1 comment

Comments

@bufdev
Copy link
Contributor

bufdev commented Dec 6, 2017

This may just need to be documented, but a Comment is a Visitee, so on Enum for example, you have Elements []Visitee and Comment *Comment - will the Comment not be in the Elements slice? This would make sense, and either way, we should have it documented as to the expected behavior. I may be missing something, just wanted to file this while it is in my head.

@emicklei
Copy link
Owner

That is correct, elements do not contain comment values. Each element can have zero or one Comment. I think I made this decision to have the design simple ; no need to find the comment elements, dealing with multiple comments.

@bufdev bufdev closed this as completed Jan 2, 2018
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

2 participants