Allow keywords as identifiers#313
Conversation
This matches the behavior of flatc
|
I don't know if there is a better way either but I think this approach is probably good enough. You can add tests in the However I think it also makes sense to test the code generation in this case. That would be in I think using keywords as identifiers is a bit cursed, but I'm not inherently against it. I'll take a better look later. |
|
By the way, is there anything preventing you from simply renaming the field to something that isn't a reserved keyword? |
I would have to update the thousand-odd places we currently use it in our codebase -- it isn't a simple find-and-replace because the word is used in other contexts too. |
This matches the behavior of flatc.
This feels a little hacky but this is my first time seeing larlpop so I'm unsure if there's a better way.
Guidance on suitable tests would be appreciated too.
The specific use case I have is fields called
attribute.Checklist