-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Is your feature request related to a problem? Please describe.
I want to be able to disable case insensitivity for variable names. This would allow us to have the variable banana and Banana as separate things.
Describe the solution you'd like
I'd like there to be a flag or setting that I can flip to enable case sensitive variable names. I don't have much preference for where or how, as long as it exists. I'd also be fine, for instance, if there was a callback defined to "normalize" variable names prior to comparison.
Describe alternatives you've considered
Since I couldn't find anything built-in, I was planning on just monkey-patching for now. I believe the relevant places are:
- https://github.com/google/blockly/blob/master/core/variables.js#L237
- https://github.com/google/blockly/blob/master/core/variables.js#L408
- https://github.com/google/blockly/blob/master/core/variables.js#L429
- https://github.com/google/blockly/blob/master/core/variable_model.js#L85
So I can just replace these existing functions dynamically with versions that don't have toLowerCase.