Merge pull request #18077 from fwouts/regex-bug

Fix #18071: Printer failure when encountering RegularExpressionLiteral
This commit is contained in:
Daniel Rosenwasser
2017-08-28 14:10:29 -07:00
committed by GitHub
3 changed files with 5 additions and 0 deletions

View File

@@ -359,6 +359,7 @@ namespace ts {
case SyntaxKind.TemplateTail:
return "}" + escapeText(node.text, CharacterCodes.backtick) + "`";
case SyntaxKind.NumericLiteral:
case SyntaxKind.RegularExpressionLiteral:
return node.text;
}