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

Unify builder and types API? #187

Open
fkling opened this issue Jun 24, 2015 · 2 comments
Open

Unify builder and types API? #187

fkling opened this issue Jun 24, 2015 · 2 comments

Comments

@fkling
Copy link
Contributor

fkling commented Jun 24, 2015

One thing that confused me at the beginning was that builders start with lower case (e.g. ifStatement) and types start with upper case (i.e. IfStatement).

Is there a particular reason for this? Or maybe this feels more intuitive for others (I don't find it intuitive). Would it be possible and/or reasonable to unify them (preferable upper case to match the AST node type name)?

(if not, tools that use ast-types could always provide their own unified API I guess)

@benjamn
Copy link
Owner

benjamn commented Jun 24, 2015

It's all programmatically generated, so I wouldn't mind supporting both styles for builders. For what it's worth, the lower-camel-case style came from the original Mozilla Parser API.

@fkling
Copy link
Contributor Author

fkling commented Jun 25, 2015

I see. (I meant to post this in ast-types, had the same issue open for both repos and submitted the wrong one :-/ )

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