mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
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:
parent
5d577df69e
commit
4e17787cb5
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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));
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user