Use quotes around field names that start with an integer #293
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In AL Code, it is required that any field name starting with an integer is wrapped in double quotes. If not, then the compiler throws a huge fit.
When saving a file, the CRS language extension currently removes quotes from these field names, resulting in uncompilable code. Even if using ">Save without formatting", the CRS extension still removes the quotes. This problem is described in #153
This fix changes the
StringFunctions.encloseInQuotesIfNecessary
method to also recognize such field names and enclose them in quotation marks.