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
The string parser generates a new set of tokens based on the template expression after the $ or ${ because it's an entirely new lexical analysis, the location of the tokens isn't exactly correct, nor does it have access to the original source object which is a problem if we need to return errors (as they reference a source object).
Currently a workaround is provided: Instead of just returning the result of parse_expr, we construct a new error with the original string literal token and only the message from the result of parsing the expression.
Eventually, a proper fix will be needed to accurately display where the error occurred.
[Consider creating hierarchical errors rather than just flat lists]
The text was updated successfully, but these errors were encountered:
The string parser generates a new set of tokens based on the template expression after the
$
or${
because it's an entirely new lexical analysis, the location of the tokens isn't exactly correct, nor does it have access to the originalsource
object which is a problem if we need to return errors (as they reference asource
object).Currently a workaround is provided: Instead of just returning the result of
parse_expr
, we construct a new error with the original string literal token and only the message from the result of parsing the expression.Eventually, a proper fix will be needed to accurately display where the error occurred.
[Consider creating hierarchical errors rather than just flat lists]
The text was updated successfully, but these errors were encountered: