microsoft / Power-Fx

Power Fx low-code programming language
MIT License
3.21k stars 327 forks source link

Intellisense suggestions should include quotes around reserved words #2549

Closed MikeStall closed 4 months ago

MikeStall commented 4 months ago

Children appears to be a reserved word (requires identifier single quotes). Parent,Self are like this.

If it's really a reserved word, then intellisense should include the single quotes when it suggests it.

image

This gives an error in the usage without single quotes, but the usage with quotes works. With({'Children': 123}, ThisRecord.Children)

MikeStall commented 4 months ago

This is from list here: https://github.com/microsoft/Power-Fx/blob/d1931623598e3f557e25fc7ad6fe25065de3b268/src/libraries/Microsoft.PowerFx.Core/Lexer/TexlLexer.cs#L99

Practically - it means intellisense should suggest these words with single quotes to make them identifiers. .