Addressed CR feedback.

This commit is contained in:
Daniel Rosenwasser
2014-10-31 14:53:22 -07:00
parent 76c0381c3f
commit 63340a0d94
2 changed files with 5 additions and 4 deletions

View File

@@ -403,6 +403,8 @@ module ts {
templateSpans: NodeArray<TemplateSpan>;
}
// Each of these corresponds to a substitution expression and a template literal, in that order.
// The template literal must have kind TemplateMiddleLiteral or TemplateTailLiteral.
export interface TemplateSpan extends Node {
expression: Expression;
literal: LiteralExpression;
@@ -440,8 +442,7 @@ module ts {
export interface TaggedTemplateExpression extends Expression {
tag: Expression;
// Either a LiteralExpression of kind NoSubstitutionTemplateLiteral, or a TemplateExpression
template: Expression;
template: LiteralExpression | TemplateExpression;
}
export interface TypeAssertion extends Expression {

View File

@@ -2471,12 +2471,12 @@ module ts {
}
function isCompletionListBlocker(previousToken: Node): boolean {
return isInStringOrRegularExpressionLiteral(previousToken) ||
return isInStringOrRegularExpressionOrTemplateLiteral(previousToken) ||
isIdentifierDefinitionLocation(previousToken) ||
isRightOfIllegalDot(previousToken);
}
function isInStringOrRegularExpressionLiteral(previousToken: Node): boolean {
function isInStringOrRegularExpressionOrTemplateLiteral(previousToken: Node): boolean {
if (previousToken.kind === SyntaxKind.StringLiteral || isTemplateLiteralKind(previousToken.kind)) {
// The position has to be either: 1. entirely within the token text, or
// 2. at the end position, and the string literal is not terminated