You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've hit a funny little bug with this excellent library. I'm trying to evaluate an expression such as AnyExpression.parse(var1 + "'\\n'" + var2, ...), but this fails with an unexpectedToken("\\n\'"). If I modify it slightly to ``AnyExpression.parse(var1 + "' \n'" + var2, ...)` it works -- notice the additional space.
The simplest way to reproduce this is Expression.parse("'\\n'").
It seems to be an issue with parseEscapedIdentifier and in particular this line:
while let part = scanCharacters({ $0 != delimiter && $0 != "\\" }) {
Unfortunately this implementation is going a bit over my head, so I haven't yet figured out how to fix this. Any advice would be much appreciated.
The text was updated successfully, but these errors were encountered:
nighthawk
changed the title
Expression.parse("'\\n
Expression.parse("'\\n'") fails
Jul 23, 2021
I've hit a funny little bug with this excellent library. I'm trying to evaluate an expression such as
AnyExpression.parse(var1 + "'\\n'" + var2, ...)
, but this fails with anunexpectedToken("\\n\'")
. If I modify it slightly to ``AnyExpression.parse(var1 + "' \n'" + var2, ...)` it works -- notice the additional space.The simplest way to reproduce this is
Expression.parse("'\\n'")
.It seems to be an issue with
parseEscapedIdentifier
and in particular this line:Unfortunately this implementation is going a bit over my head, so I haven't yet figured out how to fix this. Any advice would be much appreciated.
The text was updated successfully, but these errors were encountered: