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

Add variant of builder interface where [metas] are *required* #69

Open
dlurton opened this issue Jan 26, 2021 · 0 comments
Open

Add variant of builder interface where [metas] are *required* #69

dlurton opened this issue Jan 26, 2021 · 0 comments

Comments

@dlurton
Copy link
Member

dlurton commented Jan 26, 2021

It's far too easy to forget to specify meta information when working with the generated builders. We should generate a second variation of this interface where the metas argument is required on all of the builder functions. Usage might go something like:

val ast = ToyLang.buildWithMetas {
    plus(
        lit(value = ionInt(1), metas = leftMetas),
        lit(value = ionInt(2), metas = rightMetas),
        metas = operatorMetas
    )
}
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