mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
add support for Lift Template Literal Restriction (#23801)
* add support for Lift Template Literal Restriction * rename file and improve comment and tests * fix NoSubstitutionTemplateLiteral support * extract tagged template and add more test * avoid useless parameter * fix incorrect return node if cannot transform * accept baseline * correctly baseline * accept baseline * fix merge break * fix merge break * inline rescan template head or no subsititution template * update scan error * add comment and fix lint * refactor and fix lint * avoid blank * fix merge conflict * fix again * fix again * use multiple target * fix space lint Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
@@ -135,7 +135,7 @@ namespace ts {
|
||||
const lastTemplateStackToken = lastOrUndefined(templateStack);
|
||||
|
||||
if (lastTemplateStackToken === SyntaxKind.TemplateHead) {
|
||||
token = scanner.reScanTemplateToken();
|
||||
token = scanner.reScanTemplateToken(/* isTaggedTemplate */ false);
|
||||
|
||||
// Only pop on a TemplateTail; a TemplateMiddle indicates there is more for us.
|
||||
if (token === SyntaxKind.TemplateTail) {
|
||||
|
||||
@@ -242,7 +242,7 @@ namespace ts.formatting {
|
||||
case ScanAction.RescanTemplateToken:
|
||||
if (token === SyntaxKind.CloseBraceToken) {
|
||||
lastScanAction = ScanAction.RescanTemplateToken;
|
||||
return scanner.reScanTemplateToken();
|
||||
return scanner.reScanTemplateToken(/* isTaggedTemplate */ false);
|
||||
}
|
||||
break;
|
||||
case ScanAction.RescanJsxIdentifier:
|
||||
|
||||
Reference in New Issue
Block a user