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
Because MDN in their discussion of non-tagged template strings states
non-well-formed escape sequence is a syntax error
But it also states
Tagged templates enable the embedding of arbitrary string content, where escape sequences may follow a different syntax. ... Therefore, the syntax restriction of well-formed escape sequences is removed from tagged templates.
So the first example should be allowed, despite it containing a typically malformed escape sequence
I'd put up a PR myself but I'm not sure what direction to take this.
Options I'd consider are:
relaxing the conditions on escape sequence for any template string
creating a new syntax node for tagged template string, relaxing the escape sequences
what do you think @amaanq or @maxbrunsfeld , also I've been working on this project a good bit, is github the best way to communicate? Totally OK if that's what works for yall, but wondering if theres a better channel.
The text was updated successfully, but these errors were encountered:
The following piece of code is valid but it is parsed incorrectly:
Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript:
The output of
tree-sitter parse
is the following:Note that this is roughly correct for
Because MDN in their discussion of non-tagged template strings states
But it also states
So the first example should be allowed, despite it containing a typically malformed escape sequence
I'd put up a PR myself but I'm not sure what direction to take this.
Options I'd consider are:
new
expression with a tagged template #334)what do you think @amaanq or @maxbrunsfeld , also I've been working on this project a good bit, is github the best way to communicate? Totally OK if that's what works for yall, but wondering if theres a better channel.
The text was updated successfully, but these errors were encountered: