-
Notifications
You must be signed in to change notification settings - Fork 323
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
Problem handing escaped identifiers in the Repl. #2577
Comments
Here is a simpler repro in C#, that strips away a lot of the overhead: namespace PowerFxQuotedNamesProblem
} It seems that the issue is that when a string (i.e. '$id') is parsed (through the Eval call) to be an identifier, the start and end quotes are stripped. Look in LexIdent (TexlLexer @ 1361). Here the string designating the variable is returned as $id, not '$id'. This is what causes all the mayhem going forward. There is special code to handle the '''$id'' case:
which causes the name to be left as '$id' and then everything snaps into place. But the name should not be escaped. I want the name to be '$id', I do not want to have understand the name as containing quotes. |
Note that the single quotes |
Please consider this set of actions in the REPL where a variable of name '$id' is defined. This variable name is escaped with the single quotes to cater for the otherwise illegal $ character.
From there it would appear that there are three variables defined: (a, b, '$id'). However, when I attempt to get the value of the '$id' variable I get into trouble:
However, you can get the variable by escaping the escapes:
The text was updated successfully, but these errors were encountered: