mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
do not check Missing
This commit is contained in:
parent
40358a1e65
commit
b9e5384f10
@ -232,6 +232,10 @@ module ts.formatting {
|
||||
/// Local functions
|
||||
|
||||
function processChildNode(child: Node, containingList: Node[], listElementIndex: number): void {
|
||||
if (child.kind === SyntaxKind.Missing) {
|
||||
return;
|
||||
}
|
||||
|
||||
var start = child.getStart(sourceFile);
|
||||
|
||||
while (currentTokenInfo.token && start >= currentTokenInfo.token.end) {
|
||||
@ -343,7 +347,6 @@ module ts.formatting {
|
||||
|
||||
function consumeCurrentToken(parent: Node, contextNode: Node, indentation: number): TokenInfo {
|
||||
Debug.assert(rangeContainsRange(parent, currentTokenInfo.token));
|
||||
|
||||
if (currentTokenInfo.leadingTrivia) {
|
||||
processTrivia(currentTokenInfo.leadingTrivia, parent, contextNode, indentation);
|
||||
}
|
||||
@ -360,7 +363,7 @@ module ts.formatting {
|
||||
function processTrivia(trivia: TextRangeWithKind[], parent: Node, contextNode: Node, currentIndentation: number): void {
|
||||
for (var i = 0, len = trivia.length; i < len; ++i) {
|
||||
var triviaItem = trivia[i];
|
||||
if (isComment(triviaItem.kind) && rangeContainsRange(originalRange, triviaItem)) {
|
||||
if (isComment(triviaItem.kind)) {
|
||||
processRange(triviaItem, parent, contextNode, currentIndentation);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user