Bug Report
Current Behavior
Minor AST issue; The \8 and \9 are illegal escapes. In tagged template these should be recognized as bad escapes and set the .value property in the AST to null to reflect this.
Input Code
Expected behavior/code
For templates, an escape \8 and \9 end up as NotEscapeSequence
https://tc39.es/ecma262/#prod-NotEscapeSequence
The string value of that escape is undefined:
https://tc39.es/ecma262/#sec-static-semantics-tv-and-trv
The TV of TemplateCharacter :: \ NotEscapeSequence is undefined.
As such, the .value property in the AST nodes should be null to reflect this, like with other bad escapes.
Environment
Babel 7.5.5
Possible Solution
I think there's an exception to 8 and 9. Do the same as happens with \1 ~ \7. This is for tagged templates only.
Bug Report
Current Behavior
Minor AST issue; The
\8and\9are illegal escapes. In tagged template these should be recognized as bad escapes and set the.valueproperty in the AST tonullto reflect this.Input Code
`\8``\9`Expected behavior/code
For templates, an escape
\8and\9end up asNotEscapeSequencehttps://tc39.es/ecma262/#prod-NotEscapeSequence
The string value of that escape is undefined:
https://tc39.es/ecma262/#sec-static-semantics-tv-and-trv
As such, the
.valueproperty in the AST nodes should benullto reflect this, like with other bad escapes.Environment
Babel 7.5.5
Possible Solution
I think there's an exception to 8 and 9. Do the same as happens with
\1~\7. This is for tagged templates only.