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 annotating return types next to rules #101

Closed
lolbinarycat opened this issue Aug 29, 2020 · 4 comments
Closed

Support annotating return types next to rules #101

lolbinarycat opened this issue Aug 29, 2020 · 4 comments

Comments

@lolbinarycat
Copy link

the proposed syntax would be:

RuleName TYPES <- "grammar"

where TYPES is anything that is a valid return type for a go function. e.g. (string,error), int16 or even nothing (like in func main()).

This return type would then be copied exactly to the generated code.

@breml
Copy link
Collaborator

breml commented Sep 3, 2020

@lolbinarycat Thanks for your proposal and sorry for my slow answer. I looked into this idea some time ago. It turned out to be more complicated than I initially thought. But feel free to start with an implementation and open a PR, then we can work on this.

@lolbinarycat
Copy link
Author

@breml I originally planned to do just that and open a PR, but I've done a fair bit of work on various parsers, and I'm a bit tired of it for now. I may get back to it sometime though.

@breml
Copy link
Collaborator

breml commented Sep 4, 2020

@lolbinarycat Never mind, I leave the issue open for now.

@breml
Copy link
Collaborator

breml commented Apr 8, 2022

Duplicate of #62

@breml breml marked this as a duplicate of #62 Apr 8, 2022
@breml breml closed this as completed Apr 8, 2022
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