Do not colorize a keyword following an identifier.<newLine> as it is likely an error scenario as the user is typing

This commit is contained in:
Mohamed Hegazy 2014-09-12 16:49:45 -07:00
parent 5d577df69e
commit 4e17787cb5
2 changed files with 2 additions and 9 deletions

View File

@ -692,7 +692,6 @@ module ts {
InMultiLineCommentTrivia,
InSingleQuoteStringLiteral,
InDoubleQuoteStringLiteral,
EndingWithDotToken,
}
export enum TokenClass {
@ -3502,9 +3501,6 @@ module ts {
text = "/*\n" + text;
offset = 3;
break;
case EndOfLineState.EndingWithDotToken:
lastToken = SyntaxKind.DotToken;
break;
}
var result: ClassificationResult = {
@ -3572,9 +3568,6 @@ module ts {
: EndOfLineState.InSingleQuoteStringLiteral;
}
}
else if (token === SyntaxKind.DotToken) {
result.finalLexState = EndOfLineState.EndingWithDotToken;
}
}
}

View File

@ -170,8 +170,8 @@ describe('Colorization', function () {
it("classifies keyword after a dot on previous line", function () {
test("var",
ts.EndOfLineState.EndingWithDotToken,
identifier("var"),
ts.EndOfLineState.Start,
keyword("var"),
finalEndOfLineState(ts.EndOfLineState.Start));
});
});