-
Notifications
You must be signed in to change notification settings - Fork 20
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 noIdentNormalize compilation flag #110
Conversation
I was going through active issues and came across #87, better sanitizename. I think this solution will suffer from the same issues as the previously proposed solution, I’ll keep working to allow for hashing. |
Worked off of the
#67 made reference to a "pretty name" table which was my first thought, also. But (if my assumption is correct) it seems like you can instead add the normalized name to the hashset that's tracking name collisions while returning the case sensitive Is there any internal reason why |
Did some minor modifications, and removed the switch. Futhark will now never try to normalize identifiers, only using normalization to be able to do the table lookups. The reason is because |
Thanks for the merge! I like what you did with double underscore replacement. |
Using the compilation flag
noidentnormalize
, this allows the user to deny identifier normalization to the final output file.Although this makes no difference to compilation, using this option will keep the output identifier as-is when the source name is already a valid Nim identifier. This makes editor code completion much nicer when using the generated bindings if you're expecting to use a consistent case convention.
Added test and updated README to demonstrate the purpose of the flag.