Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

How to tell generator to generate script name for certain enum members? #16

Open
n9 opened this issue Oct 6, 2014 · 4 comments
Open

Comments

@n9
Copy link

n9 commented Oct 6, 2014

For instance, I would like to specify [ScriptName("keypress")] and change the name of ElementEvents.Keypress to ElementEvents.KeyPress.

@n9 n9 changed the title How to tell generator to generate script alias for certain enum members? How to tell generator to generate script name for certain enum members? Oct 6, 2014
@erik-kallen
Copy link
Contributor

In what way does [ScriptName("keypress")] KeyPress not work?

@erik-kallen
Copy link
Contributor

Sorry, thought this was in the compiler repo :)

This does not have any support right now, but you're welcome to add it. I'm not 100% sure, though, that this is a good idea; I see inconsistencies coming where some names are camel-cased and some only have capital first letters. At least the way it is now is consistent.

@n9
Copy link
Author

n9 commented Oct 6, 2014

I thought that the names could be somehow overridden in types.meta to make the naming consistent.

@erik-kallen
Copy link
Contributor

Yes, but we'd need to go through every single enum (both current and future ones) and specify the correct casing. IMO not worth the job, the whole idea about auto-generating is to minimize manual work, and I don't see this feature worth the maintenance it requires.

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

No branches or pull requests

2 participants