From b6b80817f48fab65c1f658353298dfbe7b39a70b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 14 Oct 2014 14:44:38 -0700 Subject: [PATCH 001/154] initial revision of formatting --- src/compiler/emitter.ts | 2 +- src/compiler/parser.ts | 19 +- src/compiler/scanner.ts | 4 +- src/compiler/types.ts | 1 + src/harness/harness.ts | 2 +- src/harness/sourceMapRecorder.ts | 6 +- src/services/formatting/format.ts | 535 ++++++++++++++ src/services/formatting/new/formatter.ts | 320 ++++++++ src/services/formatting/new/formatting.ts | 39 + .../formatting/new/formattingContext.ts | 130 ++++ .../formatting/new/formattingManager.ts | 123 ++++ .../formatting/new/formattingRequestKind.ts | 26 + .../formatting/new/indentationNodeContext.ts | 103 +++ .../new/indentationNodeContextPool.ts | 43 ++ .../new/indentationTrackingWalker.ts | 349 +++++++++ .../formatting/new/multipleTokenIndenter.ts | 206 ++++++ src/services/formatting/new/rule.ts | 32 + src/services/formatting/new/ruleAction.ts | 25 + src/services/formatting/new/ruleDescriptor.ts | 46 ++ src/services/formatting/new/ruleFlag.ts | 23 + src/services/formatting/new/ruleOperation.ts | 44 ++ .../formatting/new/ruleOperationContext.ts | 47 ++ src/services/formatting/new/rules.ts | 687 ++++++++++++++++++ src/services/formatting/new/rulesMap.ts | 189 +++++ src/services/formatting/new/rulesProvider.ts | 117 +++ src/services/formatting/new/smartIndenter.ts | 401 ++++++++++ .../formatting/new/smartIndenter.ts.orig | 476 ++++++++++++ src/services/formatting/new/snapshotPoint.ts | 30 + src/services/formatting/new/textEditInfo.ts | 28 + src/services/formatting/new/textSnapshot.ts | 89 +++ .../formatting/new/textSnapshotLine.ts | 80 ++ src/services/formatting/new/tokenRange.ts | 152 ++++ src/services/formatting/new/tokenSpan.ts | 25 + src/services/formatting/smartIndenter.ts | 59 +- src/services/formatting/stringUtilities.ts | 52 ++ src/services/services.ts | 62 +- src/services/utilities.ts | 4 + 37 files changed, 4547 insertions(+), 29 deletions(-) create mode 100644 src/services/formatting/format.ts create mode 100644 src/services/formatting/new/formatter.ts create mode 100644 src/services/formatting/new/formatting.ts create mode 100644 src/services/formatting/new/formattingContext.ts create mode 100644 src/services/formatting/new/formattingManager.ts create mode 100644 src/services/formatting/new/formattingRequestKind.ts create mode 100644 src/services/formatting/new/indentationNodeContext.ts create mode 100644 src/services/formatting/new/indentationNodeContextPool.ts create mode 100644 src/services/formatting/new/indentationTrackingWalker.ts create mode 100644 src/services/formatting/new/multipleTokenIndenter.ts create mode 100644 src/services/formatting/new/rule.ts create mode 100644 src/services/formatting/new/ruleAction.ts create mode 100644 src/services/formatting/new/ruleDescriptor.ts create mode 100644 src/services/formatting/new/ruleFlag.ts create mode 100644 src/services/formatting/new/ruleOperation.ts create mode 100644 src/services/formatting/new/ruleOperationContext.ts create mode 100644 src/services/formatting/new/rules.ts create mode 100644 src/services/formatting/new/rulesMap.ts create mode 100644 src/services/formatting/new/rulesProvider.ts create mode 100644 src/services/formatting/new/smartIndenter.ts create mode 100644 src/services/formatting/new/smartIndenter.ts.orig create mode 100644 src/services/formatting/new/snapshotPoint.ts create mode 100644 src/services/formatting/new/textEditInfo.ts create mode 100644 src/services/formatting/new/textSnapshot.ts create mode 100644 src/services/formatting/new/textSnapshotLine.ts create mode 100644 src/services/formatting/new/tokenRange.ts create mode 100644 src/services/formatting/new/tokenSpan.ts create mode 100644 src/services/formatting/stringUtilities.ts diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index c038cf39868..e8e80b9898b 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -132,7 +132,7 @@ module ts { function writeLiteral(s: string) { if (s && s.length) { write(s); - var lineStartsOfS = getLineStarts(s); + var lineStartsOfS = computeLineStarts(s); if (lineStartsOfS.length > 1) { lineCount = lineCount + lineStartsOfS.length - 1; linePos = output.length - s.length + lineStartsOfS[lineStartsOfS.length - 1]; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index b7582b9ed06..cd08aaa0914 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -782,18 +782,16 @@ module ts { }; })(); - function getLineAndCharacterlFromSourcePosition(position: number) { - if (!lineStarts) { - lineStarts = getLineStarts(sourceText); - } - return getLineAndCharacterOfPosition(lineStarts, position); + function getLineStarts(): number[] { + return lineStarts || (lineStarts = computeLineStarts(sourceText)); + } + + function getLineAndCharacterFromSourcePosition(position: number) { + return getLineAndCharacterOfPosition(getLineStarts(), position); } function getPositionFromSourceLineAndCharacter(line: number, character: number): number { - if (!lineStarts) { - lineStarts = getLineStarts(sourceText); - } - return getPositionFromLineAndCharacter(lineStarts, line, character); + return getPositionFromLineAndCharacter(getLineStarts(), line, character); } function error(message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): void { @@ -3888,8 +3886,9 @@ module ts { file = createRootNode(SyntaxKind.SourceFile, 0, sourceText.length, rootNodeFlags); file.filename = normalizePath(filename); file.text = sourceText; - file.getLineAndCharacterFromPosition = getLineAndCharacterlFromSourcePosition; + file.getLineAndCharacterFromPosition = getLineAndCharacterFromSourcePosition; file.getPositionFromLineAndCharacter = getPositionFromSourceLineAndCharacter; + file.getLineStarts = getLineStarts; file.syntacticErrors = []; file.semanticErrors = []; var referenceComments = processReferenceComments(); diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 81d16b5f487..1aa74a35a71 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -244,7 +244,7 @@ module ts { return tokenStrings[t]; } - export function getLineStarts(text: string): number[] { + export function computeLineStarts(text: string): number[] { var result: number[] = new Array(); var pos = 0; var lineStart = 0; @@ -292,7 +292,7 @@ module ts { } export function positionToLineAndCharacter(text: string, pos: number) { - var lineStarts = getLineStarts(text); + var lineStarts = computeLineStarts(text); return getLineAndCharacterOfPosition(lineStarts, pos); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index b2da87c4ec0..cab45aadbe6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -547,6 +547,7 @@ module ts { text: string; getLineAndCharacterFromPosition(position: number): { line: number; character: number }; getPositionFromLineAndCharacter(line: number, character: number): number; + getLineStarts(): number[]; amdDependencies: string[]; referencedFiles: FileReference[]; syntacticErrors: Diagnostic[]; diff --git a/src/harness/harness.ts b/src/harness/harness.ts index e35fe83f9b2..8bfaeb5800f 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -882,7 +882,7 @@ module Harness { // Note: IE JS engine incorrectly handles consecutive delimiters here when using RegExp split, so // we have to string-based splitting instead and try to figure out the delimiting chars - var lineStarts = ts.getLineStarts(inputFile.content); + var lineStarts = ts.computeLineStarts(inputFile.content); var lines = inputFile.content.split('\n'); lines.forEach((line, lineIndex) => { if (line.length > 0 && line.charAt(line.length - 1) === '\r') { diff --git a/src/harness/sourceMapRecorder.ts b/src/harness/sourceMapRecorder.ts index f7a6bdbf3e5..f7d6bcfeaa1 100644 --- a/src/harness/sourceMapRecorder.ts +++ b/src/harness/sourceMapRecorder.ts @@ -223,7 +223,7 @@ module Harness.SourceMapRecoder { sourceMapNames = sourceMapData.sourceMapNames; jsFile = currentJsFile; - jsLineMap = ts.getLineStarts(jsFile.code); + jsLineMap = ts.computeLineStarts(jsFile.code); spansOnSingleLine = []; prevWrittenSourcePos = 0; @@ -294,7 +294,7 @@ module Harness.SourceMapRecoder { sourceMapRecoder.WriteLine("sourceFile:" + sourceMapSources[spansOnSingleLine[0].sourceMapSpan.sourceIndex]); sourceMapRecoder.WriteLine("-------------------------------------------------------------------"); - tsLineMap = ts.getLineStarts(newSourceFileCode); + tsLineMap = ts.computeLineStarts(newSourceFileCode); tsCode = newSourceFileCode; prevWrittenSourcePos = 0; } @@ -390,7 +390,7 @@ module Harness.SourceMapRecoder { } } - var tsCodeLineMap = ts.getLineStarts(sourceText); + var tsCodeLineMap = ts.computeLineStarts(sourceText); for (var i = 0; i < tsCodeLineMap.length; i++) { writeSourceMapIndent(prevEmittedCol, i == 0 ? markerIds[index] : " >"); sourceMapRecoder.Write(getTextOfLine(i, tsCodeLineMap, sourceText)); diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts new file mode 100644 index 00000000000..72c55332a3c --- /dev/null +++ b/src/services/formatting/format.ts @@ -0,0 +1,535 @@ +/// +/// +/// + +module ts.formatting { + + export interface TextRangeWithKind extends TextRange { + kind: SyntaxKind; + } + + export interface TokenInfo extends TextRange { + leadingTrivia: TextRangeWithKind[]; + token: TextRangeWithKind; + trailingTrivia: TextRangeWithKind[]; + pos: number; + end: number; + } + + var formattingScanner = createScanner(ScriptTarget.ES5, /*skipTrivia*/ false); + + export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ + var line = getNonAdjustedLineAndCharacterFromPosition(position, sourceFile).line; + // get the span for the previous\current line + var span = { + // get start position for the previous line + pos: getStartPositionOfLine(line - 1, sourceFile), + // get end position for the current line (end value is exclusive so add 1 to the result) + end: getEndLinePosition(line, sourceFile) + 1 + } + return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnEnter, formattingScanner); + } + + export function formatOnSemicolon(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ + return formatOutermostParent(position, SyntaxKind.SemicolonToken, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnSemicolon); + } + + export function formatOnClosingCurly(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { + return formatOutermostParent(position, SyntaxKind.CloseBraceToken, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnClosingCurlyBrace); + } + + export function formatDocument(sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ + var span = { + pos: 0, + end: sourceFile.text.length + }; + return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatDocument, formattingScanner); + } + + export function formatSelection(start: number, end: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ + // format from the beginning of the line + var span = { + pos: getStartLinePositionForPosition(start, sourceFile), + end: end + }; + return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatSelection, formattingScanner); + } + + function getEndLinePosition(line: number, sourceFile: SourceFile): number { + var lineStarts = sourceFile.getLineStarts(); + if (line === lineStarts.length - 1) { + // last line - return EOF - + return sourceFile.text.length - lineStarts[line]; + } + else { + // current line start + var start = lineStarts[line]; + // take the start position of the next line -1 = it should be some line break + var pos = lineStarts[line + 1] - 1; + Debug.assert(isLineBreak(sourceFile.text.charCodeAt(pos))); + // walk backwards skipping line breaks, stop the the beginning of current line. + // i.e: + // + // $ <- end of line for this position should match the start position + while (start <= pos && isLineBreak(sourceFile.text.charCodeAt(pos))) { + pos--; + } + return pos; + } + } + + function getStartPositionOfLine(line: number, sourceFile: SourceFile): number { + return sourceFile.getLineStarts()[line]; + } + + function getStartLinePositionForPosition(position: number, sourceFile: SourceFile): number { + var lineStarts = sourceFile.getLineStarts(); + var line = getNonAdjustedLineAndCharacterFromPosition(position, sourceFile).line; + return lineStarts[line]; + } + + function formatOutermostParent(position: number, expectedLastToken: SyntaxKind, sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, requestKind: FormattingRequestKind): TextChange[]{ + var parent = findOutermostParent(position, expectedLastToken, sourceFile); + if (!parent) { + return []; + } + var span = { + pos: getStartLinePositionForPosition(parent.pos, sourceFile), + end: parent.end + }; + return formatSpan(span, sourceFile, options, rulesProvider, requestKind, formattingScanner); + } + + function findOutermostParent(position: number, expectedTokenKind: SyntaxKind, sourceFile: SourceFile): Node { + var precedingToken = findPrecedingToken(position, sourceFile); + if (!precedingToken || precedingToken.kind !== expectedTokenKind) { + return undefined; + } + + // walk up and search for the parent node that ends at the same position with precedingToken + var current = precedingToken; + while (current && + current.parent && + current.parent.end === precedingToken.end && + !isListElement(current.parent, current) ) { + current = current.parent; + } + + return current; + } + + function rangeContainsRange(initial: TextRange, candidate: TextRange): boolean { + return startEndContainsRange(initial.pos, initial.end, candidate); + } + + function startEndContainsRange(start: number, end: number, candidate: TextRange): boolean { + return start <= candidate.pos && end >= candidate.end; + } + + function rangeOverlapsWithRange(r1: TextRange, r2: TextRange): boolean { + var start = Math.max(r1.pos, r2.pos); + var end = Math.min(r1.end, r2.end); + return start < end; + } + + function isListElement(parent: Node, node: Node): boolean { + switch (parent.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + return rangeContainsRange((parent).members, node); + case SyntaxKind.ModuleDeclaration: + var body = (parent).body; + return body && body.kind === SyntaxKind.Block && rangeContainsRange((body).statements, node); + case SyntaxKind.SourceFile: + case SyntaxKind.Block: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.ModuleBlock: + return rangeContainsRange((parent).statements, node) + } + } + + function findEnclosingNode(range: TextRange, sourceFile: SourceFile): Node { + return find(sourceFile); + + function find(n: Node): Node { + var candidate = forEachChild(n, c => startEndContainsRange(c.getStart(sourceFile), c.end, range) && c); + return (candidate && find(candidate)) || n; + } + } + + function getIndentationForNode(n: Node, sourceFile: SourceFile, options: FormatCodeOptions): number { + var start = sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)); + return SmartIndenter.getIndentationForNode(n, start, /*indentationDelta*/ 0, sourceFile, options); + } + + function getNonAdjustedLineAndCharacterFromPosition(position: number, sourceFile: SourceFile): LineAndCharacter { + var lineAndChar = sourceFile.getLineAndCharacterFromPosition(position); + return { line: lineAndChar.line - 1, character: lineAndChar.character - 1 }; + } + + function formatSpan(originalRange: TextRange, + sourceFile: SourceFile, + options: FormatCodeOptions, + rulesProvider: RulesProvider, + requestKind: FormattingRequestKind, + scanner: Scanner): TextChange[] { + + // formatting context to be used by rules provider to get rules + var formattingContext = new FormattingContext(sourceFile, requestKind); + + var enclosingNode = findEnclosingNode(originalRange, sourceFile); + var initialIndentation = getIndentationForNode(enclosingNode, sourceFile, options); + + scanner.setText(sourceFile.text); + scanner.setTextPos(enclosingNode.pos); + + var previousRange: TextRangeWithKind; + var previousParent: Node; + var previousRangeStartLine: number; + + var lastTriviaWasNewLine = false; + var edits: TextChange[] = []; + + // advance the scaner + scanner.scan(); + var currentTokenInfo = fetchNextTokenInfo(); + + if (currentTokenInfo.token) { + var startLine = getNonAdjustedLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile), sourceFile).line; + processNode(enclosingNode, enclosingNode, startLine, initialIndentation); + } + return edits; + + function processNode(node: Node, contextNode: Node, nodeStartLine: number, indentation: number) { + // TODO: skip nodes that has skipped or missing tokens + if (!rangeOverlapsWithRange(originalRange, node)) { + return; + } + + if (!rangeContainsRange(node, currentTokenInfo)) { + // node and its descendents don't contain current token from the scanner - skip it + return; + } + + var childContextNode = contextNode; + forEachChild( + node, + child => processChildNode(child, /*containingList*/ undefined, /*listElementIndex*/ -1), + nodes => { + for (var i = 0, len = nodes.length; i < len; ++i) { + processChildNode(nodes[i], /*containingList*/ nodes, /*listElementIndex*/ i) + } + } + ); + + while (currentTokenInfo.token && node.end >= currentTokenInfo.token.end) { + currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + } + + /// Local functions + + function processChildNode(child: Node, containingList: Node[], listElementIndex: number): void { + var start = child.getStart(sourceFile); + + while (currentTokenInfo.token && start >= currentTokenInfo.token.end) { + // we've walked past the current token + // ask parent to handle it + currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + childContextNode = node; + } + + if (!currentTokenInfo.token) { + return; + } + + // ensure that current token is inside child node + Debug.assert(currentTokenInfo.token.end <= child.end); + if (isToken(child) && currentTokenInfo.token.end === child.end) { + // tokens belong to parent nodes + currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + childContextNode = node; + } + else { + var childStartLine = getNonAdjustedLineAndCharacterFromPosition(start, sourceFile).line; + + var childIndentation = indentation; + if (listElementIndex === -1) { + // child is not list element + + } + else { + // child is a list element + } + // determine child indentation + // if child + // TODO: share this code with SmartIndenter + var increaseIndentation = + childStartLine !== nodeStartLine && + !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && + SmartIndenter.nodeContentIsIndented(node, child); + + processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); + childContextNode = node; + } + } + } + + function fetchNextTokenInfo(): TokenInfo { + if (currentTokenInfo) { + lastTriviaWasNewLine = + currentTokenInfo.trailingTrivia && + currentTokenInfo.trailingTrivia[currentTokenInfo.trailingTrivia.length - 1].kind === SyntaxKind.NewLineTrivia; + } + + var leadingTrivia: TextRangeWithKind[]; + var trailingTrivia: TextRangeWithKind[]; + var tokenRange: TextRangeWithKind; + + var startPos = scanner.getStartPos(); + var initialStartPos = startPos; + + while (startPos < originalRange.end) { + var t = scanner.getToken(); + + if (tokenRange && !isTrivia(t)) { + // have already seen the token and item under cursor is not a trivia + break; + } + + // advance the cursor + scanner.scan(); + + var item = { pos: startPos, end: scanner.getStartPos(), kind: t }; + startPos = item.end; + + if (isTrivia(t)) { + if (tokenRange) { + + if (!trailingTrivia) { + trailingTrivia = []; + } + + trailingTrivia.push(item); + + if (t === SyntaxKind.NewLineTrivia) { + // trailing trivia is cut at the new line + break; + } + } + else { + if (!leadingTrivia) { + leadingTrivia = []; + } + + leadingTrivia.push(item); + } + } + else { + tokenRange = item; + } + } + + return { + leadingTrivia: leadingTrivia, + token: tokenRange, + trailingTrivia: trailingTrivia, + pos: initialStartPos, + end: scanner.getStartPos() + }; + } + + function consumeCurrentToken(parent: Node, contextNode: Node, indentation: number): TokenInfo { + Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); + + if (currentTokenInfo.leadingTrivia) { + processTrivia(currentTokenInfo.leadingTrivia, parent, contextNode, indentation); + } + + processRange(currentTokenInfo.token, parent, contextNode, indentation); + + if (currentTokenInfo.trailingTrivia) { + processTrivia(currentTokenInfo.trailingTrivia, parent, contextNode, indentation); + } + + return fetchNextTokenInfo(); + } + + 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)) { + processRange(triviaItem, parent, contextNode, currentIndentation); + } + } + } + + function processRange(range: TextRangeWithKind, parent: Node, contextNode: Node, indentation: number) { + var rangeStart = getNonAdjustedLineAndCharacterFromPosition(range.pos, sourceFile); + if (rangeContainsRange(originalRange, range)) { + var indentToken = false; + if (!previousRange) { + var originalStart = getNonAdjustedLineAndCharacterFromPosition(originalRange.pos, sourceFile); + // TODO: implement + if (isTrivia(range.kind)) { + trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); + } + else { + trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); + } + } + else { + processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode) + indentToken = rangeStart.line !== previousRangeStartLine; + } + + if (lastTriviaWasNewLine && indentToken) { + // TODO: handle indentation in multiline comments + if (!isTrivia(range.kind)) { + var currentIndentation = rangeStart.character; + if (indentation !== currentIndentation) { + var indentationString = getIndentationString(indentation, options); + var startLinePosition = getStartPositionOfLine(rangeStart.line, sourceFile); + recordReplace(startLinePosition, currentIndentation, indentationString); + } + } + } + } + + previousRange = range; + previousParent = parent; + previousRangeStartLine = rangeStart.line; + } + + function processPair(currentItem: TextRangeWithKind, + currentStartLine: number, + currentParent: Node, + previousItem: TextRangeWithKind, + previousStartLine: number, + previousParent: Node, + contextNode: Node): void { + + // TODO: compute common parent + formattingContext.updateContext(previousItem, previousParent, currentItem, currentParent, contextNode); + var rule = rulesProvider.getRulesMap().GetRule(formattingContext); + + var trimTrailingWhitespaces: boolean; + if (rule) { + applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); + + if (rule.Operation.Action & (RuleAction.Space | RuleAction.Delete) && currentStartLine !== previousStartLine) { + // Old code: + // Handle the case where the next line is moved to be the end of this line. + // In this case we don't indent the next line in the next pass. + // this.forceSkipIndentingNextToken(t2.start()); + lastTriviaWasNewLine = false; + } + else if (rule.Operation.Action & RuleAction.NewLine && currentStartLine === previousStartLine) { + // Old code: + // Handle the case where token2 is moved to the new line. + // In this case we indent token2 in the next pass but we set + // sameLineIndent flag to notify the indenter that the indentation is within the line. + // this.forceIndentNextToken(t2.start()); + lastTriviaWasNewLine = true; + } + + // TODO: check if this is still needed + trimTrailingWhitespaces = + (rule.Operation.Action & (RuleAction.NewLine | RuleAction.Space)) && + rule.Flag !== RuleFlags.CanDeleteNewLines; + } + else { + trimTrailingWhitespaces = true; + } + + if (currentStartLine !== previousStartLine && trimTrailingWhitespaces) { + // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line + trimTrailingWhitespacesForLines(previousStartLine, currentStartLine, previousItem); + } + } + + function trimTrailingWhitespacesForLines(line1: number, line2: number, range?: TextRangeWithKind) { + for (var line = line1; line < line2; ++line) { + var lineStartPosition = getStartPositionOfLine(line, sourceFile); + var lineEndPosition = getEndLinePosition(line, sourceFile); + + // if (token && (token.kind == SyntaxKind.MultiLineCommentTrivia || token.kind == SyntaxKind.SingleLineCommentTrivia) && token.start() <= line.endPosition() && token.end() >= line.endPosition()) + + if (range && isComment(range.kind)&& false) { + continue; + } + + var pos = lineEndPosition; + while (pos >= lineStartPosition && isWhiteSpace(sourceFile.text.charCodeAt(pos))) { + pos--; + } + if (pos !== lineEndPosition) { + Debug.assert(pos === lineStartPosition || !isWhiteSpace(sourceFile.text.charCodeAt(pos))); + recordDelete(pos + 1, lineEndPosition - pos); + } + } + } + + function newTextChange(start: number, len: number, newText: string): TextChange { + return { span: new TypeScript.TextSpan(start, len), newText: newText } + } + + function recordDelete(start: number, len: number) { + if (len) { + edits.push(newTextChange(start, len, "")); + } + } + + function recordReplace(start: number, len: number, newText: string) { + if (len || newText) { + edits.push(newTextChange(start, len, newText)); + } + } + + function applyRuleEdits(rule: Rule, + previousRange: TextRangeWithKind, + previousStartLine: number, + currentRange: TextRangeWithKind, + currentStartLine: number): void { + + var between: TextRange; + switch (rule.Operation.Action) { + case RuleAction.Ignore: + // no action required + return; + case RuleAction.Delete: + if (previousRange.end !== currentRange.pos) { + // delete characters starting from t1.end up to t2.pos exclusive + recordDelete(previousRange.end, currentRange.pos - previousRange.end); + } + break; + case RuleAction.NewLine: + // exit early if we on different lines and rule cannot change number of newlines + // if line1 and line2 are on subsequent lines then no edits are required - ok to exit + // if line1 and line2 are separated with more than one newline - ok to exit since we cannot delete extra new lines + if (rule.Flag !== RuleFlags.CanDeleteNewLines && previousStartLine !== currentStartLine) { + return; + } + + // edit should not be applied only if we have one line feed between elements + var lineDelta = currentStartLine - previousStartLine; + if (lineDelta !== 1) { + recordReplace(previousRange.end, currentRange.pos - previousRange.end, options.NewLineCharacter); + } + break; + case RuleAction.Space: + // exit early if we on different lines and rule cannot change number of newlines + if (rule.Flag !== RuleFlags.CanDeleteNewLines && previousStartLine !== currentStartLine) { + return; + } + + var posDelta = currentRange.pos - previousRange.end; + if (posDelta !== 1 || sourceFile.text.charCodeAt(previousRange.end) !== CharacterCodes.space) { + recordReplace(previousRange.end, currentRange.pos - previousRange.end, " "); + } + break; + } + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/formatter.ts b/src/services/formatting/new/formatter.ts new file mode 100644 index 00000000000..e4a1229abef --- /dev/null +++ b/src/services/formatting/new/formatter.ts @@ -0,0 +1,320 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module TypeScript.Services.Formatting { + export class Formatter extends MultipleTokenIndenter { + private previousTokenSpan: TokenSpan = null; + private previousTokenParent: IndentationNodeContext = null; + + // TODO: implement it with skipped tokens in Fidelity + private scriptHasErrors: boolean = false; + + private rulesProvider: RulesProvider; + private formattingRequestKind: FormattingRequestKind; + private formattingContext: FormattingContext; + + constructor(textSpan: TextSpan, + sourceUnit: SourceUnitSyntax, + indentFirstToken: boolean, + options: FormattingOptions, + snapshot: ITextSnapshot, + rulesProvider: RulesProvider, + formattingRequestKind: FormattingRequestKind) { + + super(textSpan, sourceUnit, snapshot, indentFirstToken, options); + + this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); + + this.rulesProvider = rulesProvider; + this.formattingRequestKind = formattingRequestKind; + this.formattingContext = new FormattingContext(this.snapshot(), this.formattingRequestKind); + } + + public static getEdits(textSpan: TextSpan, + sourceUnit: SourceUnitSyntax, + options: FormattingOptions, + indentFirstToken: boolean, + snapshot: ITextSnapshot, + rulesProvider: RulesProvider, + formattingRequestKind: FormattingRequestKind): TextEditInfo[] { + var walker = new Formatter(textSpan, sourceUnit, indentFirstToken, options, snapshot, rulesProvider, formattingRequestKind); + visitNodeOrToken(walker, sourceUnit); + return walker.edits(); + } + + public visitTokenInSpan(token: ISyntaxToken): void { + if (token.fullWidth() !== 0) { + var tokenSpan = new TextSpan(this.position() + token.leadingTriviaWidth(), width(token)); + if (this.textSpan().containsTextSpan(tokenSpan)) { + this.processToken(token); + } + } + + // Call the base class to process the token and indent it if needed + super.visitTokenInSpan(token); + } + + private processToken(token: ISyntaxToken): void { + var position = this.position(); + + // Extract any leading comments + if (token.leadingTriviaWidth() !== 0) { + this.processTrivia(token.leadingTrivia(), position); + position += token.leadingTriviaWidth(); + } + + // Push the token + var currentTokenSpan = new TokenSpan(token.kind(), position, width(token)); + if (!this.parent().hasSkippedOrMissingTokenChild()) { + if (this.previousTokenSpan) { + // Note that formatPair calls TrimWhitespaceInLineRange in between the 2 tokens + this.formatPair(this.previousTokenSpan, this.previousTokenParent, currentTokenSpan, this.parent()); + } + else { + // We still want to trim whitespace even if it is the first trivia of the first token. Trim from the beginning of the span to the trivia + this.trimWhitespaceInLineRange(this.getLineNumber(this.textSpan()), this.getLineNumber(currentTokenSpan)); + } + } + this.previousTokenSpan = currentTokenSpan; + if (this.previousTokenParent) { + // Make sure to clear the previous parent before assigning a new value to it + this.indentationNodeContextPool().releaseNode(this.previousTokenParent, /* recursive */true); + } + this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); + position += width(token); + + // Extract any trailing comments + if (token.trailingTriviaWidth() !== 0) { + this.processTrivia(token.trailingTrivia(), position); + } + } + + private processTrivia(triviaList: ISyntaxTriviaList, fullStart: number) { + var position = fullStart; + + for (var i = 0, n = triviaList.count(); i < n ; i++) { + var trivia = triviaList.syntaxTriviaAt(i); + // For a comment, format it like it is a token. For skipped text, eat it up as a token, but skip the formatting + if (trivia.isComment() || trivia.isSkippedToken()) { + var currentTokenSpan = new TokenSpan(trivia.kind(), position, trivia.fullWidth()); + if (this.textSpan().containsTextSpan(currentTokenSpan)) { + if (trivia.isComment() && this.previousTokenSpan) { + // Note that formatPair calls TrimWhitespaceInLineRange in between the 2 tokens + this.formatPair(this.previousTokenSpan, this.previousTokenParent, currentTokenSpan, this.parent()); + } + else { + // We still want to trim whitespace even if it is the first trivia of the first token. Trim from the beginning of the span to the trivia + var startLine = this.getLineNumber(this.previousTokenSpan || this.textSpan()); + this.trimWhitespaceInLineRange(startLine, this.getLineNumber(currentTokenSpan)); + } + this.previousTokenSpan = currentTokenSpan; + if (this.previousTokenParent) { + // Make sure to clear the previous parent before assigning a new value to it + this.indentationNodeContextPool().releaseNode(this.previousTokenParent, /* recursive */true); + } + this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); + } + } + + position += trivia.fullWidth(); + } + } + + private findCommonParents(parent1: IndentationNodeContext, parent2: IndentationNodeContext): IndentationNodeContext { + // TODO: disable debug assert message + + var shallowParent: IndentationNodeContext; + var shallowParentDepth: number; + var deepParent: IndentationNodeContext; + var deepParentDepth: number; + + if (parent1.depth() < parent2.depth()) { + shallowParent = parent1; + shallowParentDepth = parent1.depth(); + deepParent = parent2; + deepParentDepth = parent2.depth(); + } + else { + shallowParent = parent2; + shallowParentDepth = parent2.depth(); + deepParent = parent1; + deepParentDepth = parent1.depth(); + } + + Debug.assert(shallowParentDepth >= 0, "Expected shallowParentDepth >= 0"); + Debug.assert(deepParentDepth >= 0, "Expected deepParentDepth >= 0"); + Debug.assert(deepParentDepth >= shallowParentDepth, "Expected deepParentDepth >= shallowParentDepth"); + + while (deepParentDepth > shallowParentDepth) { + deepParent = deepParent.parent(); + deepParentDepth--; + } + + Debug.assert(deepParentDepth === shallowParentDepth, "Expected deepParentDepth === shallowParentDepth"); + + while (deepParent.node() && shallowParent.node()) { + if (deepParent.node() === shallowParent.node()) { + return deepParent; + } + deepParent = deepParent.parent(); + shallowParent = shallowParent.parent(); + } + + // The root should be the first element in the parent chain, we can not be here unless something wrong + // happened along the way + throw Errors.invalidOperation(); + } + + private formatPair(t1: TokenSpan, t1Parent: IndentationNodeContext, t2: TokenSpan, t2Parent: IndentationNodeContext): void { + var token1Line = this.getLineNumber(t1); + var token2Line = this.getLineNumber(t2); + + // Find common parent + var commonParent= this.findCommonParents(t1Parent, t2Parent); + + // Update the context + this.formattingContext.updateContext(t1, t1Parent, t2, t2Parent, commonParent); + + // Find rules matching the current context + var rule = this.rulesProvider.getRulesMap().GetRule(this.formattingContext); + + if (rule != null) { + // Record edits from the rule + this.RecordRuleEdits(rule, t1, t2); + + // Handle the case where the next line is moved to be the end of this line. + // In this case we don't indent the next line in the next pass. + if ((rule.Operation.Action == RuleAction.Space || rule.Operation.Action == RuleAction.Delete) && + token1Line != token2Line) { + this.forceSkipIndentingNextToken(t2.start()); + } + + // Handle the case where token2 is moved to the new line. + // In this case we indent token2 in the next pass but we set + // sameLineIndent flag to notify the indenter that the indentation is within the line. + if (rule.Operation.Action == RuleAction.NewLine && token1Line == token2Line) { + this.forceIndentNextToken(t2.start()); + } + } + + // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line + if (token1Line != token2Line && (!rule || (rule.Operation.Action != RuleAction.Delete && rule.Flag != RuleFlags.CanDeleteNewLines))) { + this.trimWhitespaceInLineRange(token1Line, token2Line, t1); + } + } + + private getLineNumber(span: TextSpan): number { + return this.snapshot().getLineNumberFromPosition(span.start()); + } + + private trimWhitespaceInLineRange(startLine: number, endLine: number, token?: TokenSpan): void { + for (var lineNumber = startLine; lineNumber < endLine; ++lineNumber) { + var line = this.snapshot().getLineFromLineNumber(lineNumber); + + this.trimWhitespace(line, token); + } + } + + private trimWhitespace(line: ITextSnapshotLine, token?: TokenSpan): void { + // Don't remove the trailing spaces inside comments (this includes line comments and block comments) + if (token && (token.kind == SyntaxKind.MultiLineCommentTrivia || token.kind == SyntaxKind.SingleLineCommentTrivia) && token.start() <= line.endPosition() && token.end() >= line.endPosition()) + return; + + var text = line.getText(); + var index = 0; + + for (index = text.length - 1; index >= 0; --index) { + if (!CharacterInfo.isWhitespace(text.charCodeAt(index))) { + break; + } + } + + ++index; + + if (index < text.length) { + this.recordEdit(line.startPosition() + index, line.length() - index, ""); + } + } + + private RecordRuleEdits(rule: Rule, t1: TokenSpan, t2: TokenSpan): void { + if (rule.Operation.Action == RuleAction.Ignore) { + return; + } + + var betweenSpan: TextSpan; + + switch (rule.Operation.Action) { + case RuleAction.Delete: + { + betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); + + if (betweenSpan.length() > 0) { + this.recordEdit(betweenSpan.start(), betweenSpan.length(), ""); + return; + } + } + break; + + case RuleAction.NewLine: + { + if (!(rule.Flag == RuleFlags.CanDeleteNewLines || this.getLineNumber(t1) == this.getLineNumber(t2))) { + return; + } + + betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); + + var doEdit = false; + var betweenText = this.snapshot().getText(betweenSpan); + + var lineFeedLoc = betweenText.indexOf(this.options.newLineCharacter); + if (lineFeedLoc < 0) { + // no linefeeds, do the edit + doEdit = true; + } + else { + // We only require one line feed. If there is another one, do the edit + lineFeedLoc = betweenText.indexOf(this.options.newLineCharacter, lineFeedLoc + 1); + if (lineFeedLoc >= 0) { + doEdit = true; + } + } + + if (doEdit) { + this.recordEdit(betweenSpan.start(), betweenSpan.length(), this.options.newLineCharacter); + return; + } + } + break; + + case RuleAction.Space: + { + if (!(rule.Flag == RuleFlags.CanDeleteNewLines || this.getLineNumber(t1) == this.getLineNumber(t2))) { + return; + } + + betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); + + if (betweenSpan.length() > 1 || this.snapshot().getText(betweenSpan) != " ") { + this.recordEdit(betweenSpan.start(), betweenSpan.length(), " "); + return; + } + } + break; + } + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/formatting.ts b/src/services/formatting/new/formatting.ts new file mode 100644 index 00000000000..a2a15c374e4 --- /dev/null +++ b/src/services/formatting/new/formatting.ts @@ -0,0 +1,39 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// +/// +/// +/// +/// +// /// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +// /// +// /// +// /// \ No newline at end of file diff --git a/src/services/formatting/new/formattingContext.ts b/src/services/formatting/new/formattingContext.ts new file mode 100644 index 00000000000..ffac516690b --- /dev/null +++ b/src/services/formatting/new/formattingContext.ts @@ -0,0 +1,130 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export class FormattingContext { + public currentTokenSpan: TextRangeWithKind = null; + public nextTokenSpan: TextRangeWithKind = null; + public contextNode: Node = null; + public currentTokenParent: Node = null; + public nextTokenParent: Node = null; + + private contextNodeAllOnSameLine: boolean = null; + private nextNodeAllOnSameLine: boolean = null; + private tokensAreOnSameLine: boolean = null; + private contextNodeBlockIsOnOneLine: boolean = null; + private nextNodeBlockIsOnOneLine: boolean = null; + + constructor(private sourceFile: SourceFile, public formattingRequestKind: FormattingRequestKind) { + } + + public updateContext(currentRange: TextRangeWithKind, currentTokenParent: Node, nextRange: TextRangeWithKind, nextTokenParent: Node, commonParent: Node) { + Debug.assert(currentRange != null, "currentTokenSpan is null"); + Debug.assert(currentTokenParent != null, "currentTokenParent is null"); + Debug.assert(nextRange != null, "nextTokenSpan is null"); + Debug.assert(nextTokenParent != null, "nextTokenParent is null"); + Debug.assert(commonParent != null, "commonParent is null"); + + this.currentTokenSpan = currentRange; + this.currentTokenParent = currentTokenParent; + this.nextTokenSpan = nextRange; + this.nextTokenParent = nextTokenParent; + this.contextNode = commonParent; + + this.contextNodeAllOnSameLine = null; + this.nextNodeAllOnSameLine = null; + this.tokensAreOnSameLine = null; + this.contextNodeBlockIsOnOneLine = null; + this.nextNodeBlockIsOnOneLine = null; + } + + public ContextNodeAllOnSameLine(): boolean { + if (this.contextNodeAllOnSameLine === null) { + this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode); + } + + return this.contextNodeAllOnSameLine; + } + + public NextNodeAllOnSameLine(): boolean { + if (this.nextNodeAllOnSameLine === null) { + this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent); + } + + return this.nextNodeAllOnSameLine; + } + + public TokensAreOnSameLine(): boolean { + if (this.tokensAreOnSameLine === null) { + + //var startLine = this.snapshot.getLineNumberFromPosition(this.currentTokenSpan.token.pos); + //var endLine = this.snapshot.getLineNumberFromPosition(this.nextTokenSpan.token.pos); + + var startLine = this.sourceFile.getLineAndCharacterFromPosition(this.currentTokenSpan.pos).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(this.nextTokenSpan.pos).line; + this.tokensAreOnSameLine = (startLine == endLine); + } + + return this.tokensAreOnSameLine; + } + + public ContextNodeBlockIsOnOneLine() { + if (this.contextNodeBlockIsOnOneLine === null) { + this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode); + } + + return this.contextNodeBlockIsOnOneLine; + } + + public NextNodeBlockIsOnOneLine() { + if (this.nextNodeBlockIsOnOneLine === null) { + this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent); + } + + return this.nextNodeBlockIsOnOneLine; + } + + public NodeIsOnOneLine(node: Node): boolean { + return; + + var startLine = this.sourceFile.getLineAndCharacterFromPosition(node.getStart(this.sourceFile)).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(node.getEnd()).line; + //var startLine = this.snapshot.getLineNumberFromPosition(node.start()); + //var endLine = this.snapshot.getLineNumberFromPosition(node.end()); + + return startLine == endLine; + } + + // Now we know we have a block (or a fake block represented by some other kind of node with an open and close brace as children). + // IMPORTANT!!! This relies on the invariant that IsBlockContext must return true ONLY for nodes with open and close braces as immediate children + public BlockIsOnOneLine(node: Node): boolean { + var openBrace = findChildOfKind(node, SyntaxKind.OpenBraceToken, this.sourceFile); + var closeBrace = findChildOfKind(node, SyntaxKind.CloseBraceToken, this.sourceFile); + if (openBrace && closeBrace) { + var startLine = this.sourceFile.getLineAndCharacterFromPosition(openBrace.getEnd()).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(closeBrace.getStart(this.sourceFile)).line; + return startLine === endLine; + } + + //var block = node.node(); + + //// Now check if they are on the same line + //return this.snapshot.getLineNumberFromPosition(end(block.openBraceToken)) === + // this.snapshot.getLineNumberFromPosition(start(block.closeBraceToken)); + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/formattingManager.ts b/src/services/formatting/new/formattingManager.ts new file mode 100644 index 00000000000..359f19c84ed --- /dev/null +++ b/src/services/formatting/new/formattingManager.ts @@ -0,0 +1,123 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module TypeScript.Services.Formatting { + export class FormattingManager { + private options: FormattingOptions; + + constructor(private syntaxTree: SyntaxTree, + private snapshot: ITextSnapshot, + private rulesProvider: RulesProvider, + editorOptions: ts.EditorOptions) { + // + // TODO: convert to use FormattingOptions instead of EditorOptions + this.options = new FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter) + } + + public formatSelection(minChar: number, limChar: number): ts.TextChange[] { + var span = TextSpan.fromBounds(minChar, limChar); + return this.formatSpan(span, FormattingRequestKind.FormatSelection); + } + + public formatDocument(): ts.TextChange[] { + var span = TextSpan.fromBounds(0, this.snapshot.getLength()); + return this.formatSpan(span, FormattingRequestKind.FormatDocument); + } + + public formatOnSemicolon(caretPosition: number): ts.TextChange[] { + var sourceUnit = this.syntaxTree.sourceUnit(); + var semicolonPositionedToken = findToken(sourceUnit, caretPosition - 1); + + if (semicolonPositionedToken.kind() === SyntaxKind.SemicolonToken) { + // Find the outer most parent that this semicolon terminates + var current: ISyntaxElement = semicolonPositionedToken; + while (current.parent !== null && + end(current.parent) === end(semicolonPositionedToken) && + current.parent.kind() !== SyntaxKind.List) { + current = current.parent; + } + + // Compute the span + var span = new TextSpan(fullStart(current), fullWidth(current)); + + // Format the span + return this.formatSpan(span, FormattingRequestKind.FormatOnSemicolon); + } + + return []; + } + + public formatOnClosingCurlyBrace(caretPosition: number): ts.TextChange[] { + var sourceUnit = this.syntaxTree.sourceUnit(); + var closeBracePositionedToken = findToken(sourceUnit, caretPosition - 1); + + if (closeBracePositionedToken.kind() === SyntaxKind.CloseBraceToken) { + // Find the outer most parent that this closing brace terminates + var current: ISyntaxElement = closeBracePositionedToken; + while (current.parent !== null && + end(current.parent) === end(closeBracePositionedToken) && + current.parent.kind() !== SyntaxKind.List) { + current = current.parent; + } + + // Compute the span + var span = new TextSpan(fullStart(current), fullWidth(current)); + + // Format the span + return this.formatSpan(span, FormattingRequestKind.FormatOnClosingCurlyBrace); + } + + return []; + } + + public formatOnEnter(caretPosition: number): ts.TextChange[] { + var lineNumber = this.snapshot.getLineNumberFromPosition(caretPosition); + + if (lineNumber > 0) { + // Format both lines + var prevLine = this.snapshot.getLineFromLineNumber(lineNumber - 1); + var currentLine = this.snapshot.getLineFromLineNumber(lineNumber); + var span = TextSpan.fromBounds(prevLine.startPosition(), currentLine.endPosition()); + + // Format the span + return this.formatSpan(span, FormattingRequestKind.FormatOnEnter); + + } + + return []; + } + + private formatSpan(span: TextSpan, formattingRequestKind: FormattingRequestKind): ts.TextChange[] { + // Always format from the beginning of the line + var startLine = this.snapshot.getLineFromPosition(span.start()); + span = TextSpan.fromBounds(startLine.startPosition(), span.end()); + + var result: ts.TextChange[] = []; + + var formattingEdits = Formatter.getEdits(span, this.syntaxTree.sourceUnit(), this.options, true, this.snapshot, this.rulesProvider, formattingRequestKind); + + // + // TODO: Change the ILanguageService interface to return TextEditInfo (with start, and length) instead of TextEdit (with minChar and limChar) + formattingEdits.forEach((item) => { + var edit = new ts.TextChange(new TextSpan(item.position, item.length), item.replaceWith); + result.push(edit); + }); + + return result; + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/formattingRequestKind.ts b/src/services/formatting/new/formattingRequestKind.ts new file mode 100644 index 00000000000..1e7df200554 --- /dev/null +++ b/src/services/formatting/new/formattingRequestKind.ts @@ -0,0 +1,26 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export enum FormattingRequestKind { + FormatDocument, + FormatSelection, + FormatOnEnter, + FormatOnSemicolon, + FormatOnClosingCurlyBrace + } +} \ No newline at end of file diff --git a/src/services/formatting/new/indentationNodeContext.ts b/src/services/formatting/new/indentationNodeContext.ts new file mode 100644 index 00000000000..838031227be --- /dev/null +++ b/src/services/formatting/new/indentationNodeContext.ts @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export class IndentationNodeContext { + private _node: Node; + private _parent: IndentationNodeContext; + private _fullStart: number; + private _indentationAmount: number; + private _childIndentationAmountDelta: number; + private _depth: number; + private _hasSkippedOrMissingTokenChild: boolean; + + constructor(parent: IndentationNodeContext, node: Node, fullStart: number, indentationAmount: number, childIndentationAmountDelta: number) { + this.update(parent, node, fullStart, indentationAmount, childIndentationAmountDelta); + } + + public parent(): IndentationNodeContext { + return this._parent; + } + + public node(): Node { + return this._node; + } + + public fullStart(): number { + return this._fullStart; + } + + public fullWidth(): number { + return this._node.getFullWidth(); + } + + public start(): number { + return this._node.getStart(); + } + + public end(): number { + return this._node.getEnd(); + } + + public indentationAmount(): number { + return this._indentationAmount; + } + + public childIndentationAmountDelta(): number { + return this._childIndentationAmountDelta; + } + + public depth(): number { + return this._depth; + } + + public kind(): SyntaxKind { + return this._node.kind; + } + + public hasSkippedOrMissingTokenChild(): boolean { + if (this._hasSkippedOrMissingTokenChild === null) { + // this._hasSkippedOrMissingTokenChild = Syntax.nodeHasSkippedOrMissingTokens(this._node); + } + return this._hasSkippedOrMissingTokenChild; + } + + public clone(pool: IndentationNodeContextPool): IndentationNodeContext { + var parent: IndentationNodeContext = null; + if (this._parent) { + parent = this._parent.clone(pool); + } + return pool.getNode(parent, this._node, this._fullStart, this._indentationAmount, this._childIndentationAmountDelta); + } + + public update(parent: IndentationNodeContext, node: Node, fullStart: number, indentationAmount: number, childIndentationAmountDelta: number) { + this._parent = parent; + this._node = node; + this._fullStart = fullStart; + this._indentationAmount = indentationAmount; + this._childIndentationAmountDelta = childIndentationAmountDelta; + this._hasSkippedOrMissingTokenChild = null; + + if (parent) { + this._depth = parent.depth() + 1; + } + else { + this._depth = 0; + } + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/indentationNodeContextPool.ts b/src/services/formatting/new/indentationNodeContextPool.ts new file mode 100644 index 00000000000..b4bf2f09980 --- /dev/null +++ b/src/services/formatting/new/indentationNodeContextPool.ts @@ -0,0 +1,43 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export class IndentationNodeContextPool { + private nodes: IndentationNodeContext[] = []; + + public getNode(parent: IndentationNodeContext, node: Node, fullStart: number, indentationLevel: number, childIndentationLevelDelta: number): IndentationNodeContext { + if (this.nodes.length > 0) { + var cachedNode = this.nodes.pop(); + cachedNode.update(parent, node, fullStart, indentationLevel, childIndentationLevelDelta); + return cachedNode; + } + + return new IndentationNodeContext(parent, node, fullStart, indentationLevel, childIndentationLevelDelta); + } + + public releaseNode(node: IndentationNodeContext, recursive: boolean = false): void { + this.nodes.push(node); + + if (recursive) { + var parent = node.parent(); + if (parent) { + this.releaseNode(parent, recursive); + } + } + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/indentationTrackingWalker.ts b/src/services/formatting/new/indentationTrackingWalker.ts new file mode 100644 index 00000000000..b07b477623e --- /dev/null +++ b/src/services/formatting/new/indentationTrackingWalker.ts @@ -0,0 +1,349 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module TypeScript.Services.Formatting { + export class IndentationTrackingWalker extends SyntaxWalker { + private _position: number = 0; + private _parent: IndentationNodeContext = null; + private _textSpan: TextSpan; + private _snapshot: ITextSnapshot; + private _lastTriviaWasNewLine: boolean; + private _indentationNodeContextPool: IndentationNodeContextPool; + private _text: ISimpleText; + + constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, public options: FormattingOptions) { + super(); + + // Create a pool object to manage context nodes while walking the tree + this._indentationNodeContextPool = new IndentationNodeContextPool(); + + this._textSpan = textSpan; + this._text = sourceUnit.syntaxTree.text; + this._snapshot = snapshot; + this._parent = this._indentationNodeContextPool.getNode(null, sourceUnit, 0, 0, 0); + + // Is the first token in the span at the start of a new line. + this._lastTriviaWasNewLine = indentFirstToken; + } + + public position(): number { + return this._position; + } + + public parent(): IndentationNodeContext { + return this._parent; + } + + public textSpan(): TextSpan { + return this._textSpan; + } + + public snapshot(): ITextSnapshot { + return this._snapshot; + } + + public indentationNodeContextPool(): IndentationNodeContextPool { + return this._indentationNodeContextPool; + } + + public forceIndentNextToken(tokenStart: number): void { + this._lastTriviaWasNewLine = true; + this.forceRecomputeIndentationOfParent(tokenStart, true); + } + + public forceSkipIndentingNextToken(tokenStart: number): void { + this._lastTriviaWasNewLine = false; + this.forceRecomputeIndentationOfParent(tokenStart, false); + } + + public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void { + throw Errors.abstract(); + } + + public visitTokenInSpan(token: ISyntaxToken): void { + if (this._lastTriviaWasNewLine) { + // Compute the indentation level at the current token + var indentationAmount = this.getTokenIndentationAmount(token); + var commentIndentationAmount = this.getCommentIndentationAmount(token); + + // Process the token + this.indentToken(token, indentationAmount, commentIndentationAmount); + } + } + + public visitToken(token: ISyntaxToken): void { + var tokenSpan = new TextSpan(this._position, token.fullWidth()); + + if (tokenSpan.intersectsWithTextSpan(this._textSpan)) { + this.visitTokenInSpan(token); + + // Only track new lines on tokens within the range. Make sure to check that the last trivia is a newline, and not just one of the trivia + var trivia = token.trailingTrivia(); + this._lastTriviaWasNewLine = trivia.hasNewLine() && trivia.syntaxTriviaAt(trivia.count() - 1).kind() == SyntaxKind.NewLineTrivia; + } + + // Update the position + this._position += token.fullWidth(); + } + + public visitNode(node: ISyntaxNode): void { + var nodeSpan = new TextSpan(this._position, fullWidth(node)); + + if (nodeSpan.intersectsWithTextSpan(this._textSpan)) { + // Update indentation level + var indentation = this.getNodeIndentation(node); + + // Update the parent + var currentParent = this._parent; + this._parent = this._indentationNodeContextPool.getNode(currentParent, node, this._position, indentation.indentationAmount, indentation.indentationAmountDelta); + + // Visit node + visitNodeOrToken(this, node); + + // Reset state + this._indentationNodeContextPool.releaseNode(this._parent); + this._parent = currentParent; + } + else { + // We're skipping the node, so update our position accordingly. + this._position += fullWidth(node); + } + } + + private getTokenIndentationAmount(token: ISyntaxToken): number { + // If this is the first token of a node, it should follow the node indentation and not the child indentation; + // (e.g.class in a class declaration or module in module declariotion). + // Open and close braces should follow the indentation of thier parent as well(e.g. + // class { + // } + // Also in a do-while statement, the while should be indented like the parent. + if (firstToken(this._parent.node()) === token || + token.kind() === SyntaxKind.OpenBraceToken || token.kind() === SyntaxKind.CloseBraceToken || + token.kind() === SyntaxKind.OpenBracketToken || token.kind() === SyntaxKind.CloseBracketToken || + (token.kind() === SyntaxKind.WhileKeyword && this._parent.node().kind() == SyntaxKind.DoStatement)) { + return this._parent.indentationAmount(); + } + + return (this._parent.indentationAmount() + this._parent.childIndentationAmountDelta()); + } + + private getCommentIndentationAmount(token: ISyntaxToken): number { + // If this is token terminating an indentation scope, leading comments should be indented to follow the children + // indentation level and not the node + + if (token.kind() === SyntaxKind.CloseBraceToken || token.kind() === SyntaxKind.CloseBracketToken) { + return (this._parent.indentationAmount() + this._parent.childIndentationAmountDelta()); + } + return this._parent.indentationAmount(); + } + + private getNodeIndentation(node: ISyntaxNode, newLineInsertedByFormatting?: boolean): { indentationAmount: number; indentationAmountDelta: number; } { + var parent = this._parent; + + // We need to get the parent's indentation, which could be one of 2 things. If first token of the parent is in the span, use the parent's computed indentation. + // If the parent was outside the span, use the actual indentation of the parent. + var parentIndentationAmount: number; + if (this._textSpan.containsPosition(parent.start())) { + parentIndentationAmount = parent.indentationAmount(); + } + else { + if (parent.kind() === SyntaxKind.Block && !this.shouldIndentBlockInParent(this._parent.parent())) { + // Blocks preserve the indentation of their containing node (unless they're a + // standalone block in a list). i.e. if you have: + // + // function foo( + // a: number) { + // + // Then we expect the indentation of the block to be tied to the function, not to + // the line that the block is defined on. If we were to do the latter, then the + // indentation would be here: + // + // function foo( + // a: number) { + // | + // + // Instead of: + // + // function foo( + // a: number) { + // | + parent = this._parent.parent(); + } + + var line = this._snapshot.getLineFromPosition(parent.start()).getText(); + var firstNonWhiteSpacePosition = Indentation.firstNonWhitespacePosition(line); + parentIndentationAmount = Indentation.columnForPositionInString(line, firstNonWhiteSpacePosition, this.options); + } + var parentIndentationAmountDelta = parent.childIndentationAmountDelta(); + + // The indentation level of the node + var indentationAmount: number; + + // The delta it adds to its children. + var indentationAmountDelta: number; + var parentNode = parent.node(); + + switch (node.kind()) { + default: + // General case + // This node should follow the child indentation set by its parent + // This node does not introduce any new indentation scope, indent any decendants of this node (tokens or child nodes) + // using the same indentation level + indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); + indentationAmountDelta = 0; + break; + + // Statements introducing {} + case SyntaxKind.ClassDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.ObjectType: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.SwitchStatement: + case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.ConstructorDeclaration: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.MemberFunctionDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.IndexMemberDeclaration: + case SyntaxKind.CatchClause: + // Statements introducing [] + case SyntaxKind.ArrayLiteralExpression: + case SyntaxKind.ArrayType: + case SyntaxKind.ElementAccessExpression: + case SyntaxKind.IndexSignature: + // Other statements + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.WithStatement: + case SyntaxKind.CaseSwitchClause: + case SyntaxKind.DefaultSwitchClause: + case SyntaxKind.ReturnStatement: + case SyntaxKind.ThrowStatement: + case SyntaxKind.SimpleArrowFunctionExpression: + case SyntaxKind.ParenthesizedArrowFunctionExpression: + case SyntaxKind.VariableDeclaration: + case SyntaxKind.ExportAssignment: + + // Expressions which have argument lists or parameter lists + case SyntaxKind.InvocationExpression: + case SyntaxKind.ObjectCreationExpression: + case SyntaxKind.CallSignature: + case SyntaxKind.ConstructSignature: + + // These nodes should follow the child indentation set by its parent; + // they introduce a new indenation scope; children should be indented at one level deeper + indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); + indentationAmountDelta = this.options.indentSpaces; + break; + + case SyntaxKind.IfStatement: + if (parent.kind() === SyntaxKind.ElseClause && + !SyntaxUtilities.isLastTokenOnLine((parentNode).elseKeyword, this._text)) { + // This is an else if statement with the if on the same line as the else, do not indent the if statmement. + // Note: Children indentation has already been set by the parent if statement, so no need to increment + indentationAmount = parentIndentationAmount; + } + else { + // Otherwise introduce a new indenation scope; children should be indented at one level deeper + indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); + } + indentationAmountDelta = this.options.indentSpaces; + break; + + case SyntaxKind.ElseClause: + // Else should always follow its parent if statement indentation. + // Note: Children indentation has already been set by the parent if statement, so no need to increment + indentationAmount = parentIndentationAmount; + indentationAmountDelta = this.options.indentSpaces; + break; + + + case SyntaxKind.Block: + // Check if the block is a member in a list of statements (if the parent is a source unit, module, or block, or switch clause) + if (this.shouldIndentBlockInParent(parent)) { + indentationAmount = parentIndentationAmount + parentIndentationAmountDelta; + } + else { + indentationAmount = parentIndentationAmount; + } + + indentationAmountDelta = this.options.indentSpaces; + break; + } + + // If the parent happens to start on the same line as this node, then override the current node indenation with that + // of the parent. This avoid having to add an extra level of indentation for the children. e.g.: + // return { + // a:1 + // }; + // instead of: + // return { + // a:1 + // }; + // We also need to pass the delta (if it is nonzero) to the children, so that subsequent lines get indented. Essentially, if any node starting on the given line + // has a nonzero delta , the resulting delta should be inherited from this node. This is to indent cases like the following: + // return a + // || b; + // Lastly, it is possible the node indentation needs to be recomputed because the formatter inserted a newline before its first token. + // If this is the case, we know the node no longer starts on the same line as its parent (or at least we shouldn't treat it as such). + if (parentNode) { + if (!newLineInsertedByFormatting /*This could be false or undefined here*/) { + var parentStartLine = this._snapshot.getLineNumberFromPosition(parent.start()); + var currentNodeStartLine = this._snapshot.getLineNumberFromPosition(this._position + leadingTriviaWidth(node)); + if (parentStartLine === currentNodeStartLine || newLineInsertedByFormatting === false /*meaning a new line was removed and we are force recomputing*/) { + indentationAmount = parentIndentationAmount; + indentationAmountDelta = Math.min(this.options.indentSpaces, parentIndentationAmountDelta + indentationAmountDelta); + } + } + } + + return { + indentationAmount: indentationAmount, + indentationAmountDelta: indentationAmountDelta + }; + } + + private shouldIndentBlockInParent(parent: IndentationNodeContext): boolean { + switch (parent.kind()) { + case SyntaxKind.SourceUnit: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.Block: + case SyntaxKind.CaseSwitchClause: + case SyntaxKind.DefaultSwitchClause: + return true; + + default: + return false; + } + } + + private forceRecomputeIndentationOfParent(tokenStart: number, newLineAdded: boolean /*as opposed to removed*/): void { + var parent = this._parent; + if (parent.fullStart() === tokenStart) { + // Temporarily pop the parent before recomputing + this._parent = parent.parent(); + var indentation = this.getNodeIndentation(parent.node(), /* newLineInsertedByFormatting */ newLineAdded); + parent.update(parent.parent(), parent.node(), parent.fullStart(), indentation.indentationAmount, indentation.indentationAmountDelta); + this._parent = parent; + } + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/multipleTokenIndenter.ts b/src/services/formatting/new/multipleTokenIndenter.ts new file mode 100644 index 00000000000..23181571427 --- /dev/null +++ b/src/services/formatting/new/multipleTokenIndenter.ts @@ -0,0 +1,206 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module TypeScript.Services.Formatting { + export class MultipleTokenIndenter extends IndentationTrackingWalker { + private _edits: TextEditInfo[] = []; + + constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, options: FormattingOptions) { + super(textSpan, sourceUnit, snapshot, indentFirstToken, options); + } + + public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void { + // Ignore generated tokens + if (token.fullWidth() === 0) { + return; + } + + // If we have any skipped tokens as children, do not process this node for indentation or formatting + if (this.parent().hasSkippedOrMissingTokenChild()) { + return; + } + + // Be strict, and only consider nodes that fall inside the span. This avoids indenting a multiline string + // on enter at the end of, as the whole token was not included in the span + var tokenSpan = new TextSpan(this.position() + token.leadingTriviaWidth(), width(token)); + if (!this.textSpan().containsTextSpan(tokenSpan)) { + return; + } + + // Compute an indentation string for this token + var indentationString = Indentation.indentationString(indentationAmount, this.options); + + var commentIndentationString = Indentation.indentationString(commentIndentationAmount, this.options); + + // Record any needed indentation edits + this.recordIndentationEditsForToken(token, indentationString, commentIndentationString); + } + + public edits(): TextEditInfo[]{ + return this._edits; + } + + public recordEdit(position: number, length: number, replaceWith: string): void { + this._edits.push(new TextEditInfo(position, length, replaceWith)); + } + + private recordIndentationEditsForToken(token: ISyntaxToken, indentationString: string, commentIndentationString: string) { + var position = this.position(); + var indentNextTokenOrTrivia = true; + var leadingWhiteSpace = ""; // We need to track the whitespace before a multiline comment + + // Process any leading trivia if any + var triviaList = token.leadingTrivia(); + if (triviaList) { + for (var i = 0, length = triviaList.count(); i < length; i++, position += trivia.fullWidth()) { + var trivia = triviaList.syntaxTriviaAt(i); + // Skip this trivia if it is not in the span + if (!this.textSpan().containsTextSpan(new TextSpan(position, trivia.fullWidth()))) { + continue; + } + + switch (trivia.kind()) { + case SyntaxKind.MultiLineCommentTrivia: + // We will only indent the first line of the multiline comment if we were planning to indent the next trivia. However, + // subsequent lines will always be indented + this.recordIndentationEditsForMultiLineComment(trivia, position, commentIndentationString, leadingWhiteSpace, !indentNextTokenOrTrivia /* already indented first line */); + indentNextTokenOrTrivia = false; + leadingWhiteSpace = ""; + break; + + case SyntaxKind.SingleLineCommentTrivia: + case SyntaxKind.SkippedTokenTrivia: + if (indentNextTokenOrTrivia) { + this.recordIndentationEditsForSingleLineOrSkippedText(trivia, position, commentIndentationString); + indentNextTokenOrTrivia = false; + } + break; + + case SyntaxKind.WhitespaceTrivia: + // If the next trivia is a comment, use the comment indentation level instead of the regular indentation level + // If the next trivia is a newline, this whole line is just whitespace, so don't do anything (trimming will take care of it) + var nextTrivia = length > i + 1 && triviaList.syntaxTriviaAt(i + 1); + var whiteSpaceIndentationString = nextTrivia && nextTrivia.isComment() ? commentIndentationString : indentationString; + if (indentNextTokenOrTrivia) { + if (!(nextTrivia && nextTrivia.isNewLine())) { + this.recordIndentationEditsForWhitespace(trivia, position, whiteSpaceIndentationString); + } + indentNextTokenOrTrivia = false; + } + leadingWhiteSpace += trivia.fullText(); + break; + + case SyntaxKind.NewLineTrivia: + // We hit a newline processing the trivia. We need to add the indentation to the + // next line as well. Note: don't bother indenting the newline itself. This will + // just insert ugly whitespace that most users probably will not want. + indentNextTokenOrTrivia = true; + leadingWhiteSpace = ""; + break; + + default: + throw Errors.invalidOperation(); + } + } + + } + + if (token.kind() !== SyntaxKind.EndOfFileToken && indentNextTokenOrTrivia) { + // If the last trivia item was a new line, or no trivia items were encounterd record the + // indentation edit at the token position + if (indentationString.length > 0) { + this.recordEdit(position, 0, indentationString); + } + } + } + + private recordIndentationEditsForSingleLineOrSkippedText(trivia: ISyntaxTrivia, fullStart: number, indentationString: string): void { + // Record the edit + if (indentationString.length > 0) { + this.recordEdit(fullStart, 0, indentationString); + } + } + + private recordIndentationEditsForWhitespace(trivia: ISyntaxTrivia, fullStart: number, indentationString: string): void { + var text = trivia.fullText(); + + // Check if the current indentation matches the desired indentation or not + if (indentationString === text) { + return; + } + + // Record the edit + this.recordEdit(fullStart, text.length, indentationString); + } + + private recordIndentationEditsForMultiLineComment(trivia: ISyntaxTrivia, fullStart: number, indentationString: string, leadingWhiteSpace: string, firstLineAlreadyIndented: boolean): void { + // If the multiline comment spans multiple lines, we need to add the right indent amount to + // each successive line segment as well. + var position = fullStart; + var segments = Syntax.splitMultiLineCommentTriviaIntoMultipleLines(trivia); + + if (segments.length <= 1) { + if (!firstLineAlreadyIndented) { + // Process the one-line multiline comment just like a single line comment + this.recordIndentationEditsForSingleLineOrSkippedText(trivia, fullStart, indentationString); + } + return; + } + + // Find number of columns in first segment + var whiteSpaceColumnsInFirstSegment = Indentation.columnForPositionInString(leadingWhiteSpace, leadingWhiteSpace.length, this.options); + + var indentationColumns = Indentation.columnForPositionInString(indentationString, indentationString.length, this.options); + var startIndex = 0; + if (firstLineAlreadyIndented) { + startIndex = 1; + position += segments[0].length; + } + for (var i = startIndex; i < segments.length; i++) { + var segment = segments[i]; + this.recordIndentationEditsForSegment(segment, position, indentationColumns, whiteSpaceColumnsInFirstSegment); + position += segment.length; + } + } + + private recordIndentationEditsForSegment(segment: string, fullStart: number, indentationColumns: number, whiteSpaceColumnsInFirstSegment: number): void { + // Indent subsequent lines using a column delta of the actual indentation relative to the first line + var firstNonWhitespacePosition = Indentation.firstNonWhitespacePosition(segment); + var leadingWhiteSpaceColumns = Indentation.columnForPositionInString(segment, firstNonWhitespacePosition, this.options); + var deltaFromFirstSegment = leadingWhiteSpaceColumns - whiteSpaceColumnsInFirstSegment; + var finalColumns = indentationColumns + deltaFromFirstSegment; + if (finalColumns < 0) { + finalColumns = 0; + } + var indentationString = Indentation.indentationString(finalColumns, this.options); + + if (firstNonWhitespacePosition < segment.length && + CharacterInfo.isLineTerminator(segment.charCodeAt(firstNonWhitespacePosition))) { + // If this segment was just a newline, then don't bother indenting it. That will just + // leave the user with an ugly indent in their output that they probably do not want. + return; + } + + if (indentationString === segment.substring(0, firstNonWhitespacePosition)) { + return; + } + + // Record the edit + this.recordEdit(fullStart, firstNonWhitespacePosition, indentationString); + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/rule.ts b/src/services/formatting/new/rule.ts new file mode 100644 index 00000000000..f2550d40761 --- /dev/null +++ b/src/services/formatting/new/rule.ts @@ -0,0 +1,32 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export class Rule { + constructor( + public Descriptor: RuleDescriptor, + public Operation: RuleOperation, + public Flag: RuleFlags = RuleFlags.None) { + } + + public toString() { + return "[desc=" + this.Descriptor + "," + + "operation=" + this.Operation + "," + + "flag=" + this.Flag + "]"; + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/ruleAction.ts b/src/services/formatting/new/ruleAction.ts new file mode 100644 index 00000000000..aa80943ec3d --- /dev/null +++ b/src/services/formatting/new/ruleAction.ts @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export enum RuleAction { + Ignore = 0x00000001, + Space = 0x00000002, + NewLine = 0x00000004, + Delete = 0x00000008 + } +} \ No newline at end of file diff --git a/src/services/formatting/new/ruleDescriptor.ts b/src/services/formatting/new/ruleDescriptor.ts new file mode 100644 index 00000000000..e93f035b5be --- /dev/null +++ b/src/services/formatting/new/ruleDescriptor.ts @@ -0,0 +1,46 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export class RuleDescriptor { + constructor(public LeftTokenRange: Shared.TokenRange, public RightTokenRange: Shared.TokenRange) { + } + + public toString(): string { + return "[leftRange=" + this.LeftTokenRange + "," + + "rightRange=" + this.RightTokenRange + "]"; + } + + static create1(left: SyntaxKind, right: SyntaxKind): RuleDescriptor { + return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), Shared.TokenRange.FromToken(right)); + } + + static create2(left: Shared.TokenRange, right: SyntaxKind): RuleDescriptor { + return RuleDescriptor.create4(left, Shared.TokenRange.FromToken(right)); + } + + static create3(left: SyntaxKind, right: Shared.TokenRange): RuleDescriptor + //: this(TokenRange.FromToken(left), right) + { + return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), right); + } + + static create4(left: Shared.TokenRange, right: Shared.TokenRange): RuleDescriptor { + return new RuleDescriptor(left, right); + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/ruleFlag.ts b/src/services/formatting/new/ruleFlag.ts new file mode 100644 index 00000000000..3b61bc78754 --- /dev/null +++ b/src/services/formatting/new/ruleFlag.ts @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export enum RuleFlags { + None, + CanDeleteNewLines + } +} \ No newline at end of file diff --git a/src/services/formatting/new/ruleOperation.ts b/src/services/formatting/new/ruleOperation.ts new file mode 100644 index 00000000000..e0e75b6a711 --- /dev/null +++ b/src/services/formatting/new/ruleOperation.ts @@ -0,0 +1,44 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export class RuleOperation { + public Context: RuleOperationContext; + public Action: RuleAction; + + constructor() { + this.Context = null; + this.Action = null; + } + + public toString(): string { + return "[context=" + this.Context + "," + + "action=" + this.Action + "]"; + } + + static create1(action: RuleAction) { + return RuleOperation.create2(RuleOperationContext.Any, action) + } + + static create2(context: RuleOperationContext, action: RuleAction) { + var result = new RuleOperation(); + result.Context = context; + result.Action = action; + return result; + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/ruleOperationContext.ts b/src/services/formatting/new/ruleOperationContext.ts new file mode 100644 index 00000000000..2c2e8e8b5a4 --- /dev/null +++ b/src/services/formatting/new/ruleOperationContext.ts @@ -0,0 +1,47 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + + export class RuleOperationContext { + private customContextChecks: { (context: FormattingContext): boolean; }[]; + + constructor(...funcs: { (context: FormattingContext): boolean; }[]) { + this.customContextChecks = funcs; + } + + static Any: RuleOperationContext = new RuleOperationContext(); + + + public IsAny(): boolean { + return this == RuleOperationContext.Any; + } + + public InContext(context: FormattingContext): boolean { + if (this.IsAny()) { + return true; + } + + for (var i = 0, len = this.customContextChecks.length; i < len; i++) { + if (!this.customContextChecks[i](context)) { + return false; + } + } + return true; + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/rules.ts b/src/services/formatting/new/rules.ts new file mode 100644 index 00000000000..aef884331b7 --- /dev/null +++ b/src/services/formatting/new/rules.ts @@ -0,0 +1,687 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export class Rules { + public getRuleName(rule: Rule) { + var o: ts.Map = this; + for (var name in o) { + if (o[name] === rule) { + return name; + } + } + throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.Unknown_rule, null)); + } + + [name: string]: any; + + public IgnoreBeforeComment: Rule; + public IgnoreAfterLineComment: Rule; + + // Space after keyword but not before ; or : or ? + public NoSpaceBeforeSemicolon: Rule; + public NoSpaceBeforeColon: Rule; + public NoSpaceBeforeQMark: Rule; + public SpaceAfterColon: Rule; + public SpaceAfterQMark: Rule; + public SpaceAfterSemicolon: Rule; + + // Space/new line after }. + public SpaceAfterCloseBrace: Rule; + + // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied + // Also should not apply to }) + public SpaceBetweenCloseBraceAndElse: Rule; + public SpaceBetweenCloseBraceAndWhile: Rule; + public NoSpaceAfterCloseBrace: Rule; + + // No space for indexer and dot + public NoSpaceBeforeDot: Rule; + public NoSpaceAfterDot: Rule; + public NoSpaceBeforeOpenBracket: Rule; + public NoSpaceAfterOpenBracket: Rule; + public NoSpaceBeforeCloseBracket: Rule; + public NoSpaceAfterCloseBracket: Rule; + + // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. + public SpaceAfterOpenBrace: Rule; + public SpaceBeforeCloseBrace: Rule; + public NoSpaceBetweenEmptyBraceBrackets: Rule; + + // Insert new line after { and before } in multi-line contexts. + public NewLineAfterOpenBraceInBlockContext: Rule; + + // For functions and control block place } on a new line [multi-line rule] + public NewLineBeforeCloseBraceInBlockContext: Rule; + + // Special handling of unary operators. + // Prefix operators generally shouldn't have a space between + // them and their target unary expression. + public NoSpaceAfterUnaryPrefixOperator: Rule; + public NoSpaceAfterUnaryPreincrementOperator: Rule; + public NoSpaceAfterUnaryPredecrementOperator: Rule; + public NoSpaceBeforeUnaryPostincrementOperator: Rule; + public NoSpaceBeforeUnaryPostdecrementOperator: Rule; + + // More unary operator special-casing. + // DevDiv 181814: Be careful when removing leading whitespace + // around unary operators. Examples: + // 1 - -2 --X--> 1--2 + // a + ++b --X--> a+++b + public SpaceAfterPostincrementWhenFollowedByAdd: Rule; + public SpaceAfterAddWhenFollowedByUnaryPlus: Rule; + public SpaceAfterAddWhenFollowedByPreincrement: Rule; + public SpaceAfterPostdecrementWhenFollowedBySubtract: Rule; + public SpaceAfterSubtractWhenFollowedByUnaryMinus: Rule; + public SpaceAfterSubtractWhenFollowedByPredecrement: Rule; + + public NoSpaceBeforeComma: Rule; + + public SpaceAfterCertainKeywords: Rule; + public NoSpaceBeforeOpenParenInFuncCall: Rule; + public SpaceAfterFunctionInFuncDecl: Rule; + public NoSpaceBeforeOpenParenInFuncDecl: Rule; + public SpaceAfterVoidOperator: Rule; + + public NoSpaceBetweenReturnAndSemicolon: Rule; + + // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. + // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] + public SpaceBetweenStatements: Rule; + + // This low-pri rule takes care of "try {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. + public SpaceAfterTryFinally: Rule; + + // For get/set members, we check for (identifier,identifier) since get/set don't have tokens and they are represented as just an identifier token. + // Though, we do extra check on the context to make sure we are dealing with get/set node. Example: + // get x() {} + // set x(val) {} + public SpaceAfterGetSetInMember: Rule; + + // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. + public SpaceBeforeBinaryKeywordOperator: Rule; + public SpaceAfterBinaryKeywordOperator: Rule; + + // TypeScript-specific rules + + // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses + public NoSpaceAfterConstructor: Rule; + + // Use of module as a function call. e.g.: import m2 = module("m2"); + public NoSpaceAfterModuleImport: Rule; + + // Add a space around certain TypeScript keywords + public SpaceAfterCertainTypeScriptKeywords: Rule; + public SpaceBeforeCertainTypeScriptKeywords: Rule; + + // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { + public SpaceAfterModuleName: Rule; + + // Lambda expressions + public SpaceAfterArrow: Rule; + + // Optional parameters and var args + public NoSpaceAfterEllipsis: Rule; + public NoSpaceAfterOptionalParameters: Rule; + + // generics + public NoSpaceBeforeOpenAngularBracket: Rule; + public NoSpaceBetweenCloseParenAndAngularBracket: Rule; + public NoSpaceAfterOpenAngularBracket: Rule; + public NoSpaceBeforeCloseAngularBracket: Rule; + public NoSpaceAfterCloseAngularBracket: Rule; + + // Remove spaces in empty interface literals. e.g.: x: {} + public NoSpaceBetweenEmptyInterfaceBraceBrackets: Rule; + + // These rules are higher in priority than user-configurable rules. + public HighPriorityCommonRules: Rule[]; + + // These rules are lower in priority than user-configurable rules. + public LowPriorityCommonRules: Rule[]; + + /// + /// Rules controlled by user options + /// + + // Insert space after comma delimiter + public SpaceAfterComma: Rule; + public NoSpaceAfterComma: Rule; + + // Insert space before and after binary operators + public SpaceBeforeBinaryOperator: Rule; + public SpaceAfterBinaryOperator: Rule; + public NoSpaceBeforeBinaryOperator: Rule; + public NoSpaceAfterBinaryOperator: Rule; + + // Insert space after keywords in control flow statements + public SpaceAfterKeywordInControl: Rule; + public NoSpaceAfterKeywordInControl: Rule; + + // Open Brace braces after function + //TypeScript: Function can have return types, which can be made of tons of different token kinds + public FunctionOpenBraceLeftTokenRange: Shared.TokenRange; + public SpaceBeforeOpenBraceInFunction: Rule; + public NewLineBeforeOpenBraceInFunction: Rule; + + // Open Brace braces after TypeScript module/class/interface + public TypeScriptOpenBraceLeftTokenRange: Shared.TokenRange; + public SpaceBeforeOpenBraceInTypeScriptDeclWithBlock: Rule; + public NewLineBeforeOpenBraceInTypeScriptDeclWithBlock: Rule; + + // Open Brace braces after control block + public ControlOpenBraceLeftTokenRange: Shared.TokenRange; + public SpaceBeforeOpenBraceInControl: Rule; + public NewLineBeforeOpenBraceInControl: Rule; + + // Insert space after semicolon in for statement + public SpaceAfterSemicolonInFor: Rule; + public NoSpaceAfterSemicolonInFor: Rule; + + // Insert space after opening and before closing nonempty parenthesis + public SpaceAfterOpenParen: Rule; + public SpaceBeforeCloseParen: Rule; + public NoSpaceBetweenParens: Rule; + public NoSpaceAfterOpenParen: Rule; + public NoSpaceBeforeCloseParen: Rule; + + // Insert space after function keyword for anonymous functions + public SpaceAfterAnonymousFunctionKeyword: Rule; + public NoSpaceAfterAnonymousFunctionKeyword: Rule; + + constructor() { + /// + /// Common Rules + /// + + // Leave comments alone + this.IgnoreBeforeComment = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.Comments), RuleOperation.create1(RuleAction.Ignore)); + this.IgnoreAfterLineComment = new Rule(RuleDescriptor.create3(SyntaxKind.SingleLineCommentTrivia, Shared.TokenRange.Any), RuleOperation.create1(RuleAction.Ignore)); + + // Space after keyword but not before ; or : or ? + this.NoSpaceBeforeSemicolon = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.SemicolonToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceBeforeColon = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.ColonToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); + this.NoSpaceBeforeQMark = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.QuestionToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); + this.SpaceAfterColon = new Rule(RuleDescriptor.create3(SyntaxKind.ColonToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Space)); + this.SpaceAfterQMark = new Rule(RuleDescriptor.create3(SyntaxKind.QuestionToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Space)); + this.SpaceAfterSemicolon = new Rule(RuleDescriptor.create3(SyntaxKind.SemicolonToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + + // Space after }. + this.SpaceAfterCloseBrace = new Rule(RuleDescriptor.create3(SyntaxKind.CloseBraceToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsAfterCodeBlockContext), RuleAction.Space)); + + // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied + this.SpaceBetweenCloseBraceAndElse = new Rule(RuleDescriptor.create1(SyntaxKind.CloseBraceToken, SyntaxKind.ElseKeyword), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + this.SpaceBetweenCloseBraceAndWhile = new Rule(RuleDescriptor.create1(SyntaxKind.CloseBraceToken, SyntaxKind.WhileKeyword), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + this.NoSpaceAfterCloseBrace = new Rule(RuleDescriptor.create3(SyntaxKind.CloseBraceToken, Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.CommaToken, SyntaxKind.SemicolonToken])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + + // No space for indexer and dot + this.NoSpaceBeforeDot = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.DotToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceAfterDot = new Rule(RuleDescriptor.create3(SyntaxKind.DotToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceBeforeOpenBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.OpenBracketToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceAfterOpenBracket = new Rule(RuleDescriptor.create3(SyntaxKind.OpenBracketToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceBeforeCloseBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CloseBracketToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceAfterCloseBracket = new Rule(RuleDescriptor.create3(SyntaxKind.CloseBracketToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + + // Place a space before open brace in a function declaration + this.FunctionOpenBraceLeftTokenRange = Shared.TokenRange.AnyIncludingMultilineComments; + this.SpaceBeforeOpenBraceInFunction = new Rule(RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), RuleAction.Space), RuleFlags.CanDeleteNewLines); + + // Place a space before open brace in a TypeScript declaration that has braces as children (class, module, enum, etc) + this.TypeScriptOpenBraceLeftTokenRange = Shared.TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.MultiLineCommentTrivia]); + this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new Rule(RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), RuleAction.Space), RuleFlags.CanDeleteNewLines); + + // Place a space before open brace in a control flow construct + this.ControlOpenBraceLeftTokenRange = Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.MultiLineCommentTrivia, SyntaxKind.DoKeyword, SyntaxKind.TryKeyword, SyntaxKind.FinallyKeyword, SyntaxKind.ElseKeyword]); + this.SpaceBeforeOpenBraceInControl = new Rule(RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), RuleAction.Space), RuleFlags.CanDeleteNewLines); + + // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. + this.SpaceAfterOpenBrace = new Rule(RuleDescriptor.create3(SyntaxKind.OpenBraceToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSingleLineBlockContext), RuleAction.Space)); + this.SpaceBeforeCloseBrace = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CloseBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSingleLineBlockContext), RuleAction.Space)); + this.NoSpaceBetweenEmptyBraceBrackets = new Rule(RuleDescriptor.create1(SyntaxKind.OpenBraceToken, SyntaxKind.CloseBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectContext), RuleAction.Delete)); + + // Insert new line after { and before } in multi-line contexts. + this.NewLineAfterOpenBraceInBlockContext = new Rule(RuleDescriptor.create3(SyntaxKind.OpenBraceToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsMultilineBlockContext), RuleAction.NewLine)); + + // For functions and control block place } on a new line [multi-line rule] + this.NewLineBeforeCloseBraceInBlockContext = new Rule(RuleDescriptor.create2(Shared.TokenRange.AnyIncludingMultilineComments, SyntaxKind.CloseBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsMultilineBlockContext), RuleAction.NewLine)); + + // Special handling of unary operators. + // Prefix operators generally shouldn't have a space between + // them and their target unary expression. + this.NoSpaceAfterUnaryPrefixOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.UnaryPrefixOperators, Shared.TokenRange.UnaryPrefixExpressions), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); + this.NoSpaceAfterUnaryPreincrementOperator = new Rule(RuleDescriptor.create3(SyntaxKind.PlusPlusToken, Shared.TokenRange.UnaryPreincrementExpressions), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceAfterUnaryPredecrementOperator = new Rule(RuleDescriptor.create3(SyntaxKind.MinusMinusToken, Shared.TokenRange.UnaryPredecrementExpressions), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceBeforeUnaryPostincrementOperator = new Rule(RuleDescriptor.create2(Shared.TokenRange.UnaryPostincrementExpressions, SyntaxKind.PlusPlusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceBeforeUnaryPostdecrementOperator = new Rule(RuleDescriptor.create2(Shared.TokenRange.UnaryPostdecrementExpressions, SyntaxKind.MinusMinusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + + // More unary operator special-casing. + // DevDiv 181814: Be careful when removing leading whitespace + // around unary operators. Examples: + // 1 - -2 --X--> 1--2 + // a + ++b --X--> a+++b + this.SpaceAfterPostincrementWhenFollowedByAdd = new Rule(RuleDescriptor.create1(SyntaxKind.PlusPlusToken, SyntaxKind.PlusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); + this.SpaceAfterAddWhenFollowedByUnaryPlus = new Rule(RuleDescriptor.create1(SyntaxKind.PlusToken, SyntaxKind.PlusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); + this.SpaceAfterAddWhenFollowedByPreincrement = new Rule(RuleDescriptor.create1(SyntaxKind.PlusToken, SyntaxKind.PlusPlusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); + this.SpaceAfterPostdecrementWhenFollowedBySubtract = new Rule(RuleDescriptor.create1(SyntaxKind.MinusMinusToken, SyntaxKind.MinusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); + this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new Rule(RuleDescriptor.create1(SyntaxKind.MinusToken, SyntaxKind.MinusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); + this.SpaceAfterSubtractWhenFollowedByPredecrement = new Rule(RuleDescriptor.create1(SyntaxKind.MinusToken, SyntaxKind.MinusMinusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); + + this.NoSpaceBeforeComma = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CommaToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + + this.SpaceAfterCertainKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.VarKeyword, SyntaxKind.ThrowKeyword, SyntaxKind.NewKeyword, SyntaxKind.DeleteKeyword, SyntaxKind.ReturnKeyword, SyntaxKind.TypeOfKeyword]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + this.NoSpaceBeforeOpenParenInFuncCall = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionCallOrNewContext), RuleAction.Delete)); + this.SpaceAfterFunctionInFuncDecl = new Rule(RuleDescriptor.create3(SyntaxKind.FunctionKeyword, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space)); + this.NoSpaceBeforeOpenParenInFuncDecl = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionDeclContext), RuleAction.Delete)); + this.SpaceAfterVoidOperator = new Rule(RuleDescriptor.create3(SyntaxKind.VoidKeyword, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsVoidOpContext), RuleAction.Space)); + + this.NoSpaceBetweenReturnAndSemicolon = new Rule(RuleDescriptor.create1(SyntaxKind.ReturnKeyword, SyntaxKind.SemicolonToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + + // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. + // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] + this.SpaceBetweenStatements = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.DoKeyword, SyntaxKind.ElseKeyword, SyntaxKind.CaseKeyword]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotForContext), RuleAction.Space)); + + // This low-pri rule takes care of "try {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. + this.SpaceAfterTryFinally = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.TryKeyword, SyntaxKind.FinallyKeyword]), SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + + // get x() {} + // set x(val) {} + this.SpaceAfterGetSetInMember = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.GetKeyword, SyntaxKind.SetKeyword]), SyntaxKind.Identifier), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space)); + + // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. + this.SpaceBeforeBinaryKeywordOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.BinaryKeywordOperators), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); + this.SpaceAfterBinaryKeywordOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.BinaryKeywordOperators, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); + + // TypeScript-specific higher priority rules + + // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses + this.NoSpaceAfterConstructor = new Rule(RuleDescriptor.create1(SyntaxKind.ConstructorKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + + // Use of module as a function call. e.g.: import m2 = module("m2"); + this.NoSpaceAfterModuleImport = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.ModuleKeyword, SyntaxKind.RequireKeyword]), SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + + // Add a space around certain TypeScript keywords + this.SpaceAfterCertainTypeScriptKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.ClassKeyword, SyntaxKind.DeclareKeyword, SyntaxKind.EnumKeyword, SyntaxKind.ExportKeyword, SyntaxKind.ExtendsKeyword, SyntaxKind.GetKeyword, SyntaxKind.ImplementsKeyword, SyntaxKind.ImportKeyword, SyntaxKind.InterfaceKeyword, SyntaxKind.ModuleKeyword, SyntaxKind.PrivateKeyword, SyntaxKind.PublicKeyword, SyntaxKind.SetKeyword, SyntaxKind.StaticKeyword]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + this.SpaceBeforeCertainTypeScriptKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.FromTokens([SyntaxKind.ExtendsKeyword, SyntaxKind.ImplementsKeyword])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + + // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { + this.SpaceAfterModuleName = new Rule(RuleDescriptor.create1(SyntaxKind.StringLiteral, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsModuleDeclContext), RuleAction.Space)); + + // Lambda expressions + this.SpaceAfterArrow = new Rule(RuleDescriptor.create3(SyntaxKind.EqualsGreaterThanToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + + // Optional parameters and var args + this.NoSpaceAfterEllipsis = new Rule(RuleDescriptor.create1(SyntaxKind.DotDotDotToken, SyntaxKind.Identifier), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceAfterOptionalParameters = new Rule(RuleDescriptor.create3(SyntaxKind.QuestionToken, Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.CommaToken])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); + + // generics + this.NoSpaceBeforeOpenAngularBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.TypeNames, SyntaxKind.LessThanToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), RuleAction.Delete)); + this.NoSpaceBetweenCloseParenAndAngularBracket = new Rule(RuleDescriptor.create1(SyntaxKind.CloseParenToken, SyntaxKind.LessThanToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), RuleAction.Delete)); + this.NoSpaceAfterOpenAngularBracket = new Rule(RuleDescriptor.create3(SyntaxKind.LessThanToken, Shared.TokenRange.TypeNames), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), RuleAction.Delete)); + this.NoSpaceBeforeCloseAngularBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.GreaterThanToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), RuleAction.Delete)); + this.NoSpaceAfterCloseAngularBracket = new Rule(RuleDescriptor.create3(SyntaxKind.GreaterThanToken, Shared.TokenRange.FromTokens([SyntaxKind.OpenParenToken, SyntaxKind.OpenBracketToken, SyntaxKind.GreaterThanToken, SyntaxKind.CommaToken])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), RuleAction.Delete)); + + // Remove spaces in empty interface literals. e.g.: x: {} + this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new Rule(RuleDescriptor.create1(SyntaxKind.OpenBraceToken, SyntaxKind.CloseBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectTypeContext), RuleAction.Delete)); + + // These rules are higher in priority than user-configurable rules. + this.HighPriorityCommonRules = + [ + this.IgnoreBeforeComment, this.IgnoreAfterLineComment, + this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQMark, this.SpaceAfterQMark, + this.NoSpaceBeforeDot, this.NoSpaceAfterDot, + this.NoSpaceAfterUnaryPrefixOperator, + this.NoSpaceAfterUnaryPreincrementOperator, this.NoSpaceAfterUnaryPredecrementOperator, + this.NoSpaceBeforeUnaryPostincrementOperator, this.NoSpaceBeforeUnaryPostdecrementOperator, + this.SpaceAfterPostincrementWhenFollowedByAdd, + this.SpaceAfterAddWhenFollowedByUnaryPlus, this.SpaceAfterAddWhenFollowedByPreincrement, + this.SpaceAfterPostdecrementWhenFollowedBySubtract, + this.SpaceAfterSubtractWhenFollowedByUnaryMinus, this.SpaceAfterSubtractWhenFollowedByPredecrement, + this.NoSpaceAfterCloseBrace, + this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NewLineBeforeCloseBraceInBlockContext, + this.SpaceAfterCloseBrace, this.SpaceBetweenCloseBraceAndElse, this.SpaceBetweenCloseBraceAndWhile, this.NoSpaceBetweenEmptyBraceBrackets, + this.SpaceAfterFunctionInFuncDecl, this.NewLineAfterOpenBraceInBlockContext, this.SpaceAfterGetSetInMember, + this.NoSpaceBetweenReturnAndSemicolon, + this.SpaceAfterCertainKeywords, + this.NoSpaceBeforeOpenParenInFuncCall, + this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, + this.SpaceAfterVoidOperator, + + // TypeScript-specific rules + this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, + this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, + this.SpaceAfterModuleName, + this.SpaceAfterArrow, + this.NoSpaceAfterEllipsis, + this.NoSpaceAfterOptionalParameters, + this.NoSpaceBetweenEmptyInterfaceBraceBrackets, + this.NoSpaceBeforeOpenAngularBracket, + this.NoSpaceBetweenCloseParenAndAngularBracket, + this.NoSpaceAfterOpenAngularBracket, + this.NoSpaceBeforeCloseAngularBracket, + this.NoSpaceAfterCloseAngularBracket + ]; + + // These rules are lower in priority than user-configurable rules. + this.LowPriorityCommonRules = + [ + this.NoSpaceBeforeSemicolon, + this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, + this.NoSpaceBeforeComma, + this.NoSpaceBeforeOpenBracket, this.NoSpaceAfterOpenBracket, + this.NoSpaceBeforeCloseBracket, this.NoSpaceAfterCloseBracket, + this.SpaceAfterSemicolon, + this.NoSpaceBeforeOpenParenInFuncDecl, + this.SpaceBetweenStatements, this.SpaceAfterTryFinally + ]; + + /// + /// Rules controlled by user options + /// + + // Insert space after comma delimiter + this.SpaceAfterComma = new Rule(RuleDescriptor.create3(SyntaxKind.CommaToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + this.NoSpaceAfterComma = new Rule(RuleDescriptor.create3(SyntaxKind.CommaToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + + // Insert space before and after binary operators + this.SpaceBeforeBinaryOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.BinaryOperators), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); + this.SpaceAfterBinaryOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.BinaryOperators, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); + this.NoSpaceBeforeBinaryOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.BinaryOperators), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Delete)); + this.NoSpaceAfterBinaryOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.BinaryOperators, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Delete)); + + // Insert space after keywords in control flow statements + this.SpaceAfterKeywordInControl = new Rule(RuleDescriptor.create2(Shared.TokenRange.Keywords, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsControlDeclContext), RuleAction.Space)); + this.NoSpaceAfterKeywordInControl = new Rule(RuleDescriptor.create2(Shared.TokenRange.Keywords, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsControlDeclContext), RuleAction.Delete)); + + // Open Brace braces after function + //TypeScript: Function can have return types, which can be made of tons of different token kinds + this.NewLineBeforeOpenBraceInFunction = new Rule(RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), RuleAction.NewLine), RuleFlags.CanDeleteNewLines); + + // Open Brace braces after TypeScript module/class/interface + this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new Rule(RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), RuleAction.NewLine), RuleFlags.CanDeleteNewLines); + + // Open Brace braces after control block + this.NewLineBeforeOpenBraceInControl = new Rule(RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), RuleAction.NewLine), RuleFlags.CanDeleteNewLines); + + // Insert space after semicolon in for statement + this.SpaceAfterSemicolonInFor = new Rule(RuleDescriptor.create3(SyntaxKind.SemicolonToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), RuleAction.Space)); + this.NoSpaceAfterSemicolonInFor = new Rule(RuleDescriptor.create3(SyntaxKind.SemicolonToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), RuleAction.Delete)); + + // Insert space after opening and before closing nonempty parenthesis + this.SpaceAfterOpenParen = new Rule(RuleDescriptor.create3(SyntaxKind.OpenParenToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + this.SpaceBeforeCloseParen = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CloseParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + this.NoSpaceBetweenParens = new Rule(RuleDescriptor.create1(SyntaxKind.OpenParenToken, SyntaxKind.CloseParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceAfterOpenParen = new Rule(RuleDescriptor.create3(SyntaxKind.OpenParenToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceBeforeCloseParen = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CloseParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + + // Insert space after function keyword for anonymous functions + this.SpaceAfterAnonymousFunctionKeyword = new Rule(RuleDescriptor.create1(SyntaxKind.FunctionKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space)); + this.NoSpaceAfterAnonymousFunctionKeyword = new Rule(RuleDescriptor.create1(SyntaxKind.FunctionKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Delete)); + } + + /// + /// Contexts + /// + + static IsForContext(context: FormattingContext): boolean { + return context.contextNode.kind === SyntaxKind.ForStatement; + } + + static IsNotForContext(context: FormattingContext): boolean { + return !Rules.IsForContext(context); + } + + static IsBinaryOpContext(context: FormattingContext): boolean { + + switch (context.contextNode.kind) { + case SyntaxKind.BinaryExpression: + return true; + //// binary expressions + //case SyntaxKind.AssignmentExpression: + //case SyntaxKind.AddAssignmentExpression: + //case SyntaxKind.SubtractAssignmentExpression: + //case SyntaxKind.MultiplyAssignmentExpression: + //case SyntaxKind.DivideAssignmentExpression: + //case SyntaxKind.ModuloAssignmentExpression: + //case SyntaxKind.AndAssignmentExpression: + //case SyntaxKind.ExclusiveOrAssignmentExpression: + //case SyntaxKind.OrAssignmentExpression: + //case SyntaxKind.LeftShiftAssignmentExpression: + //case SyntaxKind.SignedRightShiftAssignmentExpression: + //case SyntaxKind.UnsignedRightShiftAssignmentExpression: + //case SyntaxKind.ConditionalExpression: + //case SyntaxKind.LogicalOrExpression: + //case SyntaxKind.LogicalAndExpression: + //case SyntaxKind.BitwiseOrExpression: + //case SyntaxKind.BitwiseExclusiveOrExpression: + //case SyntaxKind.BitwiseAndExpression: + //case SyntaxKind.EqualsWithTypeConversionExpression: + //case SyntaxKind.NotEqualsWithTypeConversionExpression: + //case SyntaxKind.EqualsExpression: + //case SyntaxKind.NotEqualsExpression: + //case SyntaxKind.LessThanExpression: + //case SyntaxKind.GreaterThanExpression: + //case SyntaxKind.LessThanOrEqualExpression: + //case SyntaxKind.GreaterThanOrEqualExpression: + //case SyntaxKind.InstanceOfExpression: + //case SyntaxKind.InExpression: + //case SyntaxKind.LeftShiftExpression: + //case SyntaxKind.SignedRightShiftExpression: + //case SyntaxKind.UnsignedRightShiftExpression: + //case SyntaxKind.MultiplyExpression: + //case SyntaxKind.DivideExpression: + //case SyntaxKind.ModuloExpression: + //case SyntaxKind.AddExpression: + //case SyntaxKind.SubtractExpression: + // return true; + + // equal in import a = module('a'); + case SyntaxKind.ImportDeclaration: + // equal in var a = 0; + case SyntaxKind.VariableDeclaration: + // TODO: + //case SyntaxKind.EqualsValueClause: + return context.currentTokenSpan.kind === SyntaxKind.EqualsToken || context.nextTokenSpan.kind === SyntaxKind.EqualsToken; + // "in" keyword in for (var x in []) { } + case SyntaxKind.ForInStatement: + return context.currentTokenSpan.kind === SyntaxKind.InKeyword || context.nextTokenSpan.kind === SyntaxKind.InKeyword; + } + return false; + } + + static IsNotBinaryOpContext(context: FormattingContext): boolean { + return !Rules.IsBinaryOpContext(context); + } + + static IsSameLineTokenOrBeforeMultilineBlockContext(context: FormattingContext): boolean { + //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. + //// + //// Ex: + //// if (1) { .... + //// * ) and { are on the same line so apply the rule. Here we don't care whether it's same or multi block context + //// + //// Ex: + //// if (1) + //// { ... } + //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we don't format. + //// + //// Ex: + //// if (1) + //// { ... + //// } + //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we format. + + return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); + } + + // This check is done before an open brace in a control construct, a function, or a typescript block declaration + static IsBeforeMultilineBlockContext(context: FormattingContext): boolean { + return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); + } + + static IsMultilineBlockContext(context: FormattingContext): boolean { + return Rules.IsBlockContext(context) && !(context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); + } + + static IsSingleLineBlockContext(context: FormattingContext): boolean { + return Rules.IsBlockContext(context) && (context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); + } + + static IsBlockContext(context: FormattingContext): boolean { + return Rules.NodeIsBlockContext(context.contextNode); + } + + static IsBeforeBlockContext(context: FormattingContext): boolean { + return Rules.NodeIsBlockContext(context.nextTokenParent); + } + + // IMPORTANT!!! This method must return true ONLY for nodes with open and close braces as immediate children + static NodeIsBlockContext(node: Node): boolean { + if (Rules.NodeIsTypeScriptDeclWithBlockContext(node)) { + // This means we are in a context that looks like a block to the user, but in the grammar is actually not a node (it's a class, module, enum, object type literal, etc). + return true; + } + + switch (node.kind) { + case SyntaxKind.Block: + case SyntaxKind.SwitchStatement: + case SyntaxKind.ObjectLiteral: + return true; + } + + return false; + } + + static IsFunctionDeclContext(context: FormattingContext): boolean { + switch (context.contextNode.kind) { + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.Method: + //case SyntaxKind.MemberFunctionDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + ///case SyntaxKind.MethodSignature: + case SyntaxKind.CallSignature: + case SyntaxKind.FunctionExpression: + case SyntaxKind.Constructor: + case SyntaxKind.ArrowFunction: + //case SyntaxKind.ConstructorDeclaration: + //case SyntaxKind.SimpleArrowFunctionExpression: + //case SyntaxKind.ParenthesizedArrowFunctionExpression: + case SyntaxKind.InterfaceDeclaration: // This one is not truly a function, but for formatting purposes, it acts just like one + return true; + } + + return false; + } + + static IsTypeScriptDeclWithBlockContext(context: FormattingContext): boolean { + return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); + } + + static NodeIsTypeScriptDeclWithBlockContext(node: Node): boolean { + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.TypeLiteral: + case SyntaxKind.ModuleDeclaration: + return true; + } + + return false; + } + + static IsAfterCodeBlockContext(context: FormattingContext): boolean { + switch (context.currentTokenParent.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.Block: + case SyntaxKind.SwitchStatement: + return true; + } + return false; + } + + static IsControlDeclContext(context: FormattingContext): boolean { + switch (context.contextNode.kind) { + case SyntaxKind.IfStatement: + case SyntaxKind.SwitchStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.TryStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.WithStatement: + // TODO + // case SyntaxKind.ElseClause: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + return true; + + default: + return false; + } + } + + static IsObjectContext(context: FormattingContext): boolean { + return context.contextNode.kind === SyntaxKind.ObjectLiteral; + } + + static IsFunctionCallContext(context: FormattingContext): boolean { + return context.contextNode.kind === SyntaxKind.CallExpression; + } + + static IsNewContext(context: FormattingContext): boolean { + return context.contextNode.kind === SyntaxKind.NewExpression; + } + + static IsFunctionCallOrNewContext(context: FormattingContext): boolean { + return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); + } + + static IsSameLineTokenContext(context: FormattingContext): boolean { + return context.TokensAreOnSameLine(); + } + + static IsNotFormatOnEnter(context: FormattingContext): boolean { + return context.formattingRequestKind != FormattingRequestKind.FormatOnEnter; + } + + static IsModuleDeclContext(context: FormattingContext): boolean { + return context.contextNode.kind === SyntaxKind.ModuleDeclaration; + } + + static IsObjectTypeContext(context: FormattingContext): boolean { + return context.contextNode.kind === SyntaxKind.TypeLiteral;// && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; + } + + static IsTypeArgumentOrParameter(tokenKind: SyntaxKind, parentKind: SyntaxKind): boolean { + return; + //return ((tokenKind === SyntaxKind.LessThanToken || tokenKind === SyntaxKind.GreaterThanToken) && + // (parentKind === SyntaxKind.TypeParameterList || parentKind === SyntaxKind.TypeArgumentList)); + } + + static IsTypeArgumentOrParameterContext(context: FormattingContext): boolean { + return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan.kind, context.currentTokenParent.kind) || + Rules.IsTypeArgumentOrParameter(context.nextTokenSpan.kind, context.nextTokenParent.kind); + } + + static IsVoidOpContext(context: FormattingContext): boolean { + return; + //return context.currentTokenSpan.token.kind === SyntaxKind.VoidKeyword && context.currentTokenParent.kind() === SyntaxKind.VoidExpression; + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/rulesMap.ts b/src/services/formatting/new/rulesMap.ts new file mode 100644 index 00000000000..6aa472d8d1d --- /dev/null +++ b/src/services/formatting/new/rulesMap.ts @@ -0,0 +1,189 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export class RulesMap { + public map: RulesBucket[]; + public mapRowLength: number; + + constructor() { + this.map = []; + this.mapRowLength = 0; + } + + static create(rules: Rule[]): RulesMap { + var result = new RulesMap(); + result.Initialize(rules); + return result; + } + + public Initialize(rules: Rule[]) { + this.mapRowLength = SyntaxKind.LastToken + 1; + this.map = new Array(this.mapRowLength * this.mapRowLength);//new Array(this.mapRowLength * this.mapRowLength); + + // This array is used only during construction of the rulesbucket in the map + var rulesBucketConstructionStateList: RulesBucketConstructionState[] = new Array(this.map.length);//new Array(this.map.length); + + this.FillRules(rules, rulesBucketConstructionStateList); + return this.map; + } + + public FillRules(rules: Rule[], rulesBucketConstructionStateList: RulesBucketConstructionState[]): void { + rules.forEach((rule) => { + this.FillRule(rule, rulesBucketConstructionStateList); + }); + } + + private GetRuleBucketIndex(row: number, column: number): number { + var rulesBucketIndex = (row * this.mapRowLength) + column; + //Debug.Assert(rulesBucketIndex < this.map.Length, "Trying to access an index outside the array."); + return rulesBucketIndex; + } + + private FillRule(rule: Rule, rulesBucketConstructionStateList: RulesBucketConstructionState[]): void { + var specificRule = rule.Descriptor.LeftTokenRange != Shared.TokenRange.Any && + rule.Descriptor.RightTokenRange != Shared.TokenRange.Any; + + rule.Descriptor.LeftTokenRange.GetTokens().forEach((left) => { + rule.Descriptor.RightTokenRange.GetTokens().forEach((right) => { + var rulesBucketIndex = this.GetRuleBucketIndex(left, right); + + var rulesBucket = this.map[rulesBucketIndex]; + if (rulesBucket == undefined) { + rulesBucket = this.map[rulesBucketIndex] = new RulesBucket(); + } + + rulesBucket.AddRule(rule, specificRule, rulesBucketConstructionStateList, rulesBucketIndex); + }) + }) + } + + public GetRule(context: FormattingContext): Rule { + var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); + var bucket = this.map[bucketIndex]; + if (bucket != null) { + for (var i = 0, len = bucket.Rules().length; i < len; i++) { + var rule = bucket.Rules()[i]; + if (rule.Operation.Context.InContext(context)) + return rule; + } + } + return null; + } + } + + var MaskBitSize = 5; + var Mask = 0x1f; + + export enum RulesPosition { + IgnoreRulesSpecific = 0, + IgnoreRulesAny = MaskBitSize * 1, + ContextRulesSpecific = MaskBitSize * 2, + ContextRulesAny = MaskBitSize * 3, + NoContextRulesSpecific = MaskBitSize * 4, + NoContextRulesAny = MaskBitSize * 5 + } + + export class RulesBucketConstructionState { + private rulesInsertionIndexBitmap: number; + + constructor() { + //// The Rules list contains all the inserted rules into a rulebucket in the following order: + //// 1- Ignore rules with specific token combination + //// 2- Ignore rules with any token combination + //// 3- Context rules with specific token combination + //// 4- Context rules with any token combination + //// 5- Non-context rules with specific token combination + //// 6- Non-context rules with any token combination + //// + //// The member rulesInsertionIndexBitmap is used to describe the number of rules + //// in each sub-bucket (above) hence can be used to know the index of where to insert + //// the next rule. It's a bitmap which contains 6 different sections each is given 5 bits. + //// + //// Example: + //// In order to insert a rule to the end of sub-bucket (3), we get the index by adding + //// the values in the bitmap segments 3rd, 2nd, and 1st. + this.rulesInsertionIndexBitmap = 0; + } + + public GetInsertionIndex(maskPosition: RulesPosition): number { + var index = 0; + + var pos = 0; + var indexBitmap = this.rulesInsertionIndexBitmap; + + while (pos <= maskPosition) { + index += (indexBitmap & Mask); + indexBitmap >>= MaskBitSize; + pos += MaskBitSize; + } + + return index; + } + + public IncreaseInsertionIndex(maskPosition: RulesPosition): void { + var value = (this.rulesInsertionIndexBitmap >> maskPosition) & Mask; + value++; + Debug.assert((value & Mask) == value, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."); + + var temp = this.rulesInsertionIndexBitmap & ~(Mask << maskPosition); + temp |= value << maskPosition; + + this.rulesInsertionIndexBitmap = temp; + } + } + + export class RulesBucket { + private rules: Rule[]; + + constructor() { + this.rules = []; + } + + public Rules(): Rule[] { + return this.rules; + } + + public AddRule(rule: Rule, specificTokens: boolean, constructionState: RulesBucketConstructionState[], rulesBucketIndex: number): void { + var position: RulesPosition; + + if (rule.Operation.Action == RuleAction.Ignore) { + position = specificTokens ? + RulesPosition.IgnoreRulesSpecific : + RulesPosition.IgnoreRulesAny; + } + else if (!rule.Operation.Context.IsAny()) { + position = specificTokens ? + RulesPosition.ContextRulesSpecific : + RulesPosition.ContextRulesAny; + } + else { + position = specificTokens ? + RulesPosition.NoContextRulesSpecific : + RulesPosition.NoContextRulesAny; + } + + var state = constructionState[rulesBucketIndex]; + if (state === undefined) { + state = constructionState[rulesBucketIndex] = new RulesBucketConstructionState(); + } + var index = state.GetInsertionIndex(position); + this.rules.splice(index, 0, rule); + state.IncreaseInsertionIndex(position); + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/rulesProvider.ts b/src/services/formatting/new/rulesProvider.ts new file mode 100644 index 00000000000..f7374a58142 --- /dev/null +++ b/src/services/formatting/new/rulesProvider.ts @@ -0,0 +1,117 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export class RulesProvider { + private globalRules: Rules; + private options: ts.FormatCodeOptions; + private activeRules: Rule[]; + private rulesMap: RulesMap; + + constructor(private logger: TypeScript.Logger) { + this.globalRules = new Rules(); + } + + public getRuleName(rule: Rule): string { + return this.globalRules.getRuleName(rule); + } + + public getRuleByName(name: string): Rule { + return this.globalRules[name]; + } + + public getRulesMap() { + return this.rulesMap; + } + + public ensureUpToDate(options: ts.FormatCodeOptions) { + if (this.options == null || !ts.compareDataObjects(this.options, options)) { + var activeRules = this.createActiveRules(options); + var rulesMap = RulesMap.create(activeRules); + + this.activeRules = activeRules; + this.rulesMap = rulesMap; + this.options = ts.clone(options); + } + } + + private createActiveRules(options: ts.FormatCodeOptions): Rule[] { + var rules = this.globalRules.HighPriorityCommonRules.slice(0); + + if (options.InsertSpaceAfterCommaDelimiter) { + rules.push(this.globalRules.SpaceAfterComma); + } + else { + rules.push(this.globalRules.NoSpaceAfterComma); + } + + if (options.InsertSpaceAfterFunctionKeywordForAnonymousFunctions) { + rules.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword); + } + else { + rules.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword); + } + + if (options.InsertSpaceAfterKeywordsInControlFlowStatements) { + rules.push(this.globalRules.SpaceAfterKeywordInControl); + } + else { + rules.push(this.globalRules.NoSpaceAfterKeywordInControl); + } + + if (options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis) { + rules.push(this.globalRules.SpaceAfterOpenParen); + rules.push(this.globalRules.SpaceBeforeCloseParen); + rules.push(this.globalRules.NoSpaceBetweenParens); + } + else { + rules.push(this.globalRules.NoSpaceAfterOpenParen); + rules.push(this.globalRules.NoSpaceBeforeCloseParen); + rules.push(this.globalRules.NoSpaceBetweenParens); + } + + if (options.InsertSpaceAfterSemicolonInForStatements) { + rules.push(this.globalRules.SpaceAfterSemicolonInFor); + } + else { + rules.push(this.globalRules.NoSpaceAfterSemicolonInFor); + } + + if (options.InsertSpaceBeforeAndAfterBinaryOperators) { + rules.push(this.globalRules.SpaceBeforeBinaryOperator); + rules.push(this.globalRules.SpaceAfterBinaryOperator); + } + else { + rules.push(this.globalRules.NoSpaceBeforeBinaryOperator); + rules.push(this.globalRules.NoSpaceAfterBinaryOperator); + } + + if (options.PlaceOpenBraceOnNewLineForControlBlocks) { + rules.push(this.globalRules.NewLineBeforeOpenBraceInControl); + } + + if (options.PlaceOpenBraceOnNewLineForFunctions) { + rules.push(this.globalRules.NewLineBeforeOpenBraceInFunction); + rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock); + } + + rules = rules.concat(this.globalRules.LowPriorityCommonRules); + + return rules; + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/smartIndenter.ts b/src/services/formatting/new/smartIndenter.ts new file mode 100644 index 00000000000..df57929dff3 --- /dev/null +++ b/src/services/formatting/new/smartIndenter.ts @@ -0,0 +1,401 @@ +/// +/// + +module ts.formatting { + export module SmartIndenter { + export function getIndentation(position: number, sourceFile: SourceFile, options: EditorOptions): number { + if (position > sourceFile.text.length) { + return 0; // past EOF + } + + var precedingToken = ServicesSyntaxUtilities.findPrecedingToken(position, sourceFile); + if (!precedingToken) { + return 0; + } + + // no indentation in string \regex literals + if ((precedingToken.kind === SyntaxKind.StringLiteral || precedingToken.kind === SyntaxKind.RegularExpressionLiteral) && + precedingToken.getStart(sourceFile) <= position && + precedingToken.end > position) { + return 0; + } + + var lineAtPosition = sourceFile.getLineAndCharacterFromPosition(position).line; + + if (precedingToken.kind === SyntaxKind.CommaToken && precedingToken.parent.kind !== SyntaxKind.BinaryExpression) { + // previous token is comma that separates items in list - find the previous item and try to derive indentation from it + var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation; + } + } + + // try to find node that can contribute to indentation and includes 'position' starting from 'precedingToken' + // if such node is found - compute initial indentation for 'position' inside this node + var previous: Node; + var current = precedingToken; + var currentStart: LineAndCharacter; + var indentationDelta: number; + + while (current) { + if (positionBelongsToNode(current, position, sourceFile) && nodeContentIsIndented(current, previous)) { + currentStart = getStartLineAndCharacterForNode(current, sourceFile); + + if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) { + indentationDelta = 0; + } + else { + indentationDelta = lineAtPosition !== currentStart.line ? options.IndentSize : 0; + } + + break; + } + + // check if current node is a list item - if yes, take indentation from it + var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation; + } + + previous = current; + current = current.parent; + } + + if (!current) { + // no parent was found - return 0 to be indented on the level of SourceFile + return 0; + } + + return getIndentationForNode(current, currentStart, indentationDelta, sourceFile, options); + } + + export function getIndentationForNode(current: Node, currentStart: LineAndCharacter, indentationDelta: number, sourceFile: SourceFile, options: EditorOptions): number { + var parent: Node = current.parent; + var parentStart: LineAndCharacter; + + // walk upwards and collect indentations for pairs of parent-child nodes + // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' + while (parent) { + // check if current node is a list item - if yes, take indentation from it + var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation + indentationDelta; + } + + parentStart = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); + var parentAndChildShareLine = + parentStart.line === currentStart.line || + childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); + + // try to fetch actual indentation for current node from source text + var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation + indentationDelta; + } + + // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line + if (nodeContentIsIndented(parent, current) && !parentAndChildShareLine) { + indentationDelta += options.IndentSize; + } + + current = parent; + currentStart = parentStart; + parent = current.parent; + } + + return indentationDelta; + } + + /* + * Function returns -1 if indentation cannot be determined + */ + function getActualIndentationForListItemBeforeComma(commaToken: Node, sourceFile: SourceFile, options: EditorOptions): number { + // previous token is comma that separates items in list - find the previous item and try to derive indentation from it + var commaItemInfo = ServicesSyntaxUtilities.findListItemInfo(commaToken); + Debug.assert(commaItemInfo.listItemIndex > 0); + // The item we're interested in is right before the comma + return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); + } + + /* + * Function returns -1 if actual indentation for node should not be used (i.e because node is nested expression) + */ + function getActualIndentationForNode(current: Node, + parent: Node, + currentLineAndChar: LineAndCharacter, + parentAndChildShareLine: boolean, + sourceFile: SourceFile, + options: EditorOptions): number { + + // actual indentation is used for statements\declarations if one of cases below is true: + // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually + // - parent and child are not on the same line + var useActualIndentation = + (isDeclaration(current) || isStatement(current)) && + (parent.kind === SyntaxKind.SourceFile || !parentAndChildShareLine); + + if (!useActualIndentation) { + return -1; + } + + return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options); + } + + function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken: Node, current: Node, lineAtPosition: number, sourceFile: SourceFile): boolean { + var nextToken = ServicesSyntaxUtilities.findNextToken(precedingToken, current); + if (!nextToken) { + return false; + } + + if (nextToken.kind === SyntaxKind.OpenBraceToken) { + // open braces are always indented at the parent level + return true; + } + else if (nextToken.kind === SyntaxKind.CloseBraceToken) { + // close braces are indented at the parent level if they are located on the same line with cursor + // this means that if new line will be added at $ position, this case will be indented + // class A { + // $ + // } + /// and this one - not + // class A { + // $} + + var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line; + return lineAtPosition === nextTokenStartLine; + } + + return false; + } + + function getStartLineAndCharacterForNode(n: Node, sourceFile: SourceFile): LineAndCharacter { + return sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)); + } + + function positionBelongsToNode(candidate: Node, position: number, sourceFile: SourceFile): boolean { + return candidate.end > position || !isCompletedNode(candidate, sourceFile); + } + + function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: Node, childStartLine: number, sourceFile: SourceFile): boolean { + if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { + var elseKeyword = forEach(parent.getChildren(), c => c.kind === SyntaxKind.ElseKeyword && c); + Debug.assert(elseKeyword); + + var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; + return elseKeywordStartLine === childStartLine; + } + } + + function getActualIndentationForListItem(node: Node, sourceFile: SourceFile, options: EditorOptions): number { + if (node.parent) { + switch (node.parent.kind) { + case SyntaxKind.TypeReference: + if ((node.parent).typeArguments) { + return getActualIndentationFromList((node.parent).typeArguments); + } + break; + case SyntaxKind.ObjectLiteral: + return getActualIndentationFromList((node.parent).properties); + case SyntaxKind.TypeLiteral: + return getActualIndentationFromList((node.parent).members); + case SyntaxKind.ArrayLiteral: + return getActualIndentationFromList((node.parent).elements); + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.Method: + case SyntaxKind.CallSignature: + case SyntaxKind.ConstructSignature: + if ((node.parent).typeParameters && node.end < (node.parent).typeParameters.end) { + return getActualIndentationFromList((node.parent).typeParameters); + } + + return getActualIndentationFromList((node.parent).parameters); + case SyntaxKind.NewExpression: + case SyntaxKind.CallExpression: + if ((node.parent).typeArguments && node.end < (node.parent).typeArguments.end) { + return getActualIndentationFromList((node.parent).typeArguments); + } + + return getActualIndentationFromList((node.parent).arguments); + } + } + + return -1; + + function getActualIndentationFromList(list: Node[]): number { + var index = indexOf(list, node); + return index !== -1 ? deriveActualIndentationFromList(list, index, sourceFile, options) : -1; + } + } + + + function deriveActualIndentationFromList(list: Node[], index: number, sourceFile: SourceFile, options: EditorOptions): number { + Debug.assert(index >= 0 && index < list.length); + var node = list[index]; + + // walk toward the start of the list starting from current node and check if the line is the same for all items. + // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] + var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); + for (var i = index - 1; i >= 0; --i) { + if (list[i].kind === SyntaxKind.CommaToken) { + continue; + } + // skip list items that ends on the same line with the current list element + var prevEndLine = sourceFile.getLineAndCharacterFromPosition(list[i].end).line; + if (prevEndLine !== lineAndCharacter.line) { + return findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options); + } + + lineAndCharacter = getStartLineAndCharacterForNode(list[i], sourceFile); + } + return -1; + } + + function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter: LineAndCharacter, sourceFile: SourceFile, options: EditorOptions): number { + var lineStart = sourceFile.getPositionFromLineAndCharacter(lineAndCharacter.line, 1); + var column = 0; + for (var i = 0; i < lineAndCharacter.character; ++i) { + var charCode = sourceFile.text.charCodeAt(lineStart + i); + if (!isWhiteSpace(charCode)) { + return column; + } + + if (charCode === CharacterCodes.tab) { + column += options.TabSize; + } + else { + column++; + } + } + + return column; + } + + function nodeContentIsIndented(parent: Node, child: Node): boolean { + switch (parent.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.EnumDeclaration: + return true; + case SyntaxKind.ModuleDeclaration: + // ModuleBlock should take care of indentation + return false; + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.Method: + case SyntaxKind.FunctionExpression: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.Constructor: + // FunctionBlock should take care of indentation + return false; + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + return child && child.kind !== SyntaxKind.Block; + case SyntaxKind.IfStatement: + return child && child.kind !== SyntaxKind.Block; + case SyntaxKind.TryStatement: + // TryBlock\CatchBlock\FinallyBlock should take care of indentation + return false; + case SyntaxKind.ArrayLiteral: + case SyntaxKind.Block: + case SyntaxKind.FunctionBlock: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.ModuleBlock: + case SyntaxKind.ObjectLiteral: + case SyntaxKind.TypeLiteral: + case SyntaxKind.SwitchStatement: + case SyntaxKind.DefaultClause: + case SyntaxKind.CaseClause: + case SyntaxKind.ParenExpression: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + case SyntaxKind.VariableStatement: + case SyntaxKind.VariableDeclaration: + return true; + default: + return false; + } + } + + /* + * Checks if node ends with 'expectedLastToken'. + * If child at position 'length - 1' is 'SemicolonToken' it is skipped and 'expectedLastToken' is compared with child at position 'length - 2'. + */ + function nodeEndsWith(n: Node, expectedLastToken: SyntaxKind, sourceFile: SourceFile): boolean { + var children = n.getChildren(sourceFile); + if (children.length) { + var last = children[children.length - 1]; + if (last.kind === expectedLastToken) { + return true; + } + else if (last.kind === SyntaxKind.SemicolonToken && children.length !== 1) { + return children[children.length - 2].kind === expectedLastToken; + } + } + return false; + } + + /* + * This function is always called when position of the cursor is located after the node + */ + function isCompletedNode(n: Node, sourceFile: SourceFile): boolean { + switch (n.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.ObjectLiteral: + case SyntaxKind.Block: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.FunctionBlock: + case SyntaxKind.ModuleBlock: + case SyntaxKind.SwitchStatement: + return nodeEndsWith(n, SyntaxKind.CloseBraceToken, sourceFile); + case SyntaxKind.ParenExpression: + case SyntaxKind.CallSignature: + case SyntaxKind.CallExpression: + case SyntaxKind.ConstructSignature: + return nodeEndsWith(n, SyntaxKind.CloseParenToken, sourceFile); + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.Method: + case SyntaxKind.ArrowFunction: + return !(n).body || isCompletedNode((n).body, sourceFile); + case SyntaxKind.ModuleDeclaration: + return (n).body && isCompletedNode((n).body, sourceFile); + case SyntaxKind.IfStatement: + if ((n).elseStatement) { + return isCompletedNode((n).elseStatement, sourceFile); + } + return isCompletedNode((n).thenStatement, sourceFile); + case SyntaxKind.ExpressionStatement: + return isCompletedNode((n).expression, sourceFile); + case SyntaxKind.ArrayLiteral: + return nodeEndsWith(n, SyntaxKind.CloseBracketToken, sourceFile); + case SyntaxKind.Missing: + return false; + case SyntaxKind.CaseClause: + case SyntaxKind.DefaultClause: + // there is no such thing as terminator token for CaseClause\DefaultClause so for simplicitly always consider them non-completed + return false; + case SyntaxKind.WhileStatement: + return isCompletedNode((n).statement, sourceFile); + case SyntaxKind.DoStatement: + // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; + var hasWhileKeyword = forEach(n.getChildren(), c => c.kind === SyntaxKind.WhileKeyword && c); + if(hasWhileKeyword) { + return nodeEndsWith(n, SyntaxKind.CloseParenToken, sourceFile); + } + return isCompletedNode((n).statement, sourceFile); + default: + return true; + } + } + } +} + diff --git a/src/services/formatting/new/smartIndenter.ts.orig b/src/services/formatting/new/smartIndenter.ts.orig new file mode 100644 index 00000000000..422c7d0c408 --- /dev/null +++ b/src/services/formatting/new/smartIndenter.ts.orig @@ -0,0 +1,476 @@ +/// + +module ts.formatting { + export module SmartIndenter { + export function getIndentation(position: number, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + if (position > sourceFile.text.length) { + return 0; // past EOF + } + + var precedingToken = findPrecedingToken(position, sourceFile); + if (!precedingToken) { + return 0; + } + + // no indentation in string \regex literals + if ((precedingToken.kind === SyntaxKind.StringLiteral || precedingToken.kind === SyntaxKind.RegularExpressionLiteral) && + precedingToken.getStart(sourceFile) <= position && + precedingToken.end > position) { + return 0; + } + + var lineAtPosition = sourceFile.getLineAndCharacterFromPosition(position).line; + + if (precedingToken.kind === SyntaxKind.CommaToken && precedingToken.parent.kind !== SyntaxKind.BinaryExpression) { + + // previous token is comma that separates items in list - find the previous item and try to derive indentation from it + var precedingListItem = findPrecedingListItem(precedingToken); + var precedingListItemStartLineAndChar = sourceFile.getLineAndCharacterFromPosition(precedingListItem.getStart(sourceFile)); + var listStartLine = getStartLineForNode(precedingListItem.parent, sourceFile); + + if (precedingListItemStartLineAndChar.line !== listStartLine) { + return findFirstNonWhitespaceCharacterInLine(precedingListItemStartLineAndChar.line, precedingListItemStartLineAndChar.character, sourceFile); + // previous list item starts on the different line with list, find first non-whitespace character in this line and use its position as indentation + var lineStartPosition = sourceFile.getPositionFromLineAndCharacter(precedingListItemStartLineAndChar.line, 1); + for (var i = 0; i < precedingListItemStartLineAndChar.character; ++i) { + if (!isWhiteSpace(sourceFile.text.charCodeAt(lineStartPosition + i))) { + return i; + } + } + + // seems that this is the first non-whitespace character on the line - return it + return precedingListItemStartLineAndChar.character; + } + } + + // try to find the node that will include 'position' starting from 'precedingToken' + // if such node is found - compute initial indentation for 'position' inside this node + var previous: Node; + var current = precedingToken; + var currentStartLine: number; + var indentation: number; + + while (current) { + if (isPositionBelongToNode(current, position, sourceFile)) { +<<<<<<< HEAD + +======= +>>>>>>> added support for smart indentation in the middle of list items, updated test baselines + currentStartLine = getStartLineForNode(current, sourceFile); + + if (discardInitialIndentationIfNextTokenIsOpenOrCloseBrace(precedingToken, current, lineAtPosition, sourceFile)) { + indentation = 0; + } + else { + indentation = isNodeContentIndented(current, previous) && lineAtPosition !== currentStartLine ? options.indentSpaces : 0; + } + + break; + } + var customIndentation = getCustomIndentationForListItem(current, sourceFile); + if (customIndentation !== -1) { + return customIndentation; + } + + // check if current node is a list item - if yes, take indentation from it + var customIndentation = getCustomIndentationForListItem(current, sourceFile); + if (customIndentation !== -1) { + return customIndentation; + } + + previous = current; + current = current.parent; + } + + if (!current) { + // no parent was found - return 0 to be indented on the level of SourceFile + return 0; + } + + + var parent: Node = current.parent; + var parentStartLine: number; + + // walk upwards and collect indentations for pairs of parent-child nodes + // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' + while (parent) { +<<<<<<< HEAD +======= + + // check if current node is a list item - if yes, take indentation from it +>>>>>>> added support for smart indentation in the middle of list items, updated test baselines + var customIndentation = getCustomIndentationForListItem(current, sourceFile); + if (customIndentation !== -1) { + return customIndentation + indentation; + } + + parentStartLine = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)).line; + // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line + var increaseIndentation = + isNodeContentIndented(parent, current) && + parentStartLine !== currentStartLine && + !isChildStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStartLine, sourceFile); + + if (increaseIndentation) { + indentation += options.indentSpaces; + } + + current = parent; + currentStartLine = parentStartLine; + parent = current.parent; + } + + return indentation; + } + + function discardInitialIndentationIfNextTokenIsOpenOrCloseBrace(precedingToken: Node, current: Node, lineAtPosition: number, sourceFile: SourceFile): boolean { + var nextToken = findNextToken(precedingToken, current); + if (!nextToken) { + return false; + } + + if (nextToken.kind === SyntaxKind.OpenBraceToken) { + // open braces are always indented at the parent level + return true; + } + else if (nextToken.kind === SyntaxKind.CloseBraceToken) { + // close braces are indented at the parent level if they are located on the same line with cursor + // this means that if new line will be added at $ position, this case will be indented + // class A { + // $ + // } + /// and this one - not + // class A { + // $} + + var nextTokenStartLine = getStartLineForNode(nextToken, sourceFile); + return lineAtPosition === nextTokenStartLine; + } + + return false; + } + + function getStartLineForNode(n: Node, sourceFile: SourceFile): number { + return sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)).line; + } + + function findPrecedingListItem(commaToken: Node): Node { + // CommaToken node is synthetic and thus will be stored in SyntaxList, however parent of the CommaToken points to the container of the SyntaxList skipping the list. + // In order to find the preceding list item we first need to locate SyntaxList itself and then search for the position of CommaToken + var syntaxList = forEach(commaToken.parent.getChildren(), c => { + // find syntax list that covers the span of CommaToken + if (c.kind == SyntaxKind.SyntaxList && c.pos <= commaToken.end && c.end >= commaToken.end) { + return c; + } + }); + Debug.assert(syntaxList); + + var children = syntaxList.getChildren(); + var commaIndex = indexOf(children, commaToken); + Debug.assert(commaIndex !== -1 && commaIndex !== 0); + + return children[commaIndex - 1]; + } + + function isPositionBelongToNode(candidate: Node, position: number, sourceFile: SourceFile): boolean { + return candidate.end > position || !isCompletedNode(candidate, sourceFile); + } + + function isChildStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: Node, childStartLine: number, sourceFile: SourceFile): boolean { + if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { + var elseKeyword = forEach(parent.getChildren(), c => c.kind === SyntaxKind.ElseKeyword && c); + Debug.assert(elseKeyword); + + var elseKeywordStartLine = getStartLineForNode(elseKeyword, sourceFile); + return elseKeywordStartLine === childStartLine; + } + } + + function getCustomIndentationForListItem(node: Node, sourceFile: SourceFile): number { + if (node.parent) { + switch (node.parent.kind) { + case SyntaxKind.ObjectLiteral: + return getCustomIndentationFromList((node.parent).properties); + case SyntaxKind.TypeLiteral: + return getCustomIndentationFromList((node.parent).members); + case SyntaxKind.ArrayLiteral: + return getCustomIndentationFromList((node.parent).elements); + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.Method: + case SyntaxKind.CallSignature: + case SyntaxKind.ConstructSignature: + if ((node.parent).typeParameters && node.end < (node.parent).typeParameters.end) { + return getCustomIndentationFromList((node.parent).typeParameters); + } + else { + return getCustomIndentationFromList((node.parent).parameters); + } + case SyntaxKind.NewExpression: + case SyntaxKind.CallExpression: + if ((node.parent).typeArguments && node.end < (node.parent).typeArguments.end) { + return getCustomIndentationFromList((node.parent).typeArguments); + } + else { + return getCustomIndentationFromList((node.parent).arguments); + } + + break; + } + } + + return -1; + + function getCustomIndentationFromList(list: Node[]): number { + var index = indexOf(list, node); + if (index !== -1) { + var lineAndCol = sourceFile.getLineAndCharacterFromPosition(node.getStart(sourceFile)); + for (var i = index - 1; i >= 0; --i) { + var prevLineAndCol = sourceFile.getLineAndCharacterFromPosition(list[i].getStart(sourceFile)); + if (lineAndCol.line !== prevLineAndCol.line) { +<<<<<<< HEAD + // find the line start position + var lineStart = sourceFile.getPositionFromLineAndCharacter(lineAndCol.line, 1); + for (var i = 0; i <= lineAndCol.character; ++i) { + if (!isWhiteSpace(sourceFile.text.charCodeAt(lineStart + i))) { + return i; + } + } + // code is unreachable because the range that we check above includes at least one non-whitespace character at the very end + Debug.fail("Unreachable code") + +======= + return findFirstNonWhitespaceCharacterInLine(lineAndCol.line, lineAndCol.character, sourceFile); +>>>>>>> added support for smart indentation in the middle of list items, updated test baselines + } + lineAndCol = prevLineAndCol; + } + } + return -1; + } + } + + function findFirstNonWhitespaceCharacterInLine(line: number, maxCharacter: number, sourceFile: SourceFile): number { + var lineStart = sourceFile.getPositionFromLineAndCharacter(line, 1); + for (var i = 0; i < maxCharacter; ++i) { + if (!isWhiteSpace(sourceFile.text.charCodeAt(lineStart + i))) { + return i; + } + } + + return maxCharacter; + } + + function findNextToken(previousToken: Node, parent: Node): Node { + return find(parent); + + function find(n: Node): Node { + if (isToken(n) && n.pos === previousToken.end) { + // this is token that starts at the end of previous token - return it + return n; + } + + var children = n.getChildren(); + for (var i = 0, len = children.length; i < len; ++i) { + var child = children[i]; + var shouldDiveInChildNode = + // previous token is enclosed somewhere in the child + (child.pos <= previousToken.pos && child.end > previousToken.end) || + // previous token end exactly at the beginning of child + (child.pos === previousToken.end); + + if (shouldDiveInChildNode && isCandidateNode(child)) { + return find(child); + } + } + } + } + + function findPrecedingToken(position: number, sourceFile: SourceFile): Node { + return find(sourceFile, /*diveIntoLastChild*/ false); + + function find(n: Node, diveIntoLastChild: boolean): Node { + if (isToken(n)) { + return n; + } + + var children = n.getChildren(); + if (diveIntoLastChild) { + var candidate = findLastChildNodeCandidate(children, /*exclusiveStartPosition*/ children.length); + return candidate && find(candidate, diveIntoLastChild); + } + + for (var i = 0, len = children.length; i < len; ++i) { + var child = children[i]; + if (isCandidateNode(child)) { + if (position < child.end) { + if (child.getStart(sourceFile) >= position) { + // actual start of the node is past the position - previous token should be at the end of previous child + var candidate = findLastChildNodeCandidate(children, /*exclusiveStartPosition*/ i); + return candidate && find(candidate, /*diveIntoLastChild*/ true) + } + else { + // candidate should be in this node + return find(child, diveIntoLastChild); + } + } + } + } + + // here we know that none of child token nodes embrace the position + // try to find the closest token on the left + if (children.length) { + var candidate = findLastChildNodeCandidate(children, /*exclusiveStartPosition*/ children.length); + return candidate && find(candidate, /*diveIntoLastChild*/ true); + } + } + + /// finds last node that is considered as candidate for search (isCandidate(node) === true) starting from 'exclusiveStartPosition' + function findLastChildNodeCandidate(children: Node[], exclusiveStartPosition: number): Node { + for (var i = exclusiveStartPosition - 1; i >= 0; --i) { + if (isCandidateNode(children[i])) { + return children[i]; + } + } + } + } + + /// checks if node is something that can contain tokens (except EOF) - filters out EOF tokens, Missing\Omitted expressions, empty SyntaxLists and expression statements that wrap any of listed nodes. + function isCandidateNode(n: Node): boolean { + if (n.kind === SyntaxKind.ExpressionStatement) { + return isCandidateNode((n).expression); + } + + if (n.kind === SyntaxKind.EndOfFileToken || n.kind === SyntaxKind.OmittedExpression || n.kind === SyntaxKind.Missing) { + return false; + } + + // SyntaxList is already realized so getChildCount should be fast and non-expensive + return n.kind !== SyntaxKind.SyntaxList || n.getChildCount() !== 0; + } + + function isToken(n: Node): boolean { + return n.kind < SyntaxKind.Missing; + } + + function isNodeContentIndented(parent: Node, child: Node): boolean { + switch (parent.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.EnumDeclaration: + return true; + case SyntaxKind.ModuleDeclaration: + // ModuleBlock should take care of indentation + return false; + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.Method: + case SyntaxKind.FunctionExpression: + // FunctionBlock should take care of indentation + return false; + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + return child && child.kind !== SyntaxKind.Block; + case SyntaxKind.IfStatement: + return child && child.kind !== SyntaxKind.Block; + case SyntaxKind.TryStatement: + // TryBlock\CatchBlock\FinallyBlock should take care of indentation + return false; + case SyntaxKind.ArrayLiteral: + case SyntaxKind.Block: + case SyntaxKind.FunctionBlock: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.ModuleBlock: + case SyntaxKind.ObjectLiteral: + case SyntaxKind.TypeLiteral: + case SyntaxKind.SwitchStatement: + case SyntaxKind.DefaultClause: + case SyntaxKind.CaseClause: + case SyntaxKind.ParenExpression: + case SyntaxKind.BinaryExpression: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + case SyntaxKind.VariableStatement: + case SyntaxKind.VariableDeclaration: + return true; + default: + return false; + } + } + + /// checks if node ends with 'expectedLastToken'. + /// If child at position 'length - 1' is 'SemicolonToken' it is skipped and 'expectedLastToken' is compared with child at position 'length - 2'. + function isNodeEndWith(n: Node, expectedLastToken: SyntaxKind, sourceFile: SourceFile): boolean { + var children = n.getChildren(sourceFile); + if (children.length) { + var last = children[children.length - 1]; + if (last.kind === expectedLastToken) { + return true; + } + else if (last.kind === SyntaxKind.SemicolonToken && children.length !== 1) { + return children[children.length - 2].kind === expectedLastToken; + } + } + return false; + } + + function isCompletedNode(n: Node, sourceFile: SourceFile): boolean { + switch (n.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.ObjectLiteral: + case SyntaxKind.Block: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.FunctionBlock: + case SyntaxKind.ModuleBlock: + case SyntaxKind.SwitchStatement: + return isNodeEndWith(n, SyntaxKind.CloseBraceToken, sourceFile); + case SyntaxKind.ParenExpression: + case SyntaxKind.CallSignature: + case SyntaxKind.CallExpression: + return isNodeEndWith(n, SyntaxKind.CloseParenToken, sourceFile); + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.Method: + case SyntaxKind.ArrowFunction: + return !(n).body || isCompletedNode((n).body, sourceFile); + case SyntaxKind.ModuleDeclaration: + return (n).body && isCompletedNode((n).body, sourceFile); + case SyntaxKind.IfStatement: + if ((n).elseStatement) { + return isCompletedNode((n).elseStatement, sourceFile); + } + return isCompletedNode((n).thenStatement, sourceFile); + case SyntaxKind.ExpressionStatement: + return isCompletedNode((n).expression, sourceFile); + case SyntaxKind.ArrayLiteral: + return isNodeEndWith(n, SyntaxKind.CloseBracketToken, sourceFile); + case SyntaxKind.Missing: + return false; + case SyntaxKind.CaseClause: + case SyntaxKind.DefaultClause: + // there is no such thing as terminator token for CaseClause\DefaultClause so for simplicitly always consider them non-completed + return false; + case SyntaxKind.VariableStatement: + // variable statement is considered completed if it either doesn'not have variable declarations or last variable declaration is completed + var variableDeclarations = (n).declarations; + return variableDeclarations.length === 0 || isCompletedNode(variableDeclarations[variableDeclarations.length - 1], sourceFile); + case SyntaxKind.VariableDeclaration: + // variable declaration is completed if it either doesn't have initializer or initializer is completed + return !(n).initializer || isCompletedNode((n).initializer, sourceFile); + case SyntaxKind.WhileStatement: + return isCompletedNode((n).statement, sourceFile); + case SyntaxKind.DoStatement: + return isCompletedNode((n).statement, sourceFile); + default: + return true; + } + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/snapshotPoint.ts b/src/services/formatting/new/snapshotPoint.ts new file mode 100644 index 00000000000..781c9c69d31 --- /dev/null +++ b/src/services/formatting/new/snapshotPoint.ts @@ -0,0 +1,30 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + + export class SnapshotPoint { + constructor(public snapshot: ITextSnapshot, public position: number) { + } + public getContainingLine(): ITextSnapshotLine { + return this.snapshot.getLineFromPosition(this.position); + } + public add(offset: number): SnapshotPoint { + return new SnapshotPoint(this.snapshot, this.position + offset); + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/textEditInfo.ts b/src/services/formatting/new/textEditInfo.ts new file mode 100644 index 00000000000..18ee085dc19 --- /dev/null +++ b/src/services/formatting/new/textEditInfo.ts @@ -0,0 +1,28 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export class TextEditInfo { + + constructor(public position: number, public length: number, public replaceWith: string) { + } + + public toString() { + return "[ position: " + this.position + ", length: " + this.length + ", replaceWith: '" + this.replaceWith + "' ]"; + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/textSnapshot.ts b/src/services/formatting/new/textSnapshot.ts new file mode 100644 index 00000000000..096159f12ab --- /dev/null +++ b/src/services/formatting/new/textSnapshot.ts @@ -0,0 +1,89 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export interface ITextSnapshot { + getLength(): number; + getText(span: TypeScript.TextSpan): string; + getLineNumberFromPosition(position: number): number; + getLineFromPosition(position: number): ITextSnapshotLine; + getLineFromLineNumber(lineNumber: number): ITextSnapshotLine; + } + + export class TextSnapshot implements ITextSnapshot { + private lines: TextSnapshotLine[]; + + constructor(private snapshot: /*ISimpleText*/ any) { + this.lines = []; + } + + public getLength(): number { + return this.snapshot.length(); + } + + public getText(span: TypeScript.TextSpan): string { + return this.snapshot.substr(span.start(), span.length()); + } + + public getLineNumberFromPosition(position: number): number { + return this.snapshot.lineMap().getLineNumberFromPosition(position); + } + + public getLineFromPosition(position: number): ITextSnapshotLine { + var lineNumber = this.getLineNumberFromPosition(position); + return this.getLineFromLineNumber(lineNumber); + } + + public getLineFromLineNumber(lineNumber: number): ITextSnapshotLine { + var line = this.lines[lineNumber]; + if (line === undefined) { + line = this.getLineFromLineNumberWorker(lineNumber); + this.lines[lineNumber] = line; + } + return line; + } + + private getLineFromLineNumberWorker(lineNumber: number): ITextSnapshotLine { + var lineMap = this.snapshot.lineMap().lineStarts(); + var lineMapIndex = lineNumber; //Note: lineMap is 0-based + if (lineMapIndex < 0 || lineMapIndex >= lineMap.length) + throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.Invalid_line_number_0, [lineMapIndex])); + var start = lineMap[lineMapIndex]; + + var end: number; + var endIncludingLineBreak: number; + var lineBreak = ""; + if (lineMapIndex == lineMap.length) { + end = endIncludingLineBreak = this.snapshot.length(); + } + else { + endIncludingLineBreak = (lineMapIndex >= lineMap.length - 1 ? this.snapshot.length() : lineMap[lineMapIndex + 1]); + for (var p = endIncludingLineBreak - 1; p >= start; p--) { + var c = this.snapshot.substr(p, 1); + //TODO: Other ones? + if (c != "\r" && c != "\n") { + break; + } + } + end = p + 1; + lineBreak = this.snapshot.substr(end, endIncludingLineBreak - end); + } + var result = new TextSnapshotLine(this, lineNumber, start, end, lineBreak); + return result; + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/textSnapshotLine.ts b/src/services/formatting/new/textSnapshotLine.ts new file mode 100644 index 00000000000..f0843b82e4e --- /dev/null +++ b/src/services/formatting/new/textSnapshotLine.ts @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export interface ITextSnapshotLine { + snapshot(): ITextSnapshot; + + start(): SnapshotPoint; + startPosition(): number; + + end(): SnapshotPoint; + endPosition(): number; + + endIncludingLineBreak(): SnapshotPoint; + endIncludingLineBreakPosition(): number; + + length(): number; + lineNumber(): number; + getText(): string; + } + + export class TextSnapshotLine implements ITextSnapshotLine { + constructor(private _snapshot: ITextSnapshot, private _lineNumber: number, private _start: number, private _end: number, private _lineBreak: string) { + } + + public snapshot() { + return this._snapshot; + } + + public start() { + return new SnapshotPoint(this._snapshot, this._start); + } + + public startPosition() { + return this._start; + } + + public end() { + return new SnapshotPoint(this._snapshot, this._end); + } + + public endPosition() { + return this._end; + } + + public endIncludingLineBreak() { + return new SnapshotPoint(this._snapshot, this._end + this._lineBreak.length); + } + + public endIncludingLineBreakPosition() { + return this._end + this._lineBreak.length; + } + + public length() { + return this._end - this._start; + } + + public lineNumber() { + return this._lineNumber; + } + + public getText(): string { + return this._snapshot.getText(TypeScript.TextSpan.fromBounds(this._start, this._end)); + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/tokenRange.ts b/src/services/formatting/new/tokenRange.ts new file mode 100644 index 00000000000..5022384eeb5 --- /dev/null +++ b/src/services/formatting/new/tokenRange.ts @@ -0,0 +1,152 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + +module ts.formatting { + export module Shared { + export interface ITokenAccess { + GetTokens(): SyntaxKind[]; + Contains(token: SyntaxKind): boolean; + } + + export class TokenRangeAccess implements ITokenAccess { + private tokens: SyntaxKind[]; + + constructor(from: SyntaxKind, to: SyntaxKind, except: SyntaxKind[]) { + this.tokens = []; + for (var token = from; token <= to; token++) { + if (except.indexOf(token) < 0) { + this.tokens.push(token); + } + } + } + + public GetTokens(): SyntaxKind[] { + return this.tokens; + } + + public Contains(token: SyntaxKind): boolean { + return this.tokens.indexOf(token) >= 0; + } + + + public toString(): string { + return "[tokenRangeStart=" + SyntaxKind[this.tokens[0]] + "," + + "tokenRangeEnd=" + SyntaxKind[this.tokens[this.tokens.length - 1]] + "]"; + } + } + + export class TokenValuesAccess implements ITokenAccess { + private tokens: SyntaxKind[]; + + constructor(tks: SyntaxKind[]) { + this.tokens = tks && tks.length ? tks : []; + } + + public GetTokens(): SyntaxKind[] { + return this.tokens; + } + + public Contains(token: SyntaxKind): boolean { + return this.tokens.indexOf(token) >= 0; + } + } + + export class TokenSingleValueAccess implements ITokenAccess { + constructor(public token: SyntaxKind) { + } + + public GetTokens(): SyntaxKind[] { + return [this.token]; + } + + public Contains(tokenValue: SyntaxKind): boolean { + return tokenValue == this.token; + } + + public toString(): string { + return "[singleTokenKind=" + SyntaxKind[this.token] + "]"; + } + } + + export class TokenAllAccess implements ITokenAccess { + public GetTokens(): SyntaxKind[] { + var result: SyntaxKind[] = []; + for (var token = SyntaxKind.FirstToken; token <= SyntaxKind.LastToken; token++) { + result.push(token); + } + return result; + } + + public Contains(tokenValue: SyntaxKind): boolean { + return true; + } + + public toString(): string { + return "[allTokens]"; + } + } + + export class TokenRange { + constructor(public tokenAccess: ITokenAccess) { + } + + static FromToken(token: SyntaxKind): TokenRange { + return new TokenRange(new TokenSingleValueAccess(token)); + } + + static FromTokens(tokens: SyntaxKind[]): TokenRange { + return new TokenRange(new TokenValuesAccess(tokens)); + } + + static FromRange(f: SyntaxKind, to: SyntaxKind, except: SyntaxKind[] = []): TokenRange { + return new TokenRange(new TokenRangeAccess(f, to, except)); + } + + static AllTokens(): TokenRange { + return new TokenRange(new TokenAllAccess()); + } + + public GetTokens(): SyntaxKind[] { + return this.tokenAccess.GetTokens(); + } + + public Contains(token: SyntaxKind): boolean { + return this.tokenAccess.Contains(token); + } + + public toString(): string { + return this.tokenAccess.toString(); + } + + static Any: TokenRange = TokenRange.AllTokens(); + static AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([SyntaxKind.MultiLineCommentTrivia])); + static Keywords = TokenRange.FromRange(SyntaxKind.FirstKeyword, SyntaxKind.LastKeyword); + static Operators = TokenRange.FromRange(SyntaxKind.SemicolonToken, SyntaxKind.SlashEqualsToken); + static BinaryOperators = TokenRange.FromRange(SyntaxKind.LessThanToken, SyntaxKind.SlashEqualsToken); + static BinaryKeywordOperators = TokenRange.FromTokens([SyntaxKind.InKeyword, SyntaxKind.InstanceOfKeyword]); + static ReservedKeywords = TokenRange.FromRange(SyntaxKind.FirstFutureReservedWord, SyntaxKind.LastFutureReservedWord); + static UnaryPrefixOperators = TokenRange.FromTokens([SyntaxKind.PlusPlusToken, SyntaxKind.MinusMinusToken, SyntaxKind.TildeToken, SyntaxKind.ExclamationToken]); + static UnaryPrefixExpressions = TokenRange.FromTokens([SyntaxKind.NumericLiteral, SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.OpenBracketToken, SyntaxKind.OpenBraceToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); + static UnaryPreincrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); + static UnaryPostincrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); + static UnaryPredecrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); + static UnaryPostdecrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); + static Comments = TokenRange.FromTokens([SyntaxKind.SingleLineCommentTrivia, SyntaxKind.MultiLineCommentTrivia]); + static TypeNames = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.NumberKeyword, SyntaxKind.StringKeyword, SyntaxKind.BooleanKeyword, SyntaxKind.VoidKeyword, SyntaxKind.AnyKeyword]); + } + } +} \ No newline at end of file diff --git a/src/services/formatting/new/tokenSpan.ts b/src/services/formatting/new/tokenSpan.ts new file mode 100644 index 00000000000..7194b0ce4fa --- /dev/null +++ b/src/services/formatting/new/tokenSpan.ts @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/// + + +module ts.formatting { + export class TokenSpan extends TypeScript.TextSpan { + constructor(public kind: SyntaxKind, start: number, length: number) { + super(start, length); + } + } +} \ No newline at end of file diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 79b238c893d..d7dc3f422fe 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -2,7 +2,7 @@ module ts.formatting { export module SmartIndenter { - export function getIndentation(position: number, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + export function getIndentation(position: number, sourceFile: SourceFile, options: EditorOptions): number { if (position > sourceFile.text.length) { return 0; // past EOF } @@ -44,7 +44,7 @@ module ts.formatting { indentationDelta = 0; } else { - indentationDelta = lineAtPosition !== currentStart.line ? options.indentSpaces : 0; + indentationDelta = lineAtPosition !== currentStart.line ? options.IndentSize : 0; } break; @@ -91,7 +91,44 @@ module ts.formatting { // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line if (nodeContentIsIndented(parent, current) && !parentAndChildShareLine) { - indentationDelta += options.indentSpaces; + indentationDelta += options.IndentSize; + } + + current = parent; + currentStart = parentStart; + parent = current.parent; + } + + return indentationDelta; + } + + export function getIndentationForNode(current: Node, currentStart: LineAndCharacter, indentationDelta: number, sourceFile: SourceFile, options: EditorOptions): number { + var parent: Node = current.parent; + var parentStart: LineAndCharacter; + + // walk upwards and collect indentations for pairs of parent-child nodes + // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' + while (parent) { + // check if current node is a list item - if yes, take indentation from it + var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation + indentationDelta; + } + + parentStart = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); + var parentAndChildShareLine = + parentStart.line === currentStart.line || + childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); + + // try to fetch actual indentation for current node from source text + var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation + indentationDelta; + } + + // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line + if (nodeContentIsIndented(parent, current) && !parentAndChildShareLine) { + indentationDelta += options.IndentSize; } current = parent; @@ -105,7 +142,7 @@ module ts.formatting { /* * Function returns -1 if indentation cannot be determined */ - function getActualIndentationForListItemBeforeComma(commaToken: Node, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + function getActualIndentationForListItemBeforeComma(commaToken: Node, sourceFile: SourceFile, options: EditorOptions): number { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it var commaItemInfo = findListItemInfo(commaToken); Debug.assert(commaItemInfo.listItemIndex > 0); @@ -121,7 +158,7 @@ module ts.formatting { currentLineAndChar: LineAndCharacter, parentAndChildShareLine: boolean, sourceFile: SourceFile, - options: TypeScript.FormattingOptions): number { + options: EditorOptions): number { // actual indentation is used for statements\declarations if one of cases below is true: // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually @@ -172,7 +209,7 @@ module ts.formatting { return candidate.end > position || !isCompletedNode(candidate, sourceFile); } - function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: Node, childStartLine: number, sourceFile: SourceFile): boolean { + export function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: Node, childStartLine: number, sourceFile: SourceFile): boolean { if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { var elseKeyword = findChildOfKind(parent, SyntaxKind.ElseKeyword, sourceFile); Debug.assert(elseKeyword); @@ -182,7 +219,7 @@ module ts.formatting { } } - function getActualIndentationForListItem(node: Node, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + function getActualIndentationForListItem(node: Node, sourceFile: SourceFile, options: EditorOptions): number { if (node.parent) { switch (node.parent.kind) { case SyntaxKind.TypeReference: @@ -226,7 +263,7 @@ module ts.formatting { } - function deriveActualIndentationFromList(list: Node[], index: number, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + function deriveActualIndentationFromList(list: Node[], index: number, sourceFile: SourceFile, options: EditorOptions): number { Debug.assert(index >= 0 && index < list.length); var node = list[index]; @@ -248,7 +285,7 @@ module ts.formatting { return -1; } - function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter: LineAndCharacter, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter: LineAndCharacter, sourceFile: SourceFile, options: EditorOptions): number { var lineStart = sourceFile.getPositionFromLineAndCharacter(lineAndCharacter.line, 1); var column = 0; for (var i = 0; i < lineAndCharacter.character; ++i) { @@ -258,7 +295,7 @@ module ts.formatting { } if (charCode === CharacterCodes.tab) { - column += options.spacesPerTab; + column += options.TabSize; } else { column++; @@ -268,7 +305,7 @@ module ts.formatting { return column; } - function nodeContentIsIndented(parent: Node, child: Node): boolean { + export function nodeContentIsIndented(parent: Node, child: Node): boolean { switch (parent.kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: diff --git a/src/services/formatting/stringUtilities.ts b/src/services/formatting/stringUtilities.ts new file mode 100644 index 00000000000..5f5d0b0fd4a --- /dev/null +++ b/src/services/formatting/stringUtilities.ts @@ -0,0 +1,52 @@ +module ts.formatting { + + var internedTabsIndentation: string[]; + var internedSpacesIndentation: string[]; + + export function getIndentationString(indentation: number, options: FormatCodeOptions): string { + if (!options.ConvertTabsToSpaces) { + var tabs = Math.floor(indentation / options.TabSize); + var spaces = indentation - tabs * options.TabSize; + + var tabString: string; + if (!internedTabsIndentation) { + internedTabsIndentation = []; + } + + if (internedTabsIndentation[tabs] === undefined) { + internedTabsIndentation[tabs] = tabString = repeat('\t', tabs); + } + else { + tabString = internedTabsIndentation[tabs]; + } + + return spaces ? tabString + repeat(" ", spaces) : tabString; + } + else { + var spacesString: string; + var index = indentation / options.IndentSize; + if (!internedSpacesIndentation) { + internedSpacesIndentation = []; + } + + if (internedSpacesIndentation[index] === undefined) { + internedSpacesIndentation[index] = spacesString = repeat(" ", indentation);; + } + else { + spacesString = internedSpacesIndentation[index]; + } + + var remainder = indentation % options.IndentSize; + return remainder ? spacesString + repeat(" ", remainder) : spacesString; + } + + function repeat(value: string, count: number): string { + var s = ""; + for (var i = 0; i < count; ++i) { + s += value; + } + + return s; + } + } +} \ No newline at end of file diff --git a/src/services/services.ts b/src/services/services.ts index 618026408fe..ab62b5fecae 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -13,6 +13,7 @@ /// /// /// +/// /// /// @@ -640,6 +641,7 @@ module ts { public text: string; public getLineAndCharacterFromPosition(position: number): { line: number; character: number } { return null; } public getPositionFromLineAndCharacter(line: number, character: number): number { return -1; } + public getLineStarts(): number[] { return undefined; } public amdDependencies: string[]; public referencedFiles: FileReference[]; public syntacticErrors: Diagnostic[]; @@ -975,6 +977,15 @@ module ts { ConvertTabsToSpaces: boolean; } + export function copyEditorOptions(o: EditorOptions): EditorOptions { + return { + IndentSize: o.IndentSize, + TabSize: o.TabSize, + NewLineCharacter: o.NewLineCharacter, + ConvertTabsToSpaces: o.ConvertTabsToSpaces + }; + } + export interface FormatCodeOptions extends EditorOptions { InsertSpaceAfterCommaDelimiter: boolean; InsertSpaceAfterSemicolonInForStatements: boolean; @@ -986,6 +997,23 @@ module ts { PlaceOpenBraceOnNewLineForControlBlocks: boolean; } + export function copyFormatCodeOptions(o: FormatCodeOptions): FormatCodeOptions { + return { + IndentSize: o.IndentSize, + TabSize: o.TabSize, + NewLineCharacter: o.NewLineCharacter, + ConvertTabsToSpaces: o.ConvertTabsToSpaces, + InsertSpaceAfterCommaDelimiter: o.InsertSpaceAfterCommaDelimiter, + InsertSpaceAfterSemicolonInForStatements: o.InsertSpaceAfterSemicolonInForStatements, + InsertSpaceBeforeAndAfterBinaryOperators: o.InsertSpaceBeforeAndAfterBinaryOperators, + InsertSpaceAfterKeywordsInControlFlowStatements: o.InsertSpaceAfterKeywordsInControlFlowStatements, + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: o.InsertSpaceAfterFunctionKeywordForAnonymousFunctions, + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: o.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis, + PlaceOpenBraceOnNewLineForFunctions: o.PlaceOpenBraceOnNewLineForFunctions, + PlaceOpenBraceOnNewLineForControlBlocks: o.PlaceOpenBraceOnNewLineForControlBlocks + }; + } + export interface DefinitionInfo { fileName: string; textSpan: TypeScript.TextSpan; @@ -1996,6 +2024,7 @@ module ts { export function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService { var syntaxTreeCache: SyntaxTreeCache = new SyntaxTreeCache(host); var formattingRulesProvider: TypeScript.Services.Formatting.RulesProvider; + var ruleProvider: ts.formatting.RulesProvider; var hostCache: HostCache; // A cache of all the information about the files on the host side. var program: Program; @@ -2026,6 +2055,16 @@ module ts { return fullTypeCheckChecker_doNotAccessDirectly || (fullTypeCheckChecker_doNotAccessDirectly = program.getTypeChecker(/*fullTypeCheck*/ true)); } + function getRuleProvider(options: FormatCodeOptions) { + // Ensure rules are initialized and up to date wrt to formatting options + if (!ruleProvider) { + ruleProvider = new ts.formatting.RulesProvider(host); + } + + ruleProvider.ensureUpToDate(options); + return ruleProvider; + } + function createCompilerHost(): CompilerHost { return { getSourceFile: (filename, languageVersion) => { @@ -4968,7 +5007,7 @@ module ts { var sourceFile = getCurrentSourceFile(filename); var options = new TypeScript.FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter) - return formatting.SmartIndenter.getIndentation(position, sourceFile, options); + return formatting.SmartIndenter.getIndentation(position, sourceFile, copyEditorOptions(editorOptions)); } function getFormattingManager(filename: string, options: FormatCodeOptions) { @@ -4994,6 +5033,10 @@ module ts { function getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[] { fileName = TypeScript.switchToForwardSlashes(fileName); + var options = copyFormatCodeOptions(options); + var sourceFile = getCurrentSourceFile(fileName); + var edits = formatting.formatSelection(start, end, sourceFile, getRuleProvider(options), options); + return edits; var manager = getFormattingManager(fileName, options); return manager.formatSelection(start, end); @@ -5002,6 +5045,11 @@ module ts { function getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[] { fileName = TypeScript.switchToForwardSlashes(fileName); + var sourceFile = getCurrentSourceFile(fileName); + var options = copyFormatCodeOptions(options) + var edits = formatting.formatDocument(sourceFile, getRuleProvider(options), options); + return edits; + var manager = getFormattingManager(fileName, options); return manager.formatDocument(); } @@ -5011,13 +5059,25 @@ module ts { var manager = getFormattingManager(fileName, options); + var sourceFile = getCurrentSourceFile(fileName); + var options = copyFormatCodeOptions(options); + if (key === "}") { + var edits = formatting.formatOnClosingCurly(position, sourceFile, getRuleProvider(options), options); + return edits; + return manager.formatOnClosingCurlyBrace(position); } else if (key === ";") { + var edits = formatting.formatOnSemicolon(position, sourceFile, getRuleProvider(options), options); + return edits; + return manager.formatOnSemicolon(position); } else if (key === "\n") { + var edits = formatting.formatOnEnter(position, sourceFile, getRuleProvider(options), options); + return edits; + return manager.formatOnEnter(position); } diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 4ceb20fdcee..6965685884c 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -233,6 +233,10 @@ module ts { return n.kind >= SyntaxKind.FirstToken && n.kind <= SyntaxKind.LastToken; } + export function isComment(kind: SyntaxKind): boolean { + return kind === SyntaxKind.SingleLineCommentTrivia || kind === SyntaxKind.MultiLineCommentTrivia; + } + function isKeyword(n: Node): boolean { return n.kind >= SyntaxKind.FirstKeyword && n.kind <= SyntaxKind.LastKeyword; } From 40358a1e65d3d67edb62d8aa09547bfeda54d990 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 14 Oct 2014 16:48:28 -0700 Subject: [PATCH 002/154] fix issues in formattingContext - 35 failing tests so far --- src/services/formatting/format.ts | 1 + .../formatting/new/formattingContext.ts | 26 +++++++------- src/services/formatting/new/rules.ts | 34 ++++++++++++++++--- 3 files changed, 42 insertions(+), 19 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 72c55332a3c..6ad5384be0f 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -226,6 +226,7 @@ module ts.formatting { while (currentTokenInfo.token && node.end >= currentTokenInfo.token.end) { currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + childContextNode = node; } /// Local functions diff --git a/src/services/formatting/new/formattingContext.ts b/src/services/formatting/new/formattingContext.ts index ffac516690b..bd146397bbf 100644 --- a/src/services/formatting/new/formattingContext.ts +++ b/src/services/formatting/new/formattingContext.ts @@ -17,17 +17,17 @@ module ts.formatting { export class FormattingContext { - public currentTokenSpan: TextRangeWithKind = null; - public nextTokenSpan: TextRangeWithKind = null; - public contextNode: Node = null; - public currentTokenParent: Node = null; - public nextTokenParent: Node = null; + public currentTokenSpan: TextRangeWithKind; + public nextTokenSpan: TextRangeWithKind; + public contextNode: Node; + public currentTokenParent: Node; + public nextTokenParent: Node; - private contextNodeAllOnSameLine: boolean = null; - private nextNodeAllOnSameLine: boolean = null; - private tokensAreOnSameLine: boolean = null; - private contextNodeBlockIsOnOneLine: boolean = null; - private nextNodeBlockIsOnOneLine: boolean = null; + private contextNodeAllOnSameLine: boolean; + private nextNodeAllOnSameLine: boolean; + private tokensAreOnSameLine: boolean; + private contextNodeBlockIsOnOneLine: boolean; + private nextNodeBlockIsOnOneLine: boolean; constructor(private sourceFile: SourceFile, public formattingRequestKind: FormattingRequestKind) { } @@ -98,9 +98,7 @@ module ts.formatting { return this.nextNodeBlockIsOnOneLine; } - public NodeIsOnOneLine(node: Node): boolean { - return; - + private NodeIsOnOneLine(node: Node): boolean { var startLine = this.sourceFile.getLineAndCharacterFromPosition(node.getStart(this.sourceFile)).line; var endLine = this.sourceFile.getLineAndCharacterFromPosition(node.getEnd()).line; //var startLine = this.snapshot.getLineNumberFromPosition(node.start()); @@ -111,7 +109,7 @@ module ts.formatting { // Now we know we have a block (or a fake block represented by some other kind of node with an open and close brace as children). // IMPORTANT!!! This relies on the invariant that IsBlockContext must return true ONLY for nodes with open and close braces as immediate children - public BlockIsOnOneLine(node: Node): boolean { + private BlockIsOnOneLine(node: Node): boolean { var openBrace = findChildOfKind(node, SyntaxKind.OpenBraceToken, this.sourceFile); var closeBrace = findChildOfKind(node, SyntaxKind.CloseBraceToken, this.sourceFile); if (openBrace && closeBrace) { diff --git a/src/services/formatting/new/rules.ts b/src/services/formatting/new/rules.ts index aef884331b7..77030fe7a70 100644 --- a/src/services/formatting/new/rules.ts +++ b/src/services/formatting/new/rules.ts @@ -559,6 +559,11 @@ module ts.formatting { case SyntaxKind.Block: case SyntaxKind.SwitchStatement: case SyntaxKind.ObjectLiteral: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.FunctionBlock: + case SyntaxKind.ModuleBlock: return true; } @@ -668,15 +673,34 @@ module ts.formatting { return context.contextNode.kind === SyntaxKind.TypeLiteral;// && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; } - static IsTypeArgumentOrParameter(tokenKind: SyntaxKind, parentKind: SyntaxKind): boolean { - return; - //return ((tokenKind === SyntaxKind.LessThanToken || tokenKind === SyntaxKind.GreaterThanToken) && + static IsTypeArgumentOrParameter(token: TextRangeWithKind, parent: Node): boolean { + if (token.kind !== SyntaxKind.LessThanToken && token.kind !== SyntaxKind.GreaterThanToken) { + return false; + } + switch (parent.kind) { + case SyntaxKind.TypeReference: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.Method: + case SyntaxKind.CallSignature: + case SyntaxKind.ConstructSignature: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + return true; + default: + return false; + + } + //return ((token.kind === SyntaxKind.LessThanToken || token.kind === SyntaxKind.GreaterThanToken) && // (parentKind === SyntaxKind.TypeParameterList || parentKind === SyntaxKind.TypeArgumentList)); } static IsTypeArgumentOrParameterContext(context: FormattingContext): boolean { - return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan.kind, context.currentTokenParent.kind) || - Rules.IsTypeArgumentOrParameter(context.nextTokenSpan.kind, context.nextTokenParent.kind); + return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan, context.currentTokenParent) || + Rules.IsTypeArgumentOrParameter(context.nextTokenSpan, context.nextTokenParent); } static IsVoidOpContext(context: FormattingContext): boolean { From b9e5384f105beaf0b95f8452ae1684d4d0b03db2 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 14 Oct 2014 17:19:34 -0700 Subject: [PATCH 003/154] do not check Missing --- src/services/formatting/format.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 6ad5384be0f..cd8167bb85b 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -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); } } From 27cb5b0c18ac5ace82b35f5f9a00ec04a7bbf705 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 14 Oct 2014 18:39:51 -0700 Subject: [PATCH 004/154] temporary disable smart indentation for type literals, fix computation for end line position --- src/services/formatting/format.ts | 14 ++++++++------ src/services/formatting/smartIndenter.ts | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index cd8167bb85b..c237cad5510 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -58,8 +58,8 @@ module ts.formatting { function getEndLinePosition(line: number, sourceFile: SourceFile): number { var lineStarts = sourceFile.getLineStarts(); if (line === lineStarts.length - 1) { - // last line - return EOF - - return sourceFile.text.length - lineStarts[line]; + // last line - return EOF + return sourceFile.text.length - 1; } else { // current line start @@ -351,7 +351,9 @@ module ts.formatting { processTrivia(currentTokenInfo.leadingTrivia, parent, contextNode, indentation); } - processRange(currentTokenInfo.token, parent, contextNode, indentation); + if (rangeContainsRange(originalRange, currentTokenInfo.token)) { + processRange(currentTokenInfo.token, parent, contextNode, indentation); + } if (currentTokenInfo.trailingTrivia) { processTrivia(currentTokenInfo.trailingTrivia, parent, contextNode, indentation); @@ -363,7 +365,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)) { + if (isComment(triviaItem.kind) && rangeContainsRange(originalRange, triviaItem)) { processRange(triviaItem, parent, contextNode, currentIndentation); } } @@ -371,8 +373,8 @@ module ts.formatting { function processRange(range: TextRangeWithKind, parent: Node, contextNode: Node, indentation: number) { var rangeStart = getNonAdjustedLineAndCharacterFromPosition(range.pos, sourceFile); - if (rangeContainsRange(originalRange, range)) { - var indentToken = false; + if (rangeContainsRange(originalRange, range)) { + var indentToken = true; if (!previousRange) { var originalStart = getNonAdjustedLineAndCharacterFromPosition(originalRange.pos, sourceFile); // TODO: implement diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index d7dc3f422fe..8fa1fc1928e 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -229,8 +229,8 @@ module ts.formatting { break; case SyntaxKind.ObjectLiteral: return getActualIndentationFromList((node.parent).properties); - case SyntaxKind.TypeLiteral: - return getActualIndentationFromList((node.parent).members); + //case SyntaxKind.TypeLiteral: + // return getActualIndentationFromList((node.parent).members); case SyntaxKind.ArrayLiteral: return getActualIndentationFromList((node.parent).elements); case SyntaxKind.FunctionDeclaration: From c0466b636fd515202a2a9a15f2783cf91eeed83b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 15 Oct 2014 14:54:49 -0700 Subject: [PATCH 005/154] fix a few issues in rules --- src/compiler/types.ts | 6 ++- src/services/formatting/format.ts | 45 +++++++++++-------- src/services/formatting/new/rules.ts | 10 +++-- src/services/formatting/new/tokenRange.ts | 4 +- .../formattingOnTabAfterCloseCurly.ts | 4 +- 5 files changed, 41 insertions(+), 28 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index cab45aadbe6..6e01a7b2e36 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -231,7 +231,11 @@ module ts { FirstToken = EndOfFileToken, LastToken = StringKeyword, FirstTriviaToken = SingleLineCommentTrivia, - LastTriviaToken = WhitespaceTrivia + LastTriviaToken = WhitespaceTrivia, + FirstOperator = SemicolonToken, + LastOperator = CaretEqualsToken, + FirstBinaryOperator = LessThanToken, + LastBinaryOperator = CaretEqualsToken } export enum NodeFlags { diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index c237cad5510..9c271de47a8 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -189,7 +189,7 @@ module ts.formatting { var previousParent: Node; var previousRangeStartLine: number; - var lastTriviaWasNewLine = false; + var lastTriviaWasNewLine = true; var edits: TextChange[] = []; // advance the scaner @@ -208,7 +208,7 @@ module ts.formatting { return; } - if (!rangeContainsRange(node, currentTokenInfo)) { + if (!rangeContainsRange(node, currentTokenInfo.token)) { // node and its descendents don't contain current token from the scanner - skip it return; } @@ -351,14 +351,31 @@ module ts.formatting { processTrivia(currentTokenInfo.leadingTrivia, parent, contextNode, indentation); } + + var indentToken: boolean; if (rangeContainsRange(originalRange, currentTokenInfo.token)) { - processRange(currentTokenInfo.token, parent, contextNode, indentation); + indentToken = processRange(currentTokenInfo.token, parent, contextNode, indentation); } if (currentTokenInfo.trailingTrivia) { processTrivia(currentTokenInfo.trailingTrivia, parent, contextNode, indentation); } + if (lastTriviaWasNewLine && indentToken) { + + // TODO: remove + var tokenRange = getNonAdjustedLineAndCharacterFromPosition(currentTokenInfo.token.pos, sourceFile); + + // TODO: handle indentation in multiline comments + var currentIndentation = tokenRange.character; + if (indentation !== currentIndentation) { + var indentationString = getIndentationString(indentation, options); + var startLinePosition = getStartPositionOfLine(tokenRange.line, sourceFile); + recordReplace(startLinePosition, currentIndentation, indentationString); + } + } + + return fetchNextTokenInfo(); } @@ -371,10 +388,11 @@ module ts.formatting { } } - function processRange(range: TextRangeWithKind, parent: Node, contextNode: Node, indentation: number) { + function processRange(range: TextRangeWithKind, parent: Node, contextNode: Node, indentation: number): boolean { var rangeStart = getNonAdjustedLineAndCharacterFromPosition(range.pos, sourceFile); - if (rangeContainsRange(originalRange, range)) { - var indentToken = true; + var indentToken = true; + + if (rangeContainsRange(originalRange, range)) { if (!previousRange) { var originalStart = getNonAdjustedLineAndCharacterFromPosition(originalRange.pos, sourceFile); // TODO: implement @@ -389,23 +407,12 @@ module ts.formatting { processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode) indentToken = rangeStart.line !== previousRangeStartLine; } - - if (lastTriviaWasNewLine && indentToken) { - // TODO: handle indentation in multiline comments - if (!isTrivia(range.kind)) { - var currentIndentation = rangeStart.character; - if (indentation !== currentIndentation) { - var indentationString = getIndentationString(indentation, options); - var startLinePosition = getStartPositionOfLine(rangeStart.line, sourceFile); - recordReplace(startLinePosition, currentIndentation, indentationString); - } - } - } } - previousRange = range; previousParent = parent; previousRangeStartLine = rangeStart.line; + + return indentToken; } function processPair(currentItem: TextRangeWithKind, diff --git a/src/services/formatting/new/rules.ts b/src/services/formatting/new/rules.ts index 77030fe7a70..e7fe96ca0a6 100644 --- a/src/services/formatting/new/rules.ts +++ b/src/services/formatting/new/rules.ts @@ -448,6 +448,7 @@ module ts.formatting { switch (context.contextNode.kind) { case SyntaxKind.BinaryExpression: + case SyntaxKind.ConditionalExpression: return true; //// binary expressions //case SyntaxKind.AssignmentExpression: @@ -492,8 +493,10 @@ module ts.formatting { case SyntaxKind.ImportDeclaration: // equal in var a = 0; case SyntaxKind.VariableDeclaration: - // TODO: - //case SyntaxKind.EqualsValueClause: + // equal in p = 0; + case SyntaxKind.Parameter: + case SyntaxKind.EnumMember: + case SyntaxKind.Property: return context.currentTokenSpan.kind === SyntaxKind.EqualsToken || context.nextTokenSpan.kind === SyntaxKind.EqualsToken; // "in" keyword in for (var x in []) { } case SyntaxKind.ForInStatement: @@ -704,8 +707,7 @@ module ts.formatting { } static IsVoidOpContext(context: FormattingContext): boolean { - return; - //return context.currentTokenSpan.token.kind === SyntaxKind.VoidKeyword && context.currentTokenParent.kind() === SyntaxKind.VoidExpression; + return context.currentTokenSpan.kind === SyntaxKind.VoidKeyword && context.currentTokenParent.kind === SyntaxKind.PrefixOperator; } } } \ No newline at end of file diff --git a/src/services/formatting/new/tokenRange.ts b/src/services/formatting/new/tokenRange.ts index 5022384eeb5..06c7dfbe174 100644 --- a/src/services/formatting/new/tokenRange.ts +++ b/src/services/formatting/new/tokenRange.ts @@ -135,8 +135,8 @@ module ts.formatting { static Any: TokenRange = TokenRange.AllTokens(); static AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([SyntaxKind.MultiLineCommentTrivia])); static Keywords = TokenRange.FromRange(SyntaxKind.FirstKeyword, SyntaxKind.LastKeyword); - static Operators = TokenRange.FromRange(SyntaxKind.SemicolonToken, SyntaxKind.SlashEqualsToken); - static BinaryOperators = TokenRange.FromRange(SyntaxKind.LessThanToken, SyntaxKind.SlashEqualsToken); + static Operators = TokenRange.FromRange(SyntaxKind.FirstOperator, SyntaxKind.LastOperator); + static BinaryOperators = TokenRange.FromRange(SyntaxKind.FirstBinaryOperator, SyntaxKind.LastBinaryOperator); static BinaryKeywordOperators = TokenRange.FromTokens([SyntaxKind.InKeyword, SyntaxKind.InstanceOfKeyword]); static ReservedKeywords = TokenRange.FromRange(SyntaxKind.FirstFutureReservedWord, SyntaxKind.LastFutureReservedWord); static UnaryPrefixOperators = TokenRange.FromTokens([SyntaxKind.PlusPlusToken, SyntaxKind.MinusMinusToken, SyntaxKind.TildeToken, SyntaxKind.ExclamationToken]); diff --git a/tests/cases/fourslash/formattingOnTabAfterCloseCurly.ts b/tests/cases/fourslash/formattingOnTabAfterCloseCurly.ts index 3b6d60ef45b..2e7c344d225 100644 --- a/tests/cases/fourslash/formattingOnTabAfterCloseCurly.ts +++ b/tests/cases/fourslash/formattingOnTabAfterCloseCurly.ts @@ -4,7 +4,7 @@ //// export enum NodeType {/*2*/ //// Error,/*3*/ //// Comment,/*4*/ -//// } /*5*/ +//// } /*5*/ //// export enum foob/*6*/ //// { //// Blah=1, Bleah=2/*7*/ @@ -25,7 +25,7 @@ verify.currentLineContentIs(" }"); goTo.marker("6"); verify.currentLineContentIs(" export enum foob {"); goTo.marker("7"); -verify.currentLineContentIs(" Blah= 1, Bleah= 2"); +verify.currentLineContentIs(" Blah = 1, Bleah = 2"); goTo.marker("8"); verify.currentLineContentIs(" }"); goTo.marker("9"); From 62f464e8bcbfcd923fc2e205446b940e85efd8d1 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 15 Oct 2014 15:44:01 -0700 Subject: [PATCH 006/154] update baseline --- .../fourslash/formattingFatArrowFunctions.ts | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/cases/fourslash/formattingFatArrowFunctions.ts b/tests/cases/fourslash/formattingFatArrowFunctions.ts index 699e0b53157..73463852a67 100644 --- a/tests/cases/fourslash/formattingFatArrowFunctions.ts +++ b/tests/cases/fourslash/formattingFatArrowFunctions.ts @@ -120,13 +120,13 @@ verify.currentLineContentIs("(arg) => 2;"); goTo.marker("3"); verify.currentLineContentIs("arg => 2;"); goTo.marker("4"); -verify.currentLineContentIs("(arg = 1) => 3;"); +verify.currentLineContentIs("(arg = 1) => 3;"); goTo.marker("5"); verify.currentLineContentIs("(arg?) => 4;"); goTo.marker("6"); verify.currentLineContentIs("(arg: number) => 5;"); goTo.marker("7"); -verify.currentLineContentIs("(arg: number = 0) => 6;"); +verify.currentLineContentIs("(arg: number = 0) => 6;"); goTo.marker("8"); verify.currentLineContentIs("(arg?: number) => 7;"); goTo.marker("9"); @@ -134,13 +134,13 @@ verify.currentLineContentIs("(...arg: number[]) => 8;"); goTo.marker("10"); verify.currentLineContentIs("(arg1, arg2) => 12;"); goTo.marker("11"); -verify.currentLineContentIs("(arg1 = 1, arg2 = 3) => 13;"); +verify.currentLineContentIs("(arg1 = 1, arg2 = 3) => 13;"); goTo.marker("12"); verify.currentLineContentIs("(arg1?, arg2?) => 14;"); goTo.marker("13"); verify.currentLineContentIs("(arg1: number, arg2: number) => 15;"); goTo.marker("14"); -verify.currentLineContentIs("(arg1: number = 0, arg2: number = 1) => 16;"); +verify.currentLineContentIs("(arg1: number = 0, arg2: number = 1) => 16;"); goTo.marker("15"); verify.currentLineContentIs("(arg1?: number, arg2?: number) => 17;"); goTo.marker("16"); @@ -152,13 +152,13 @@ verify.currentLineContentIs("(() => 21);"); goTo.marker("19"); verify.currentLineContentIs("((arg) => 22);"); goTo.marker("20"); -verify.currentLineContentIs("((arg = 1) => 23);"); +verify.currentLineContentIs("((arg = 1) => 23);"); goTo.marker("21"); verify.currentLineContentIs("((arg?) => 24);"); goTo.marker("22"); verify.currentLineContentIs("((arg: number) => 25);"); goTo.marker("23"); -verify.currentLineContentIs("((arg: number = 0) => 26);"); +verify.currentLineContentIs("((arg: number = 0) => 26);"); goTo.marker("24"); verify.currentLineContentIs("((arg?: number) => 27);"); goTo.marker("25"); @@ -170,7 +170,7 @@ verify.currentLineContentIs("false ? () => 41 : null;"); goTo.marker("28"); verify.currentLineContentIs("false ? (arg) => 42 : null;"); goTo.marker("29"); -verify.currentLineContentIs("false ? (arg = 1) => 43 : null;"); +verify.currentLineContentIs("false ? (arg = 1) => 43 : null;"); goTo.marker("30"); verify.currentLineContentIs("false ? (arg?) => 44 : null;"); goTo.marker("31"); @@ -178,7 +178,7 @@ verify.currentLineContentIs("false ? (arg: number) => 45 : null;"); goTo.marker("32"); verify.currentLineContentIs("false ? (arg?: number) => 46 : null;"); goTo.marker("33"); -verify.currentLineContentIs("false ? (arg?: number = 0) => 47 : null;"); +verify.currentLineContentIs("false ? (arg?: number = 0) => 47 : null;"); goTo.marker("34"); verify.currentLineContentIs("false ? (...arg: number[]) => 48 : null;"); goTo.marker("35"); @@ -186,7 +186,7 @@ verify.currentLineContentIs("false ? (() => 51) : null;"); goTo.marker("36"); verify.currentLineContentIs("false ? ((arg) => 52) : null;"); goTo.marker("37"); -verify.currentLineContentIs("false ? ((arg = 1) => 53) : null;"); +verify.currentLineContentIs("false ? ((arg = 1) => 53) : null;"); goTo.marker("38"); verify.currentLineContentIs("false ? ((arg?) => 54) : null;"); goTo.marker("39"); @@ -194,7 +194,7 @@ verify.currentLineContentIs("false ? ((arg: number) => 55) : null;"); goTo.marker("40"); verify.currentLineContentIs("false ? ((arg?: number) => 56) : null;"); goTo.marker("41"); -verify.currentLineContentIs("false ? ((arg?: number = 0) => 57) : null;"); +verify.currentLineContentIs("false ? ((arg?: number = 0) => 57) : null;"); goTo.marker("42"); verify.currentLineContentIs("false ? ((...arg: number[]) => 58) : null;"); goTo.marker("43"); @@ -202,7 +202,7 @@ verify.currentLineContentIs("false ? null : () => 61;"); goTo.marker("44"); verify.currentLineContentIs("false ? null : (arg) => 62;"); goTo.marker("45"); -verify.currentLineContentIs("false ? null : (arg = 1) => 63;"); +verify.currentLineContentIs("false ? null : (arg = 1) => 63;"); goTo.marker("46"); verify.currentLineContentIs("false ? null : (arg?) => 64;"); goTo.marker("47"); @@ -210,7 +210,7 @@ verify.currentLineContentIs("false ? null : (arg: number) => 65;"); goTo.marker("48"); verify.currentLineContentIs("false ? null : (arg?: number) => 66;"); goTo.marker("49"); -verify.currentLineContentIs("false ? null : (arg?: number = 0) => 67;"); +verify.currentLineContentIs("false ? null : (arg?: number = 0) => 67;"); goTo.marker("50"); verify.currentLineContentIs("false ? null : (...arg: number[]) => 68;"); goTo.marker("51"); @@ -220,13 +220,13 @@ verify.currentLineContentIs("((a?) => { return a; }) ? (b) => (c) => 81 : (c) => goTo.marker("53"); verify.currentLineContentIs("((arg) => 90) instanceof Function;"); goTo.marker("54"); -verify.currentLineContentIs("((arg = 1) => 91) instanceof Function;"); +verify.currentLineContentIs("((arg = 1) => 91) instanceof Function;"); goTo.marker("55"); verify.currentLineContentIs("((arg?) => 92) instanceof Function;"); goTo.marker("56"); verify.currentLineContentIs("((arg: number) => 93) instanceof Function;"); goTo.marker("57"); -verify.currentLineContentIs("((arg: number = 1) => 94) instanceof Function;"); +verify.currentLineContentIs("((arg: number = 1) => 94) instanceof Function;"); goTo.marker("58"); verify.currentLineContentIs("((arg?: number) => 95) instanceof Function;"); goTo.marker("59"); @@ -237,13 +237,13 @@ verify.currentLineContentIs("'' + ((arg) => 100);"); goTo.marker("61"); verify.currentLineContentIs("((arg) => 0) + '' + ((arg) => 101);"); goTo.marker("62"); -verify.currentLineContentIs("((arg = 1) => 0) + '' + ((arg = 2) => 102);"); +verify.currentLineContentIs("((arg = 1) => 0) + '' + ((arg = 2) => 102);"); goTo.marker("63"); verify.currentLineContentIs("((arg?) => 0) + '' + ((arg?) => 103);"); goTo.marker("64"); verify.currentLineContentIs("((arg: number) => 0) + '' + ((arg: number) => 104);"); goTo.marker("65"); -verify.currentLineContentIs("((arg: number = 1) => 0) + '' + ((arg: number = 2) => 105);"); +verify.currentLineContentIs("((arg: number = 1) => 0) + '' + ((arg: number = 2) => 105);"); goTo.marker("66"); verify.currentLineContentIs("((arg?: number) => 0) + '' + ((arg?: number) => 106);"); goTo.marker("67"); @@ -273,17 +273,17 @@ verify.currentLineContentIs(" (a, b?) => 114,"); goTo.marker("79"); verify.currentLineContentIs(" (a: number) => 115,"); goTo.marker("80"); -verify.currentLineContentIs(" (a: number = 0) => 116,"); +verify.currentLineContentIs(" (a: number = 0) => 116,"); goTo.marker("81"); -verify.currentLineContentIs(" (a = 0) => 117,"); +verify.currentLineContentIs(" (a = 0) => 117,"); goTo.marker("82"); -verify.currentLineContentIs(" (a: number = 0) => 118,"); +verify.currentLineContentIs(" (a: number = 0) => 118,"); goTo.marker("83"); verify.currentLineContentIs(" (a?, b?: number) => 118,"); goTo.marker("84"); verify.currentLineContentIs(" (...a: number[]) => 119,"); goTo.marker("85"); -verify.currentLineContentIs(" (a, b = 0, ...c: number[]) => 120,"); +verify.currentLineContentIs(" (a, b = 0, ...c: number[]) => 120,"); goTo.marker("86"); verify.currentLineContentIs(" (a) => (b) => (c) => 121,"); goTo.marker("87"); From c211f971696b1ead0e76bf2715b3fed1da4f400f Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 15 Oct 2014 16:53:59 -0700 Subject: [PATCH 007/154] Adjust rules to handle interfaces correctly - 19 failing tests --- src/services/formatting/format.ts | 54 +++++++++++++++++++++++----- src/services/formatting/new/rules.ts | 1 + 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 9c271de47a8..7b74dc97513 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -363,22 +363,60 @@ module ts.formatting { if (lastTriviaWasNewLine && indentToken) { - // TODO: remove - var tokenRange = getNonAdjustedLineAndCharacterFromPosition(currentTokenInfo.token.pos, sourceFile); + var indentNextTokenOrTrivia = true; - // TODO: handle indentation in multiline comments - var currentIndentation = tokenRange.character; - if (indentation !== currentIndentation) { - var indentationString = getIndentationString(indentation, options); - var startLinePosition = getStartPositionOfLine(tokenRange.line, sourceFile); - recordReplace(startLinePosition, currentIndentation, indentationString); + if (currentTokenInfo.leadingTrivia) { + for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { + var triviaItem = currentTokenInfo.leadingTrivia[i]; + if (rangeContainsRange(originalRange, triviaItem)) { + switch (triviaItem.kind) { + case SyntaxKind.MultiLineCommentTrivia: + // TODO + indentNextTokenOrTrivia = false; + break; + case SyntaxKind.SingleLineCommentTrivia: + if (indentNextTokenOrTrivia) { + insertIndentation(triviaItem.pos, indentation, sourceFile); + indentNextTokenOrTrivia = false; + } + break; + case SyntaxKind.WhitespaceTrivia: + // TODO + break; + case SyntaxKind.NewLineTrivia: + indentNextTokenOrTrivia = true; + break; + } + } + } } + + insertIndentation(currentTokenInfo.token.pos, indentation, sourceFile); + //// TODO: remove + //var tokenRange = getNonAdjustedLineAndCharacterFromPosition(currentTokenInfo.token.pos, sourceFile); + + //// TODO: handle indentation in multiline comments + //var currentIndentation = tokenRange.character; + //if (indentation !== currentIndentation) { + // var indentationString = getIndentationString(indentation, options); + // var startLinePosition = getStartPositionOfLine(tokenRange.line, sourceFile); + // recordReplace(startLinePosition, currentIndentation, indentationString); + //} } return fetchNextTokenInfo(); } + function insertIndentation(pos: number, indentation: number, sourceFile: SourceFile): void { + var tokenRange = getNonAdjustedLineAndCharacterFromPosition(pos, sourceFile); + if (indentation !== tokenRange.character) { + var indentationString = getIndentationString(indentation, options); + var startLinePosition = getStartPositionOfLine(tokenRange.line, sourceFile); + recordReplace(startLinePosition, tokenRange.character, indentationString); + } + } + 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]; diff --git a/src/services/formatting/new/rules.ts b/src/services/formatting/new/rules.ts index e7fe96ca0a6..a283c2a63b9 100644 --- a/src/services/formatting/new/rules.ts +++ b/src/services/formatting/new/rules.ts @@ -602,6 +602,7 @@ module ts.formatting { static NodeIsTypeScriptDeclWithBlockContext(node: Node): boolean { switch (node.kind) { case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.TypeLiteral: case SyntaxKind.ModuleDeclaration: From 4e8437718773c2dc2a031b4a9e57ea602ed53a34 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 17 Oct 2014 13:22:39 -0700 Subject: [PATCH 008/154] multiline comments support --- src/services/formatting/format.ts | 69 ++++++++++++++++++++-- src/services/formatting/smartIndenter.ts | 51 ++++------------ src/services/formatting/stringUtilities.ts | 12 ++-- 3 files changed, 80 insertions(+), 52 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 7b74dc97513..9962b99dcb0 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -362,21 +362,19 @@ module ts.formatting { } if (lastTriviaWasNewLine && indentToken) { - var indentNextTokenOrTrivia = true; - if (currentTokenInfo.leadingTrivia) { for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { var triviaItem = currentTokenInfo.leadingTrivia[i]; if (rangeContainsRange(originalRange, triviaItem)) { switch (triviaItem.kind) { case SyntaxKind.MultiLineCommentTrivia: - // TODO + indentMultilineComment(triviaItem, indentation, /*firstLineIsIndented*/ !indentNextTokenOrTrivia); indentNextTokenOrTrivia = false; break; case SyntaxKind.SingleLineCommentTrivia: if (indentNextTokenOrTrivia) { - insertIndentation(triviaItem.pos, indentation, sourceFile); + insertIndentation(triviaItem.pos, indentation); indentNextTokenOrTrivia = false; } break; @@ -391,7 +389,7 @@ module ts.formatting { } } - insertIndentation(currentTokenInfo.token.pos, indentation, sourceFile); + insertIndentation(currentTokenInfo.token.pos, indentation); //// TODO: remove //var tokenRange = getNonAdjustedLineAndCharacterFromPosition(currentTokenInfo.token.pos, sourceFile); @@ -408,7 +406,7 @@ module ts.formatting { return fetchNextTokenInfo(); } - function insertIndentation(pos: number, indentation: number, sourceFile: SourceFile): void { + function insertIndentation(pos: number, indentation: number): void { var tokenRange = getNonAdjustedLineAndCharacterFromPosition(pos, sourceFile); if (indentation !== tokenRange.character) { var indentationString = getIndentationString(indentation, options); @@ -417,6 +415,65 @@ module ts.formatting { } } + function indentMultilineComment(commentRange: TextRange, indentation: number, firstLineIsIndented: boolean) { + // split comment in lines + var startLine = getNonAdjustedLineAndCharacterFromPosition(commentRange.pos, sourceFile).line; + var endLine = getNonAdjustedLineAndCharacterFromPosition(commentRange.end, sourceFile).line; + + if (startLine === endLine) { + if (!firstLineIsIndented) { + // treat as single line comment + insertIndentation(commentRange.pos, indentation); + } + return; + } + else { + var parts: TextRange[] = []; + var startPos = commentRange.pos; + for (var line = startLine; line < endLine; ++line) { + var endOfLine = getEndLinePosition(line, sourceFile); + parts.push( {pos: startPos, end: endOfLine} ); + startPos = getStartPositionOfLine(line + 1, sourceFile); + } + + parts.push( {pos: startPos, end: commentRange.end} ); + } + + var startLinePos = getStartPositionOfLine(startLine, sourceFile); + + var nonWhitespaceColumnInFirstPart = + SmartIndenter.findFirstNonWhitespaceColumn(startLinePos, parts[0].pos, sourceFile, options); + + if (indentation === nonWhitespaceColumnInFirstPart) { + return; + } + + var startIndex = 0; + if (firstLineIsIndented) { + startIndex = 1; + startLine++; + } + + // shift all parts on the delta size + var delta = indentation - nonWhitespaceColumnInFirstPart; + for (var i = startIndex, len = parts.length; i < len; ++i, ++startLine) { + var startLinePos = getStartPositionOfLine(startLine, sourceFile); + var nonWhitespaceColumn = + i === 0 + ? nonWhitespaceColumnInFirstPart + : SmartIndenter.findFirstNonWhitespaceColumn(parts[i].pos, parts[i].end, sourceFile, options); + + var newIndentation = nonWhitespaceColumn + delta; + if (newIndentation > 0) { + var indentationString = getIndentationString(newIndentation, options); + recordReplace(startLinePos, nonWhitespaceColumn, indentationString); + } + else { + recordDelete(startLinePos, nonWhitespaceColumn); + } + } + } + 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]; diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 8fa1fc1928e..ff95035ebf9 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -65,41 +65,7 @@ module ts.formatting { return 0; } - - var parent: Node = current.parent; - var parentStart: LineAndCharacter; - - // walk upwards and collect indentations for pairs of parent-child nodes - // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' - while (parent) { - // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; - } - - parentStart = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); - var parentAndChildShareLine = - parentStart.line === currentStart.line || - childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); - - // try to fetch actual indentation for current node from source text - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; - } - - // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line - if (nodeContentIsIndented(parent, current) && !parentAndChildShareLine) { - indentationDelta += options.IndentSize; - } - - current = parent; - currentStart = parentStart; - parent = current.parent; - } - - return indentationDelta; + return getIndentationForNode(current, currentStart, indentationDelta, sourceFile, options); } export function getIndentationForNode(current: Node, currentStart: LineAndCharacter, indentationDelta: number, sourceFile: SourceFile, options: EditorOptions): number { @@ -287,21 +253,24 @@ module ts.formatting { function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter: LineAndCharacter, sourceFile: SourceFile, options: EditorOptions): number { var lineStart = sourceFile.getPositionFromLineAndCharacter(lineAndCharacter.line, 1); + return findFirstNonWhitespaceColumn(lineStart, lineStart + lineAndCharacter.character, sourceFile, options); + } + + export function findFirstNonWhitespaceColumn(startPos: number, endPos: number, sourceFile: SourceFile, options: EditorOptions): number { var column = 0; - for (var i = 0; i < lineAndCharacter.character; ++i) { - var charCode = sourceFile.text.charCodeAt(lineStart + i); - if (!isWhiteSpace(charCode)) { + for (var pos = startPos; pos < endPos; ++pos) { + var ch = sourceFile.text.charCodeAt(pos); + if (!isWhiteSpace(ch)) { return column; } - if (charCode === CharacterCodes.tab) { - column += options.TabSize; + if (ch === CharacterCodes.tab) { + column += options.TabSize + (column % options.TabSize); } else { column++; } } - return column; } diff --git a/src/services/formatting/stringUtilities.ts b/src/services/formatting/stringUtilities.ts index 5f5d0b0fd4a..f6f8fc0319f 100644 --- a/src/services/formatting/stringUtilities.ts +++ b/src/services/formatting/stringUtilities.ts @@ -24,19 +24,21 @@ module ts.formatting { } else { var spacesString: string; - var index = indentation / options.IndentSize; + var quotient = Math.floor(indentation / options.IndentSize); + var remainder = indentation % options.IndentSize; if (!internedSpacesIndentation) { internedSpacesIndentation = []; } - if (internedSpacesIndentation[index] === undefined) { - internedSpacesIndentation[index] = spacesString = repeat(" ", indentation);; + if (internedSpacesIndentation[quotient] === undefined) { + spacesString = repeat(" ", options.IndentSize * quotient); + internedSpacesIndentation[quotient] = spacesString; } else { - spacesString = internedSpacesIndentation[index]; + spacesString = internedSpacesIndentation[quotient]; } - var remainder = indentation % options.IndentSize; + return remainder ? spacesString + repeat(" ", remainder) : spacesString; } From 6fe2b3ea90752623bcae92189843c15693b460b3 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 17 Oct 2014 16:24:12 -0700 Subject: [PATCH 009/154] rescan '>' and '/' if necessary --- src/services/formatting/format.ts | 35 +++++++++++++----- src/services/formatting/smartIndenter.ts | 46 +++++++++++------------- 2 files changed, 46 insertions(+), 35 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 9962b99dcb0..7a620c6b1ab 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -169,6 +169,16 @@ module ts.formatting { return { line: lineAndChar.line - 1, character: lineAndChar.character - 1 }; } + function rescanIfNecessary(scanner: Scanner, parent: Node): void { + var t = scanner.getToken(); + if (parent.kind === SyntaxKind.BinaryExpression && t === SyntaxKind.GreaterThanToken) { + scanner.reScanGreaterToken(); + } + else if (parent.kind === SyntaxKind.RegularExpressionLiteral && t === SyntaxKind.SlashToken) { + scanner.reScanSlashToken(); + } + } + function formatSpan(originalRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions, @@ -192,9 +202,9 @@ module ts.formatting { var lastTriviaWasNewLine = true; var edits: TextChange[] = []; - // advance the scaner scanner.scan(); - var currentTokenInfo = fetchNextTokenInfo(); + + var currentTokenInfo = fetchNextTokenInfo(enclosingNode); if (currentTokenInfo.token) { var startLine = getNonAdjustedLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile), sourceFile).line; @@ -225,7 +235,12 @@ module ts.formatting { ); while (currentTokenInfo.token && node.end >= currentTokenInfo.token.end) { - currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + if (SmartIndenter.nodeContentIsAlwaysIndented(node)) { + currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + } + else { + currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + } childContextNode = node; } @@ -273,7 +288,7 @@ module ts.formatting { var increaseIndentation = childStartLine !== nodeStartLine && !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && - SmartIndenter.nodeContentIsIndented(node, child); + SmartIndenter.shouldIndentChildNode(node, child); processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); childContextNode = node; @@ -281,11 +296,12 @@ module ts.formatting { } } - function fetchNextTokenInfo(): TokenInfo { + function fetchNextTokenInfo(parent: Node): TokenInfo { if (currentTokenInfo) { + var trivia = currentTokenInfo.trailingTrivia; lastTriviaWasNewLine = - currentTokenInfo.trailingTrivia && - currentTokenInfo.trailingTrivia[currentTokenInfo.trailingTrivia.length - 1].kind === SyntaxKind.NewLineTrivia; + trivia && + trivia[trivia.length - 1].kind === SyntaxKind.NewLineTrivia; } var leadingTrivia: TextRangeWithKind[]; @@ -296,6 +312,8 @@ module ts.formatting { var initialStartPos = startPos; while (startPos < originalRange.end) { + rescanIfNecessary(scanner, parent); + var t = scanner.getToken(); if (tokenRange && !isTrivia(t)) { @@ -303,7 +321,6 @@ module ts.formatting { break; } - // advance the cursor scanner.scan(); var item = { pos: startPos, end: scanner.getStartPos(), kind: t }; @@ -403,7 +420,7 @@ module ts.formatting { } - return fetchNextTokenInfo(); + return fetchNextTokenInfo(parent); } function insertIndentation(pos: number, indentation: number): void { diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index ff95035ebf9..4021c8b6788 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -37,7 +37,7 @@ module ts.formatting { var indentationDelta: number; while (current) { - if (positionBelongsToNode(current, position, sourceFile) && nodeContentIsIndented(current, previous)) { + if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current, previous)) { currentStart = getStartLineAndCharacterForNode(current, sourceFile); if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) { @@ -93,7 +93,7 @@ module ts.formatting { } // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line - if (nodeContentIsIndented(parent, current) && !parentAndChildShareLine) { + if (shouldIndentChildNode(parent, current) && !parentAndChildShareLine) { indentationDelta += options.IndentSize; } @@ -274,33 +274,11 @@ module ts.formatting { return column; } - export function nodeContentIsIndented(parent: Node, child: Node): boolean { - switch (parent.kind) { + export function nodeContentIsAlwaysIndented(n: Node): boolean { + switch (n.kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: case SyntaxKind.EnumDeclaration: - return true; - case SyntaxKind.ModuleDeclaration: - // ModuleBlock should take care of indentation - return false; - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.Method: - case SyntaxKind.FunctionExpression: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.Constructor: - // FunctionBlock should take care of indentation - return false; - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - return child && child.kind !== SyntaxKind.Block; - case SyntaxKind.IfStatement: - return child && child.kind !== SyntaxKind.Block; - case SyntaxKind.TryStatement: - // TryBlock\CatchBlock\FinallyBlock should take care of indentation - return false; case SyntaxKind.ArrayLiteral: case SyntaxKind.Block: case SyntaxKind.FunctionBlock: @@ -324,6 +302,22 @@ module ts.formatting { } } + export function shouldIndentChildNode(parent: Node, child: Node): boolean { + if (nodeContentIsAlwaysIndented(parent)) { + return true; + } + switch (parent.kind) { + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.IfStatement: + return child && child.kind !== SyntaxKind.Block; + default: + return false; + } + } + /* * Checks if node ends with 'expectedLastToken'. * If child at position 'length - 1' is 'SemicolonToken' it is skipped and 'expectedLastToken' is compared with child at position 'length - 2'. From 381a2ec4256c0175bd7918f942075947677bea96 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 18 Oct 2014 15:40:00 -0700 Subject: [PATCH 010/154] initial rev --- src/services/formatting/format.ts | 248 ++++++++----------- src/services/formatting/formattingScanner.ts | 144 +++++++++++ 2 files changed, 252 insertions(+), 140 deletions(-) create mode 100644 src/services/formatting/formattingScanner.ts diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 7a620c6b1ab..2221674976a 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -1,5 +1,6 @@ /// /// +/// /// module ts.formatting { @@ -8,15 +9,12 @@ module ts.formatting { kind: SyntaxKind; } - export interface TokenInfo extends TextRange { + export interface TokenInfo { leadingTrivia: TextRangeWithKind[]; token: TextRangeWithKind; trailingTrivia: TextRangeWithKind[]; - pos: number; - end: number; } - var formattingScanner = createScanner(ScriptTarget.ES5, /*skipTrivia*/ false); export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ var line = getNonAdjustedLineAndCharacterFromPosition(position, sourceFile).line; @@ -27,7 +25,7 @@ module ts.formatting { // get end position for the current line (end value is exclusive so add 1 to the result) end: getEndLinePosition(line, sourceFile) + 1 } - return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnEnter, formattingScanner); + return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnEnter); } export function formatOnSemicolon(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ @@ -43,7 +41,7 @@ module ts.formatting { pos: 0, end: sourceFile.text.length }; - return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatDocument, formattingScanner); + return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatDocument); } export function formatSelection(start: number, end: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ @@ -52,7 +50,7 @@ module ts.formatting { pos: getStartLinePositionForPosition(start, sourceFile), end: end }; - return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatSelection, formattingScanner); + return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatSelection); } function getEndLinePosition(line: number, sourceFile: SourceFile): number { @@ -97,7 +95,7 @@ module ts.formatting { pos: getStartLinePositionForPosition(parent.pos, sourceFile), end: parent.end }; - return formatSpan(span, sourceFile, options, rulesProvider, requestKind, formattingScanner); + return formatSpan(span, sourceFile, options, rulesProvider, requestKind); } function findOutermostParent(position: number, expectedTokenKind: SyntaxKind, sourceFile: SourceFile): Node { @@ -169,22 +167,11 @@ module ts.formatting { return { line: lineAndChar.line - 1, character: lineAndChar.character - 1 }; } - function rescanIfNecessary(scanner: Scanner, parent: Node): void { - var t = scanner.getToken(); - if (parent.kind === SyntaxKind.BinaryExpression && t === SyntaxKind.GreaterThanToken) { - scanner.reScanGreaterToken(); - } - else if (parent.kind === SyntaxKind.RegularExpressionLiteral && t === SyntaxKind.SlashToken) { - scanner.reScanSlashToken(); - } - } - function formatSpan(originalRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, - requestKind: FormattingRequestKind, - scanner: Scanner): TextChange[] { + requestKind: FormattingRequestKind): TextChange[] { // formatting context to be used by rules provider to get rules var formattingContext = new FormattingContext(sourceFile, requestKind); @@ -192,21 +179,18 @@ module ts.formatting { var enclosingNode = findEnclosingNode(originalRange, sourceFile); var initialIndentation = getIndentationForNode(enclosingNode, sourceFile, options); - scanner.setText(sourceFile.text); - scanner.setTextPos(enclosingNode.pos); + var formattingScanner = getFormattingScanner(sourceFile, enclosingNode, originalRange); var previousRange: TextRangeWithKind; var previousParent: Node; var previousRangeStartLine: number; - var lastTriviaWasNewLine = true; var edits: TextChange[] = []; + var lastTriviaWasNewLine: boolean; - scanner.scan(); + formattingScanner.advance(); - var currentTokenInfo = fetchNextTokenInfo(enclosingNode); - - if (currentTokenInfo.token) { + if (formattingScanner.hasToken()) { var startLine = getNonAdjustedLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile), sourceFile).line; processNode(enclosingNode, enclosingNode, startLine, initialIndentation); } @@ -218,11 +202,6 @@ module ts.formatting { return; } - if (!rangeContainsRange(node, currentTokenInfo.token)) { - // node and its descendents don't contain current token from the scanner - skip it - return; - } - var childContextNode = contextNode; forEachChild( node, @@ -234,15 +213,27 @@ module ts.formatting { } ); - while (currentTokenInfo.token && node.end >= currentTokenInfo.token.end) { - if (SmartIndenter.nodeContentIsAlwaysIndented(node)) { - currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + // this eats up last tokens in the node + // TODO: resync token info and consume it + while (formattingScanner.hasToken()) { + var tokenInfo = formattingScanner.consumeTokenAndTrailingTrivia(node); + if (node.end >= tokenInfo.token.end) { + consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation); + childContextNode = node; } else { - currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + break; } - childContextNode = node; } + //while (currentTokenInfo.token && node.end >= currentTokenInfo.token.end) { + // if (SmartIndenter.nodeContentIsAlwaysIndented(node)) { + // currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + // } + // else { + // currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + // } + // childContextNode = node; + //} /// Local functions @@ -252,123 +243,101 @@ module ts.formatting { } var start = child.getStart(sourceFile); - - while (currentTokenInfo.token && start >= currentTokenInfo.token.end) { - // we've walked past the current token - // ask parent to handle it - currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); - childContextNode = node; + while (formattingScanner.hasToken()) { + var tokenInfo = formattingScanner.consumeTokenAndTrailingTrivia(node); + if (start >= tokenInfo.token.end) { + consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation); + } + else { + break; + } } - if (!currentTokenInfo.token) { + //while (currentTokenInfo.token && start >= currentTokenInfo.token.end) { + // // we've walked past the current token + // // ask parent to handle it + // currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + // childContextNode = node; + //} + + if (!formattingScanner.hasToken()) { return; } + //if (!currentTokenInfo.token) { + // return; + //} + // ensure that current token is inside child node - Debug.assert(currentTokenInfo.token.end <= child.end); - if (isToken(child) && currentTokenInfo.token.end === child.end) { - // tokens belong to parent nodes - currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); - childContextNode = node; + if (isToken(child)) { + var tokenInfo = formattingScanner.consumeTokenAndTrailingTrivia(node); + if (tokenInfo.token.end === child.end) { + consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation); + childContextNode = node; + return; + } + } + + var childStartLine = getNonAdjustedLineAndCharacterFromPosition(start, sourceFile).line; + + var childIndentation = indentation; + if (listElementIndex === -1) { + // child is not list element + } else { - var childStartLine = getNonAdjustedLineAndCharacterFromPosition(start, sourceFile).line; - - var childIndentation = indentation; - if (listElementIndex === -1) { - // child is not list element - - } - else { - // child is a list element - } - // determine child indentation - // if child - // TODO: share this code with SmartIndenter - var increaseIndentation = - childStartLine !== nodeStartLine && - !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && - SmartIndenter.shouldIndentChildNode(node, child); - - processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); - childContextNode = node; + // child is a list element } + // determine child indentation + // if child + // TODO: share this code with SmartIndenter + var increaseIndentation = + childStartLine !== nodeStartLine && + !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && + SmartIndenter.shouldIndentChildNode(node, child); + + processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); + childContextNode = node; + + //if (isToken(child) && currentTokenInfo.token.end === child.end) { + // // tokens belong to parent nodes + // currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); + // childContextNode = node; + //} + //else { + // var childStartLine = getNonAdjustedLineAndCharacterFromPosition(start, sourceFile).line; + + // var childIndentation = indentation; + // if (listElementIndex === -1) { + // // child is not list element + + // } + // else { + // // child is a list element + // } + // // determine child indentation + // // if child + // // TODO: share this code with SmartIndenter + // var increaseIndentation = + // childStartLine !== nodeStartLine && + // !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && + // SmartIndenter.shouldIndentChildNode(node, child); + + // processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); + // childContextNode = node; + //} } } - function fetchNextTokenInfo(parent: Node): TokenInfo { - if (currentTokenInfo) { - var trivia = currentTokenInfo.trailingTrivia; - lastTriviaWasNewLine = - trivia && - trivia[trivia.length - 1].kind === SyntaxKind.NewLineTrivia; - } - - var leadingTrivia: TextRangeWithKind[]; - var trailingTrivia: TextRangeWithKind[]; - var tokenRange: TextRangeWithKind; - - var startPos = scanner.getStartPos(); - var initialStartPos = startPos; - - while (startPos < originalRange.end) { - rescanIfNecessary(scanner, parent); - - var t = scanner.getToken(); - - if (tokenRange && !isTrivia(t)) { - // have already seen the token and item under cursor is not a trivia - break; - } - - scanner.scan(); - - var item = { pos: startPos, end: scanner.getStartPos(), kind: t }; - startPos = item.end; - - if (isTrivia(t)) { - if (tokenRange) { - - if (!trailingTrivia) { - trailingTrivia = []; - } - - trailingTrivia.push(item); - - if (t === SyntaxKind.NewLineTrivia) { - // trailing trivia is cut at the new line - break; - } - } - else { - if (!leadingTrivia) { - leadingTrivia = []; - } - - leadingTrivia.push(item); - } - } - else { - tokenRange = item; - } - } - - return { - leadingTrivia: leadingTrivia, - token: tokenRange, - trailingTrivia: trailingTrivia, - pos: initialStartPos, - end: scanner.getStartPos() - }; - } - - function consumeCurrentToken(parent: Node, contextNode: Node, indentation: number): TokenInfo { + function consumeTokenAndAdvance(currentTokenInfo: TokenInfo, parent: Node, contextNode: Node, indentation: number): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); + + lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); + if (currentTokenInfo.leadingTrivia) { processTrivia(currentTokenInfo.leadingTrivia, parent, contextNode, indentation); } - var indentToken: boolean; if (rangeContainsRange(originalRange, currentTokenInfo.token)) { indentToken = processRange(currentTokenInfo.token, parent, contextNode, indentation); @@ -378,7 +347,7 @@ module ts.formatting { processTrivia(currentTokenInfo.trailingTrivia, parent, contextNode, indentation); } - if (lastTriviaWasNewLine && indentToken) { + if (formattingScanner.lastTrailingTriviaWasNewLine() && indentToken) { var indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { @@ -419,8 +388,7 @@ module ts.formatting { //} } - - return fetchNextTokenInfo(parent); + formattingScanner.advance(); } function insertIndentation(pos: number, indentation: number): void { diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts new file mode 100644 index 00000000000..8a988a9485e --- /dev/null +++ b/src/services/formatting/formattingScanner.ts @@ -0,0 +1,144 @@ +module ts.formatting { + var scanner = createScanner(ScriptTarget.ES5, /*skipTrivia*/ false); + + export interface FormattingScanner { + advance(): void; + hasToken(): boolean; + consumeTokenAndTrailingTrivia(n: Node): TokenInfo; + lastTrailingTriviaWasNewLine(): boolean; + } + + export function getFormattingScanner(sourceFile: SourceFile, enclosingNode: Node, range: TextRange): FormattingScanner { + + scanner.setText(sourceFile.text); + scanner.setTextPos(enclosingNode.pos); + + return { + advance: advance, + consumeTokenAndTrailingTrivia: consumeTokenAndTrailingTrivia, + hasToken: hasToken, + lastTrailingTriviaWasNewLine: lastTrailingTriviaWasNewLine + } + + var leadingTrivia: TextRangeWithKind[]; + var trailingTrivia: TextRangeWithKind[]; + var token: TextRangeWithKind; + var wasNewLine: boolean = true; + var savedStartPos: number; + + function advance(): void { + // accumulate leading trivia and token + if (trailingTrivia) { + Debug.assert(trailingTrivia.length); + wasNewLine = trailingTrivia[trailingTrivia.length - 1].kind === SyntaxKind.NewLineTrivia; + } + + leadingTrivia = undefined; + trailingTrivia = undefined; + token = undefined; + + if (scanner.getStartPos() === enclosingNode.pos) { + scanner.scan(); + } + + var t: SyntaxKind; + var startPos = scanner.getStartPos(); + + while (startPos < range.end) { + var t = scanner.getToken(); + if (token && !isTrivia(t)) { + break; + } + + // advance to the next token + scanner.scan(); + + var item = { + pos: startPos, + end: scanner.getStartPos(), + kind: t + }; + + startPos = scanner.getStartPos(); + + if (isTrivia(t)) { + if (token) { + break; + } + else { + if (!leadingTrivia) { + leadingTrivia = []; + } + leadingTrivia.push(item); + } + } + else { + token = item; + } + } + + savedStartPos = scanner.getStartPos(); + } + + function consumeTokenAndTrailingTrivia(n: Node): TokenInfo { + Debug.assert(hasToken()); + if (scanner.getStartPos() !== savedStartPos) { + scanner.setTextPos(savedStartPos) + } + + if (n.kind === SyntaxKind.BinaryExpression && token.kind === SyntaxKind.GreaterThanToken) { + scanner.setTextPos(token.pos); + scanner.scan(); + token.kind = scanner.reScanGreaterToken(); + token.end = scanner.getTextPos(); + scanner.scan(); + } + else if (n.kind === SyntaxKind.RegularExpressionLiteral && token.kind === SyntaxKind.SlashToken) { + scanner.setTextPos(token.pos); + scanner.scan(); + token.kind = scanner.reScanSlashToken(); + token.end = scanner.getTextPos(); + scanner.scan(); + } + + // scan trailing trivia + var startPos = scanner.getStartPos(); + while (startPos < range.end) { + var t = scanner.getToken(); + + if (isTrivia(t) && t !== SyntaxKind.NewLineTrivia) { + if (!trailingTrivia) { + trailingTrivia = []; + } + + var trivia = { + pos: startPos, + end: scanner.getStartPos(), + kind: t + } + trailingTrivia.push(trivia); + } + else { + break; + } + scanner.scan(); + startPos = scanner.getStartPos(); + } + + return { + leadingTrivia: leadingTrivia, + trailingTrivia: trailingTrivia, + token: token + } + } + + function hasToken(): boolean { + return token !== undefined; + } + + function lastTrailingTriviaWasNewLine(): boolean { + return wasNewLine; + } + } + +} \ No newline at end of file From 092900b62f6aa63de54b8c146e7133cd7307da9a Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 20 Oct 2014 15:53:49 -0700 Subject: [PATCH 011/154] adjust formatting scanner implementation --- src/services/formatting/format.ts | 17 ++- src/services/formatting/formattingScanner.ts | 153 +++++++++++-------- src/services/formatting/new/rules.ts | 5 + 3 files changed, 100 insertions(+), 75 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 2221674976a..e4d2ba6416d 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -190,7 +190,7 @@ module ts.formatting { formattingScanner.advance(); - if (formattingScanner.hasToken()) { + if (formattingScanner.isOnToken()) { var startLine = getNonAdjustedLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile), sourceFile).line; processNode(enclosingNode, enclosingNode, startLine, initialIndentation); } @@ -215,8 +215,8 @@ module ts.formatting { // this eats up last tokens in the node // TODO: resync token info and consume it - while (formattingScanner.hasToken()) { - var tokenInfo = formattingScanner.consumeTokenAndTrailingTrivia(node); + while (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(node); if (node.end >= tokenInfo.token.end) { consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation); childContextNode = node; @@ -243,10 +243,11 @@ module ts.formatting { } var start = child.getStart(sourceFile); - while (formattingScanner.hasToken()) { - var tokenInfo = formattingScanner.consumeTokenAndTrailingTrivia(node); + while (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(node); if (start >= tokenInfo.token.end) { consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation); + childContextNode = node; } else { break; @@ -260,7 +261,7 @@ module ts.formatting { // childContextNode = node; //} - if (!formattingScanner.hasToken()) { + if (!formattingScanner.isOnToken()) { return; } @@ -270,7 +271,7 @@ module ts.formatting { // ensure that current token is inside child node if (isToken(child)) { - var tokenInfo = formattingScanner.consumeTokenAndTrailingTrivia(node); + var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end === child.end) { consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation); childContextNode = node; @@ -347,7 +348,7 @@ module ts.formatting { processTrivia(currentTokenInfo.trailingTrivia, parent, contextNode, indentation); } - if (formattingScanner.lastTrailingTriviaWasNewLine() && indentToken) { + if (lastTriviaWasNewLine && indentToken) { var indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index 8a988a9485e..bd95ad9324c 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -3,8 +3,8 @@ module ts.formatting { export interface FormattingScanner { advance(): void; - hasToken(): boolean; - consumeTokenAndTrailingTrivia(n: Node): TokenInfo; + isOnToken(): boolean; + readTokenInfo(n: Node): TokenInfo; lastTrailingTriviaWasNewLine(): boolean; } @@ -13,20 +13,23 @@ module ts.formatting { scanner.setText(sourceFile.text); scanner.setTextPos(enclosingNode.pos); + var wasNewLine: boolean = true; + var leadingTrivia: TextRangeWithKind[]; + var trailingTrivia: TextRangeWithKind[]; + var savedStartPos: number; + var lastTokenInfo: TokenInfo; + return { advance: advance, - consumeTokenAndTrailingTrivia: consumeTokenAndTrailingTrivia, - hasToken: hasToken, + readTokenInfo: readTokenInfo, + isOnToken: isOnToken, lastTrailingTriviaWasNewLine: lastTrailingTriviaWasNewLine } - var leadingTrivia: TextRangeWithKind[]; - var trailingTrivia: TextRangeWithKind[]; - var token: TextRangeWithKind; - var wasNewLine: boolean = true; - var savedStartPos: number; function advance(): void { + lastTokenInfo = undefined; + // accumulate leading trivia and token if (trailingTrivia) { Debug.assert(trailingTrivia.length); @@ -35,7 +38,6 @@ module ts.formatting { leadingTrivia = undefined; trailingTrivia = undefined; - token = undefined; if (scanner.getStartPos() === enclosingNode.pos) { scanner.scan(); @@ -46,99 +48,116 @@ module ts.formatting { while (startPos < range.end) { var t = scanner.getToken(); - if (token && !isTrivia(t)) { + if (!isTrivia(t)) { break; } - // advance to the next token + // consume leading trivia scanner.scan(); - var item = { pos: startPos, end: scanner.getStartPos(), kind: t - }; + } startPos = scanner.getStartPos(); - - if (isTrivia(t)) { - if (token) { - break; - } - else { - if (!leadingTrivia) { - leadingTrivia = []; - } - leadingTrivia.push(item); - } - } - else { - token = item; + + if (!leadingTrivia) { + leadingTrivia = []; } + leadingTrivia.push(item); } savedStartPos = scanner.getStartPos(); } - function consumeTokenAndTrailingTrivia(n: Node): TokenInfo { - Debug.assert(hasToken()); + function startsWithGreaterThanToken(t: SyntaxKind): boolean { + switch(t) { + case SyntaxKind.GreaterThanEqualsToken: + case SyntaxKind.GreaterThanGreaterThanEqualsToken: + case SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken: + case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: + case SyntaxKind.GreaterThanGreaterThanToken: + return true; + default: + return false; + } + } + + function readTokenInfo(n: Node): TokenInfo { + if (!isOnToken()) { + return { + leadingTrivia: leadingTrivia, + trailingTrivia: undefined, + token: undefined + }; + + } + if (lastTokenInfo) { + //return lastTokenInfo; + } + if (scanner.getStartPos() !== savedStartPos) { - scanner.setTextPos(savedStartPos) - } - - if (n.kind === SyntaxKind.BinaryExpression && token.kind === SyntaxKind.GreaterThanToken) { - scanner.setTextPos(token.pos); - scanner.scan(); - token.kind = scanner.reScanGreaterToken(); - token.end = scanner.getTextPos(); - scanner.scan(); - } - else if (n.kind === SyntaxKind.RegularExpressionLiteral && token.kind === SyntaxKind.SlashToken) { - scanner.setTextPos(token.pos); - scanner.scan(); - token.kind = scanner.reScanSlashToken(); - token.end = scanner.getTextPos(); + scanner.setTextPos(savedStartPos); scanner.scan(); } - // scan trailing trivia - var startPos = scanner.getStartPos(); - while (startPos < range.end) { - var t = scanner.getToken(); + var current = scanner.getToken(); + var endPos: number; + if (n.kind === SyntaxKind.BinaryExpression && startsWithGreaterThanToken((n).operator) && current === SyntaxKind.GreaterThanToken) { + current = scanner.reScanGreaterToken(); + Debug.assert((n).operator === current); + } + else if (n.kind === SyntaxKind.RegularExpressionLiteral && current === SyntaxKind.SlashToken) { + current = scanner.reScanSlashToken(); + Debug.assert(n.kind === current); + } - if (isTrivia(t) && t !== SyntaxKind.NewLineTrivia) { - if (!trailingTrivia) { - trailingTrivia = []; - } + endPos = scanner.getTextPos(); - var trivia = { - pos: startPos, - end: scanner.getStartPos(), - kind: t - } - trailingTrivia.push(trivia); - } - else { + var token: TextRangeWithKind = { + pos: scanner.getStartPos(), + end: scanner.getTextPos(), + kind: current + } + + while(scanner.getStartPos() < range.end) { + current = scanner.scan(); + if (!isTrivia(current)) { + break; + } + var trivia = { + pos: scanner.getStartPos(), + end: scanner.getTextPos(), + kind: current + }; + + if (!trailingTrivia) { + trailingTrivia = []; + } + + trailingTrivia.push(trivia); + + if (current === SyntaxKind.NewLineTrivia) { break; } - scanner.scan(); - startPos = scanner.getStartPos(); } - return { + return lastTokenInfo = { leadingTrivia: leadingTrivia, trailingTrivia: trailingTrivia, token: token } } - function hasToken(): boolean { - return token !== undefined; + function isOnToken(): boolean { + var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); + var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); + return startPos < range.end && current !== SyntaxKind.EndOfFileToken && !isTrivia(current); } function lastTrailingTriviaWasNewLine(): boolean { return wasNewLine; } } - } \ No newline at end of file diff --git a/src/services/formatting/new/rules.ts b/src/services/formatting/new/rules.ts index a283c2a63b9..612b8b07ad4 100644 --- a/src/services/formatting/new/rules.ts +++ b/src/services/formatting/new/rules.ts @@ -618,6 +618,11 @@ module ts.formatting { case SyntaxKind.ModuleDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.Block: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.FunctionBlock: + case SyntaxKind.ModuleBlock: case SyntaxKind.SwitchStatement: return true; } From 35f4c4873510ac922e11a24dd075b1bde5203ee6 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 20 Oct 2014 17:56:13 -0700 Subject: [PATCH 012/154] respect parent indentation --- src/services/formatting/format.ts | 90 ++++++------------------ src/services/formatting/new/rules.ts | 2 - src/services/formatting/smartIndenter.ts | 39 +++++++--- 3 files changed, 50 insertions(+), 81 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index e4d2ba6416d..00a8227cf52 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -15,7 +15,6 @@ module ts.formatting { trailingTrivia: TextRangeWithKind[]; } - export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ var line = getNonAdjustedLineAndCharacterFromPosition(position, sourceFile).line; // get the span for the previous\current line @@ -92,7 +91,7 @@ module ts.formatting { return []; } var span = { - pos: getStartLinePositionForPosition(parent.pos, sourceFile), + pos: getStartLinePositionForPosition(parent.getStart(sourceFile), sourceFile), end: parent.end }; return formatSpan(span, sourceFile, options, rulesProvider, requestKind); @@ -157,9 +156,9 @@ module ts.formatting { } } - function getIndentationForNode(n: Node, sourceFile: SourceFile, options: FormatCodeOptions): number { + function getIndentationForNode(n: Node, ignoreActualIndentationRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions): number { var start = sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)); - return SmartIndenter.getIndentationForNode(n, start, /*indentationDelta*/ 0, sourceFile, options); + return SmartIndenter.getIndentationForNode(n, start, ignoreActualIndentationRange, /*indentationDelta*/ 0, sourceFile, options); } function getNonAdjustedLineAndCharacterFromPosition(position: number, sourceFile: SourceFile): LineAndCharacter { @@ -177,7 +176,7 @@ module ts.formatting { var formattingContext = new FormattingContext(sourceFile, requestKind); var enclosingNode = findEnclosingNode(originalRange, sourceFile); - var initialIndentation = getIndentationForNode(enclosingNode, sourceFile, options); + var initialIndentation = getIndentationForNode(enclosingNode, originalRange, sourceFile, options); var formattingScanner = getFormattingScanner(sourceFile, enclosingNode, originalRange); @@ -205,39 +204,33 @@ module ts.formatting { var childContextNode = contextNode; forEachChild( node, - child => processChildNode(child, /*containingList*/ undefined, /*listElementIndex*/ -1), + child => processChildNode(child, indentation, /*containingList*/ undefined, /*listElementIndex*/ -1), nodes => { for (var i = 0, len = nodes.length; i < len; ++i) { - processChildNode(nodes[i], /*containingList*/ nodes, /*listElementIndex*/ i) + processChildNode(nodes[i], indentation, /*containingList*/ nodes, /*listElementIndex*/ i) } } ); // this eats up last tokens in the node - // TODO: resync token info and consume it while (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); if (node.end >= tokenInfo.token.end) { - consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation); + var commentIndentation = + SmartIndenter.nodeContentIsAlwaysIndented(node) && node.end === tokenInfo.token.end + ? indentation + options.IndentSize + : indentation; + consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation, commentIndentation); childContextNode = node; } else { break; } } - //while (currentTokenInfo.token && node.end >= currentTokenInfo.token.end) { - // if (SmartIndenter.nodeContentIsAlwaysIndented(node)) { - // currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); - // } - // else { - // currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); - // } - // childContextNode = node; - //} /// Local functions - function processChildNode(child: Node, containingList: Node[], listElementIndex: number): void { + function processChildNode(child: Node, indentation: number, containingList: Node[], listElementIndex: number): void { if (child.kind === SyntaxKind.Missing) { return; } @@ -246,7 +239,7 @@ module ts.formatting { while (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); if (start >= tokenInfo.token.end) { - consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation); + consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation, indentation); childContextNode = node; } else { @@ -254,26 +247,15 @@ module ts.formatting { } } - //while (currentTokenInfo.token && start >= currentTokenInfo.token.end) { - // // we've walked past the current token - // // ask parent to handle it - // currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); - // childContextNode = node; - //} - if (!formattingScanner.isOnToken()) { return; } - //if (!currentTokenInfo.token) { - // return; - //} - // ensure that current token is inside child node if (isToken(child)) { var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end === child.end) { - consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation); + consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation, indentation); childContextNode = node; return; } @@ -283,11 +265,10 @@ module ts.formatting { var childIndentation = indentation; if (listElementIndex === -1) { - // child is not list element - + // child is not list element } else { - // child is a list element + // child is a list element } // determine child indentation // if child @@ -299,38 +280,10 @@ module ts.formatting { processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); childContextNode = node; - - //if (isToken(child) && currentTokenInfo.token.end === child.end) { - // // tokens belong to parent nodes - // currentTokenInfo = consumeCurrentToken(node, childContextNode, indentation); - // childContextNode = node; - //} - //else { - // var childStartLine = getNonAdjustedLineAndCharacterFromPosition(start, sourceFile).line; - - // var childIndentation = indentation; - // if (listElementIndex === -1) { - // // child is not list element - - // } - // else { - // // child is a list element - // } - // // determine child indentation - // // if child - // // TODO: share this code with SmartIndenter - // var increaseIndentation = - // childStartLine !== nodeStartLine && - // !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && - // SmartIndenter.shouldIndentChildNode(node, child); - - // processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); - // childContextNode = node; - //} } } - function consumeTokenAndAdvance(currentTokenInfo: TokenInfo, parent: Node, contextNode: Node, indentation: number): void { + function consumeTokenAndAdvance(currentTokenInfo: TokenInfo, parent: Node, contextNode: Node, indentation: number, commentIndentation: number): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); @@ -356,12 +309,12 @@ module ts.formatting { if (rangeContainsRange(originalRange, triviaItem)) { switch (triviaItem.kind) { case SyntaxKind.MultiLineCommentTrivia: - indentMultilineComment(triviaItem, indentation, /*firstLineIsIndented*/ !indentNextTokenOrTrivia); + indentMultilineComment(triviaItem, commentIndentation, /*firstLineIsIndented*/ !indentNextTokenOrTrivia); indentNextTokenOrTrivia = false; break; case SyntaxKind.SingleLineCommentTrivia: if (indentNextTokenOrTrivia) { - insertIndentation(triviaItem.pos, indentation); + insertIndentation(triviaItem.pos, commentIndentation); indentNextTokenOrTrivia = false; } break; @@ -375,8 +328,9 @@ module ts.formatting { } } } - - insertIndentation(currentTokenInfo.token.pos, indentation); + if (rangeContainsRange(originalRange, currentTokenInfo.token)) { + insertIndentation(currentTokenInfo.token.pos, indentation); + } //// TODO: remove //var tokenRange = getNonAdjustedLineAndCharacterFromPosition(currentTokenInfo.token.pos, sourceFile); diff --git a/src/services/formatting/new/rules.ts b/src/services/formatting/new/rules.ts index 612b8b07ad4..bb54f85ca1e 100644 --- a/src/services/formatting/new/rules.ts +++ b/src/services/formatting/new/rules.ts @@ -703,8 +703,6 @@ module ts.formatting { return false; } - //return ((token.kind === SyntaxKind.LessThanToken || token.kind === SyntaxKind.GreaterThanToken) && - // (parentKind === SyntaxKind.TypeParameterList || parentKind === SyntaxKind.TypeArgumentList)); } static IsTypeArgumentOrParameterContext(context: FormattingContext): boolean { diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 4021c8b6788..57f49bc43ca 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -65,31 +65,47 @@ module ts.formatting { return 0; } - return getIndentationForNode(current, currentStart, indentationDelta, sourceFile, options); + return getIndentationForNode(current, currentStart, /*ignoreActualIndentationRange*/ undefined, indentationDelta, sourceFile, options); } - export function getIndentationForNode(current: Node, currentStart: LineAndCharacter, indentationDelta: number, sourceFile: SourceFile, options: EditorOptions): number { - var parent: Node = current.parent; + export function getIndentationForNode( + current: Node, + currentStart: LineAndCharacter, + ignoreActualIndentationRange: TextRange, + indentationDelta: number, + sourceFile: SourceFile, + options: EditorOptions): number { + + var parent: Node = current.parent; var parentStart: LineAndCharacter; // walk upwards and collect indentations for pairs of parent-child nodes // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' while (parent) { - // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; + var useActualIndentation = true; + if (ignoreActualIndentationRange) { + var start = current.getStart(sourceFile); + useActualIndentation = start < ignoreActualIndentationRange.pos || start > ignoreActualIndentationRange.end; } + if (useActualIndentation) { + // check if current node is a list item - if yes, take indentation from it + var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation + indentationDelta; + } + } parentStart = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); var parentAndChildShareLine = parentStart.line === currentStart.line || childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); - // try to fetch actual indentation for current node from source text - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; + if (useActualIndentation) { + // try to fetch actual indentation for current node from source text + var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation + indentationDelta; + } } // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line @@ -105,6 +121,7 @@ module ts.formatting { return indentationDelta; } + /* * Function returns -1 if indentation cannot be determined */ From cd391b612207c6b52b41c6617dcc118286074c24 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 21 Oct 2014 11:16:17 -0700 Subject: [PATCH 013/154] move code around --- src/services/formatting/format.ts | 60 +-------------------- src/services/formatting/lineMapUtilities.ts | 42 +++++++++++++++ src/services/formatting/smartIndenter.ts | 9 +++- src/services/utilities.ts | 14 +++++ 4 files changed, 65 insertions(+), 60 deletions(-) create mode 100644 src/services/formatting/lineMapUtilities.ts diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 00a8227cf52..80f6f531934 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -1,5 +1,6 @@ /// /// +/// /// /// @@ -52,39 +53,6 @@ module ts.formatting { return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatSelection); } - function getEndLinePosition(line: number, sourceFile: SourceFile): number { - var lineStarts = sourceFile.getLineStarts(); - if (line === lineStarts.length - 1) { - // last line - return EOF - return sourceFile.text.length - 1; - } - else { - // current line start - var start = lineStarts[line]; - // take the start position of the next line -1 = it should be some line break - var pos = lineStarts[line + 1] - 1; - Debug.assert(isLineBreak(sourceFile.text.charCodeAt(pos))); - // walk backwards skipping line breaks, stop the the beginning of current line. - // i.e: - // - // $ <- end of line for this position should match the start position - while (start <= pos && isLineBreak(sourceFile.text.charCodeAt(pos))) { - pos--; - } - return pos; - } - } - - function getStartPositionOfLine(line: number, sourceFile: SourceFile): number { - return sourceFile.getLineStarts()[line]; - } - - function getStartLinePositionForPosition(position: number, sourceFile: SourceFile): number { - var lineStarts = sourceFile.getLineStarts(); - var line = getNonAdjustedLineAndCharacterFromPosition(position, sourceFile).line; - return lineStarts[line]; - } - function formatOutermostParent(position: number, expectedLastToken: SyntaxKind, sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, requestKind: FormattingRequestKind): TextChange[]{ var parent = findOutermostParent(position, expectedLastToken, sourceFile); if (!parent) { @@ -115,20 +83,6 @@ module ts.formatting { return current; } - function rangeContainsRange(initial: TextRange, candidate: TextRange): boolean { - return startEndContainsRange(initial.pos, initial.end, candidate); - } - - function startEndContainsRange(start: number, end: number, candidate: TextRange): boolean { - return start <= candidate.pos && end >= candidate.end; - } - - function rangeOverlapsWithRange(r1: TextRange, r2: TextRange): boolean { - var start = Math.max(r1.pos, r2.pos); - var end = Math.min(r1.end, r2.end); - return start < end; - } - function isListElement(parent: Node, node: Node): boolean { switch (parent.kind) { case SyntaxKind.ClassDeclaration: @@ -156,16 +110,6 @@ module ts.formatting { } } - function getIndentationForNode(n: Node, ignoreActualIndentationRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions): number { - var start = sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)); - return SmartIndenter.getIndentationForNode(n, start, ignoreActualIndentationRange, /*indentationDelta*/ 0, sourceFile, options); - } - - function getNonAdjustedLineAndCharacterFromPosition(position: number, sourceFile: SourceFile): LineAndCharacter { - var lineAndChar = sourceFile.getLineAndCharacterFromPosition(position); - return { line: lineAndChar.line - 1, character: lineAndChar.character - 1 }; - } - function formatSpan(originalRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions, @@ -176,7 +120,7 @@ module ts.formatting { var formattingContext = new FormattingContext(sourceFile, requestKind); var enclosingNode = findEnclosingNode(originalRange, sourceFile); - var initialIndentation = getIndentationForNode(enclosingNode, originalRange, sourceFile, options); + var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); var formattingScanner = getFormattingScanner(sourceFile, enclosingNode, originalRange); diff --git a/src/services/formatting/lineMapUtilities.ts b/src/services/formatting/lineMapUtilities.ts new file mode 100644 index 00000000000..c5dfa5dae52 --- /dev/null +++ b/src/services/formatting/lineMapUtilities.ts @@ -0,0 +1,42 @@ +/// + +module ts.formatting { + + export function getEndLinePosition(line: number, sourceFile: SourceFile): number { + var lineStarts = sourceFile.getLineStarts(); + if (line === lineStarts.length - 1) { + // last line - return EOF + return sourceFile.text.length - 1; + } + else { + // current line start + var start = lineStarts[line]; + // take the start position of the next line -1 = it should be some line break + var pos = lineStarts[line + 1] - 1; + Debug.assert(isLineBreak(sourceFile.text.charCodeAt(pos))); + // walk backwards skipping line breaks, stop the the beginning of current line. + // i.e: + // + // $ <- end of line for this position should match the start position + while (start <= pos && isLineBreak(sourceFile.text.charCodeAt(pos))) { + pos--; + } + return pos; + } + } + + export function getNonAdjustedLineAndCharacterFromPosition(position: number, sourceFile: SourceFile): LineAndCharacter { + var lineAndChar = sourceFile.getLineAndCharacterFromPosition(position); + return { line: lineAndChar.line - 1, character: lineAndChar.character - 1 }; + } + + export function getStartPositionOfLine(line: number, sourceFile: SourceFile): number { + return sourceFile.getLineStarts()[line]; + } + + export function getStartLinePositionForPosition(position: number, sourceFile: SourceFile): number { + var lineStarts = sourceFile.getLineStarts(); + var line = getNonAdjustedLineAndCharacterFromPosition(position, sourceFile).line; + return lineStarts[line]; + } +} \ No newline at end of file diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 57f49bc43ca..69fbf71df18 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -65,10 +65,15 @@ module ts.formatting { return 0; } - return getIndentationForNode(current, currentStart, /*ignoreActualIndentationRange*/ undefined, indentationDelta, sourceFile, options); + return getIndentationForNodeWorker(current, currentStart, /*ignoreActualIndentationRange*/ undefined, indentationDelta, sourceFile, options); } - export function getIndentationForNode( + export function getIndentationForNode(n: Node, ignoreActualIndentationRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions): number { + var start = sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)); + return getIndentationForNodeWorker(n, start, ignoreActualIndentationRange, /*indentationDelta*/ 0, sourceFile, options); + } + + function getIndentationForNodeWorker( current: Node, currentStart: LineAndCharacter, ignoreActualIndentationRange: TextRange, diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 6965685884c..82a9a85d7ae 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -5,6 +5,20 @@ module ts { list: Node; } + export function rangeContainsRange(r1: TextRange, r2: TextRange): boolean { + return startEndContainsRange(r1.pos, r1.end, r2); + } + + export function startEndContainsRange(start: number, end: number, range: TextRange): boolean { + return start <= range.pos && end >= range.end; + } + + export function rangeOverlapsWithRange(r1: TextRange, r2: TextRange): boolean { + var start = Math.max(r1.pos, r2.pos); + var end = Math.min(r1.end, r2.end); + return start < end; + } + export function findListItemInfo(node: Node): ListItemInfo { var syntaxList = findContainingList(node); var children = syntaxList.getChildren(); From faccc71e0157f2046c435203b8f03992080f117e Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 21 Oct 2014 13:49:47 -0700 Subject: [PATCH 014/154] handle indentation in function arguments --- src/services/formatting/format.ts | 81 ++++++++++-------------- src/services/formatting/smartIndenter.ts | 3 + 2 files changed, 38 insertions(+), 46 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 80f6f531934..e9314cfa53f 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -159,17 +159,15 @@ module ts.formatting { // this eats up last tokens in the node while (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); - if (node.end >= tokenInfo.token.end) { - var commentIndentation = - SmartIndenter.nodeContentIsAlwaysIndented(node) && node.end === tokenInfo.token.end - ? indentation + options.IndentSize - : indentation; - consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation, commentIndentation); - childContextNode = node; - } - else { + if (tokenInfo.token.end > node.end) { break; } + var commentIndentation = + SmartIndenter.nodeContentIsAlwaysIndented(node) && node.end === tokenInfo.token.end + ? indentation + options.IndentSize + : indentation; + + doConsumeTokenAndAdvanceScanner(tokenInfo, node, indentation, commentIndentation); } /// Local functions @@ -182,13 +180,11 @@ module ts.formatting { var start = child.getStart(sourceFile); while (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); - if (start >= tokenInfo.token.end) { - consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation, indentation); - childContextNode = node; - } - else { + if (tokenInfo.token.end > start) { break; } + + doConsumeTokenAndAdvanceScanner(tokenInfo, node, indentation, indentation); } if (!formattingScanner.isOnToken()) { @@ -198,11 +194,9 @@ module ts.formatting { // ensure that current token is inside child node if (isToken(child)) { var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end === child.end) { - consumeTokenAndAdvance(tokenInfo, node, childContextNode, indentation, indentation); - childContextNode = node; - return; - } + Debug.assert(tokenInfo.token.end === child.end); + doConsumeTokenAndAdvanceScanner(tokenInfo, node, indentation, indentation); + return; } var childStartLine = getNonAdjustedLineAndCharacterFromPosition(start, sourceFile).line; @@ -225,9 +219,14 @@ module ts.formatting { processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); childContextNode = node; } + + function doConsumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, indentation: number, commentIndentation: number): void { + consumeTokenAndAdvanceScanner(currentTokenInfo, parent, childContextNode, indentation, commentIndentation); + childContextNode = parent; + } } - function consumeTokenAndAdvance(currentTokenInfo: TokenInfo, parent: Node, contextNode: Node, indentation: number, commentIndentation: number): void { + function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, contextNode: Node, indentation: number, commentIndentation: number): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); @@ -237,7 +236,8 @@ module ts.formatting { } var indentToken: boolean; - if (rangeContainsRange(originalRange, currentTokenInfo.token)) { + var isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); + if (isTokenInRange) { indentToken = processRange(currentTokenInfo.token, parent, contextNode, indentation); } @@ -272,19 +272,9 @@ module ts.formatting { } } } - if (rangeContainsRange(originalRange, currentTokenInfo.token)) { + if (isTokenInRange) { insertIndentation(currentTokenInfo.token.pos, indentation); } - //// TODO: remove - //var tokenRange = getNonAdjustedLineAndCharacterFromPosition(currentTokenInfo.token.pos, sourceFile); - - //// TODO: handle indentation in multiline comments - //var currentIndentation = tokenRange.character; - //if (indentation !== currentIndentation) { - // var indentationString = getIndentationString(indentation, options); - // var startLinePosition = getStartPositionOfLine(tokenRange.line, sourceFile); - // recordReplace(startLinePosition, currentIndentation, indentationString); - //} } formattingScanner.advance(); @@ -316,11 +306,11 @@ module ts.formatting { var startPos = commentRange.pos; for (var line = startLine; line < endLine; ++line) { var endOfLine = getEndLinePosition(line, sourceFile); - parts.push( {pos: startPos, end: endOfLine} ); + parts.push({ pos: startPos, end: endOfLine }); startPos = getStartPositionOfLine(line + 1, sourceFile); } - parts.push( {pos: startPos, end: commentRange.end} ); + parts.push({ pos: startPos, end: commentRange.end }); } var startLinePos = getStartPositionOfLine(startLine, sourceFile); @@ -371,22 +361,21 @@ module ts.formatting { var rangeStart = getNonAdjustedLineAndCharacterFromPosition(range.pos, sourceFile); var indentToken = true; - if (rangeContainsRange(originalRange, range)) { - if (!previousRange) { - var originalStart = getNonAdjustedLineAndCharacterFromPosition(originalRange.pos, sourceFile); - // TODO: implement - if (isTrivia(range.kind)) { - trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); - } - else { - trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); - } + if (!previousRange) { + var originalStart = getNonAdjustedLineAndCharacterFromPosition(originalRange.pos, sourceFile); + // TODO: implement + if (isTrivia(range.kind)) { + trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); } else { - processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode) - indentToken = rangeStart.line !== previousRangeStartLine; + trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); } } + else { + processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode) + indentToken = rangeStart.line !== previousRangeStartLine; + } + previousRange = range; previousParent = parent; previousRangeStartLine = rangeStart.line; diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 69fbf71df18..f50c8faaa09 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -335,6 +335,9 @@ module ts.formatting { case SyntaxKind.ForStatement: case SyntaxKind.IfStatement: return child && child.kind !== SyntaxKind.Block; + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + return child && child.kind !== SyntaxKind.FunctionBlock; default: return false; } From edd35f01ca540b68dfb01dc74486c1274e64453b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 22 Oct 2014 15:40:00 -0700 Subject: [PATCH 015/154] recompute indentation if line is added --- src/services/formatting/format.ts | 262 +++++++++++-------- src/services/formatting/formattingScanner.ts | 2 + 2 files changed, 155 insertions(+), 109 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index e9314cfa53f..2cd94486832 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -16,6 +16,12 @@ module ts.formatting { trailingTrivia: TextRangeWithKind[]; } + interface DynamicIndentation { + getIndentation(): number; + getCommentIndentation(): number; + recomputeIndentation(lineAddedByFormatting: boolean): void; + } + export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ var line = getNonAdjustedLineAndCharacterFromPosition(position, sourceFile).line; // get the span for the previous\current line @@ -139,19 +145,39 @@ module ts.formatting { } return edits; + function getIndentationDelta(node: Node, lineAdded: boolean): number { + if (node.parent && SmartIndenter.shouldIndentChildNode(node.parent, node)) { + return lineAdded ? options.IndentSize : - options.IndentSize; + } + return 0; + } + function processNode(node: Node, contextNode: Node, nodeStartLine: number, indentation: number) { // TODO: skip nodes that has skipped or missing tokens if (!rangeOverlapsWithRange(originalRange, node)) { return; } + var commentIndentation = indentation; + + var parentIndentation: DynamicIndentation = { + getCommentIndentation: () => commentIndentation, + getIndentation: () => indentation, + recomputeIndentation: (lineAdded) => { + var delta = getIndentationDelta(node, lineAdded); + if (delta) { + indentation += delta; + commentIndentation += delta; + } + } + }; var childContextNode = contextNode; forEachChild( node, - child => processChildNode(child, indentation, /*containingList*/ undefined, /*listElementIndex*/ -1), + child => processChildNode(child, /*containingList*/ undefined, /*listElementIndex*/ -1), nodes => { for (var i = 0, len = nodes.length; i < len; ++i) { - processChildNode(nodes[i], indentation, /*containingList*/ nodes, /*listElementIndex*/ i) + processChildNode(nodes[i], /*containingList*/ nodes, /*listElementIndex*/ i) } } ); @@ -162,17 +188,18 @@ module ts.formatting { if (tokenInfo.token.end > node.end) { break; } - var commentIndentation = + + commentIndentation = SmartIndenter.nodeContentIsAlwaysIndented(node) && node.end === tokenInfo.token.end ? indentation + options.IndentSize : indentation; - doConsumeTokenAndAdvanceScanner(tokenInfo, node, indentation, commentIndentation); + doConsumeTokenAndAdvanceScanner(tokenInfo, node, parentIndentation); } /// Local functions - function processChildNode(child: Node, indentation: number, containingList: Node[], listElementIndex: number): void { + function processChildNode(child: Node, containingList: Node[], listElementIndex: number): void { if (child.kind === SyntaxKind.Missing) { return; } @@ -184,7 +211,7 @@ module ts.formatting { break; } - doConsumeTokenAndAdvanceScanner(tokenInfo, node, indentation, indentation); + doConsumeTokenAndAdvanceScanner(tokenInfo, node, parentIndentation); } if (!formattingScanner.isOnToken()) { @@ -195,21 +222,20 @@ module ts.formatting { if (isToken(child)) { var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); - doConsumeTokenAndAdvanceScanner(tokenInfo, node, indentation, indentation); + doConsumeTokenAndAdvanceScanner(tokenInfo, node, parentIndentation); return; } var childStartLine = getNonAdjustedLineAndCharacterFromPosition(start, sourceFile).line; - var childIndentation = indentation; if (listElementIndex === -1) { // child is not list element } else { // child is a list element } + // determine child indentation - // if child // TODO: share this code with SmartIndenter var increaseIndentation = childStartLine !== nodeStartLine && @@ -220,13 +246,13 @@ module ts.formatting { childContextNode = node; } - function doConsumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, indentation: number, commentIndentation: number): void { - consumeTokenAndAdvanceScanner(currentTokenInfo, parent, childContextNode, indentation, commentIndentation); + function doConsumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, indentation: DynamicIndentation): void { + consumeTokenAndAdvanceScanner(currentTokenInfo, parent, childContextNode, indentation); childContextNode = parent; } } - function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, contextNode: Node, indentation: number, commentIndentation: number): void { + function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, contextNode: Node, indentation: DynamicIndentation): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); @@ -235,16 +261,26 @@ module ts.formatting { processTrivia(currentTokenInfo.leadingTrivia, parent, contextNode, indentation); } - var indentToken: boolean; + var lineAdded: boolean; var isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); + var indentToken: boolean = true; if (isTokenInRange) { - indentToken = processRange(currentTokenInfo.token, parent, contextNode, indentation); + var prevStartLine = previousRangeStartLine; + var tokenStart = getNonAdjustedLineAndCharacterFromPosition(currentTokenInfo.token.pos, sourceFile); + lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, contextNode, indentation); + if (lineAdded !== undefined) { + indentToken = lineAdded; + } + else { + indentToken = tokenStart.line !== prevStartLine; + } } if (currentTokenInfo.trailingTrivia) { processTrivia(currentTokenInfo.trailingTrivia, parent, contextNode, indentation); } + if (lastTriviaWasNewLine && indentToken) { var indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { @@ -253,12 +289,12 @@ module ts.formatting { if (rangeContainsRange(originalRange, triviaItem)) { switch (triviaItem.kind) { case SyntaxKind.MultiLineCommentTrivia: - indentMultilineComment(triviaItem, commentIndentation, /*firstLineIsIndented*/ !indentNextTokenOrTrivia); + indentMultilineComment(triviaItem, indentation.getCommentIndentation(), /*firstLineIsIndented*/ !indentNextTokenOrTrivia); indentNextTokenOrTrivia = false; break; case SyntaxKind.SingleLineCommentTrivia: if (indentNextTokenOrTrivia) { - insertIndentation(triviaItem.pos, commentIndentation); + insertIndentation(triviaItem.pos, indentation.getCommentIndentation(), /*lineAdded*/ false); indentNextTokenOrTrivia = false; } break; @@ -273,19 +309,110 @@ module ts.formatting { } } if (isTokenInRange) { - insertIndentation(currentTokenInfo.token.pos, indentation); + insertIndentation(currentTokenInfo.token.pos, indentation.getIndentation(), lineAdded); } } formattingScanner.advance(); } - function insertIndentation(pos: number, indentation: number): void { - var tokenRange = getNonAdjustedLineAndCharacterFromPosition(pos, sourceFile); - if (indentation !== tokenRange.character) { - var indentationString = getIndentationString(indentation, options); - var startLinePosition = getStartPositionOfLine(tokenRange.line, sourceFile); - recordReplace(startLinePosition, tokenRange.character, indentationString); + function processTrivia(trivia: TextRangeWithKind[], parent: Node, contextNode: Node, indentation: DynamicIndentation): void { + for (var i = 0, len = trivia.length; i < len; ++i) { + var triviaItem = trivia[i]; + if (isComment(triviaItem.kind) && rangeContainsRange(originalRange, triviaItem)) { + var triviaItemStart = getNonAdjustedLineAndCharacterFromPosition(triviaItem.pos, sourceFile); + processRange(triviaItem, triviaItemStart, parent, contextNode, indentation); + } + } + } + + function processRange(range: TextRangeWithKind, rangeStart: LineAndCharacter, parent: Node, contextNode: Node, indentation: DynamicIndentation): boolean { + + var lineAdded: boolean; + if (!previousRange) { + // trim whitespaces starting from the beginning of the span up to the current line + var originalStart = getNonAdjustedLineAndCharacterFromPosition(originalRange.pos, sourceFile); + trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); + } + else { + lineAdded = processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, indentation) + } + + previousRange = range; + previousParent = parent; + previousRangeStartLine = rangeStart.line; + + return lineAdded; + } + + function processPair(currentItem: TextRangeWithKind, + currentStartLine: number, + currentParent: Node, + previousItem: TextRangeWithKind, + previousStartLine: number, + previousParent: Node, + contextNode: Node, + indentation: DynamicIndentation): boolean { + + formattingContext.updateContext(previousItem, previousParent, currentItem, currentParent, contextNode); + var rule = rulesProvider.getRulesMap().GetRule(formattingContext); + + var trimTrailingWhitespaces: boolean; + var lineAdded: boolean; + if (rule) { + applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); + + if (rule.Operation.Action & (RuleAction.Space | RuleAction.Delete) && currentStartLine !== previousStartLine) { + // Old code: + // Handle the case where the next line is moved to be the end of this line. + // In this case we don't indent the next line in the next pass. + lastTriviaWasNewLine = false; + if (currentParent.getStart(sourceFile) === currentItem.pos) { + lineAdded = false; + } + } + else if (rule.Operation.Action & RuleAction.NewLine && currentStartLine === previousStartLine) { + // Old code: + // Handle the case where token2 is moved to the new line. + // In this case we indent token2 in the next pass but we set + // sameLineIndent flag to notify the indenter that the indentation is within the line. + lastTriviaWasNewLine = true; + if (currentParent.getStart(sourceFile) === currentItem.pos) { + lineAdded = true; + } + } + + if (lineAdded !== undefined) { + indentation.recomputeIndentation(lineAdded); + } + + // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line + trimTrailingWhitespaces = + (rule.Operation.Action & (RuleAction.NewLine | RuleAction.Space)) && + rule.Flag !== RuleFlags.CanDeleteNewLines; + } + else { + trimTrailingWhitespaces = true; + } + + if (currentStartLine !== previousStartLine && trimTrailingWhitespaces) { + // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line + trimTrailingWhitespacesForLines(previousStartLine, currentStartLine, previousItem); + } + + return lineAdded; + } + function insertIndentation(pos: number, indentation: number, lineAdded: boolean): void { + var indentationString = getIndentationString(indentation, options); + if (lineAdded) { + recordReplace(pos, 0, indentationString); + } + else { + var tokenRange = getNonAdjustedLineAndCharacterFromPosition(pos, sourceFile); + if (indentation !== tokenRange.character) { + var startLinePosition = getStartPositionOfLine(tokenRange.line, sourceFile); + recordReplace(startLinePosition, tokenRange.character, indentationString); + } } } @@ -297,7 +424,7 @@ module ts.formatting { if (startLine === endLine) { if (!firstLineIsIndented) { // treat as single line comment - insertIndentation(commentRange.pos, indentation); + insertIndentation(commentRange.pos, indentation, /*lineAdded*/ false); } return; } @@ -348,96 +475,13 @@ 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)) { - processRange(triviaItem, parent, contextNode, currentIndentation); - } - } - } - - function processRange(range: TextRangeWithKind, parent: Node, contextNode: Node, indentation: number): boolean { - var rangeStart = getNonAdjustedLineAndCharacterFromPosition(range.pos, sourceFile); - var indentToken = true; - - if (!previousRange) { - var originalStart = getNonAdjustedLineAndCharacterFromPosition(originalRange.pos, sourceFile); - // TODO: implement - if (isTrivia(range.kind)) { - trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); - } - else { - trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); - } - } - else { - processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode) - indentToken = rangeStart.line !== previousRangeStartLine; - } - - previousRange = range; - previousParent = parent; - previousRangeStartLine = rangeStart.line; - - return indentToken; - } - - function processPair(currentItem: TextRangeWithKind, - currentStartLine: number, - currentParent: Node, - previousItem: TextRangeWithKind, - previousStartLine: number, - previousParent: Node, - contextNode: Node): void { - - // TODO: compute common parent - formattingContext.updateContext(previousItem, previousParent, currentItem, currentParent, contextNode); - var rule = rulesProvider.getRulesMap().GetRule(formattingContext); - - var trimTrailingWhitespaces: boolean; - if (rule) { - applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); - - if (rule.Operation.Action & (RuleAction.Space | RuleAction.Delete) && currentStartLine !== previousStartLine) { - // Old code: - // Handle the case where the next line is moved to be the end of this line. - // In this case we don't indent the next line in the next pass. - // this.forceSkipIndentingNextToken(t2.start()); - lastTriviaWasNewLine = false; - } - else if (rule.Operation.Action & RuleAction.NewLine && currentStartLine === previousStartLine) { - // Old code: - // Handle the case where token2 is moved to the new line. - // In this case we indent token2 in the next pass but we set - // sameLineIndent flag to notify the indenter that the indentation is within the line. - // this.forceIndentNextToken(t2.start()); - lastTriviaWasNewLine = true; - } - - // TODO: check if this is still needed - trimTrailingWhitespaces = - (rule.Operation.Action & (RuleAction.NewLine | RuleAction.Space)) && - rule.Flag !== RuleFlags.CanDeleteNewLines; - } - else { - trimTrailingWhitespaces = true; - } - - if (currentStartLine !== previousStartLine && trimTrailingWhitespaces) { - // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line - trimTrailingWhitespacesForLines(previousStartLine, currentStartLine, previousItem); - } - } - function trimTrailingWhitespacesForLines(line1: number, line2: number, range?: TextRangeWithKind) { for (var line = line1; line < line2; ++line) { var lineStartPosition = getStartPositionOfLine(line, sourceFile); var lineEndPosition = getEndLinePosition(line, sourceFile); - // if (token && (token.kind == SyntaxKind.MultiLineCommentTrivia || token.kind == SyntaxKind.SingleLineCommentTrivia) && token.start() <= line.endPosition() && token.end() >= line.endPosition()) - - if (range && isComment(range.kind)&& false) { + // do not trim whitespaces in comments + if (range && isComment(range.kind) && range.pos <= lineEndPosition && range.end > lineEndPosition) { continue; } diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index bd95ad9324c..a4b574bdb8a 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -139,6 +139,8 @@ module ts.formatting { trailingTrivia.push(trivia); if (current === SyntaxKind.NewLineTrivia) { + // move past new line + scanner.scan(); break; } } From 4ba24fb7d4e4a86966b9ff7bc1c38c4a48345eee Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 22 Oct 2014 16:01:43 -0700 Subject: [PATCH 016/154] use apply line adjustment when calling SmartIndenter --- src/services/formatting/format.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 2cd94486832..cdd7c135a0c 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -237,9 +237,10 @@ module ts.formatting { // determine child indentation // TODO: share this code with SmartIndenter + // NOTE: SI uses non-adjusted lines var increaseIndentation = childStartLine !== nodeStartLine && - !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && + !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine + 1, sourceFile) && SmartIndenter.shouldIndentChildNode(node, child); processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); From 7ffcd58f032a0922a7829055b3168aa0173d0630 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 23 Oct 2014 00:25:34 -0700 Subject: [PATCH 017/154] switch formatter to use 1-based lines --- src/services/formatting/format.ts | 25 +++++++++++---------- src/services/formatting/lineMapUtilities.ts | 15 ++++++------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index cdd7c135a0c..ef5315703f6 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -23,7 +23,8 @@ module ts.formatting { } export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ - var line = getNonAdjustedLineAndCharacterFromPosition(position, sourceFile).line; + var line = sourceFile.getLineAndCharacterFromPosition(position).line; + Debug.assert(line >= 2); // get the span for the previous\current line var span = { // get start position for the previous line @@ -140,7 +141,7 @@ module ts.formatting { formattingScanner.advance(); if (formattingScanner.isOnToken()) { - var startLine = getNonAdjustedLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile), sourceFile).line; + var startLine = sourceFile.getLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile)).line; processNode(enclosingNode, enclosingNode, startLine, initialIndentation); } return edits; @@ -226,7 +227,7 @@ module ts.formatting { return; } - var childStartLine = getNonAdjustedLineAndCharacterFromPosition(start, sourceFile).line; + var childStartLine = sourceFile.getLineAndCharacterFromPosition(start).line; if (listElementIndex === -1) { // child is not list element @@ -240,7 +241,7 @@ module ts.formatting { // NOTE: SI uses non-adjusted lines var increaseIndentation = childStartLine !== nodeStartLine && - !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine + 1, sourceFile) && + !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && SmartIndenter.shouldIndentChildNode(node, child); processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); @@ -267,7 +268,7 @@ module ts.formatting { var indentToken: boolean = true; if (isTokenInRange) { var prevStartLine = previousRangeStartLine; - var tokenStart = getNonAdjustedLineAndCharacterFromPosition(currentTokenInfo.token.pos, sourceFile); + var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, contextNode, indentation); if (lineAdded !== undefined) { indentToken = lineAdded; @@ -321,7 +322,7 @@ module ts.formatting { for (var i = 0, len = trivia.length; i < len; ++i) { var triviaItem = trivia[i]; if (isComment(triviaItem.kind) && rangeContainsRange(originalRange, triviaItem)) { - var triviaItemStart = getNonAdjustedLineAndCharacterFromPosition(triviaItem.pos, sourceFile); + var triviaItemStart = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos); processRange(triviaItem, triviaItemStart, parent, contextNode, indentation); } } @@ -332,7 +333,7 @@ module ts.formatting { var lineAdded: boolean; if (!previousRange) { // trim whitespaces starting from the beginning of the span up to the current line - var originalStart = getNonAdjustedLineAndCharacterFromPosition(originalRange.pos, sourceFile); + var originalStart = sourceFile.getLineAndCharacterFromPosition(originalRange.pos); trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); } else { @@ -409,18 +410,18 @@ module ts.formatting { recordReplace(pos, 0, indentationString); } else { - var tokenRange = getNonAdjustedLineAndCharacterFromPosition(pos, sourceFile); - if (indentation !== tokenRange.character) { + var tokenRange = sourceFile.getLineAndCharacterFromPosition(pos); + if (indentation !== tokenRange.character - 1) { var startLinePosition = getStartPositionOfLine(tokenRange.line, sourceFile); - recordReplace(startLinePosition, tokenRange.character, indentationString); + recordReplace(startLinePosition, tokenRange.character - 1, indentationString); } } } function indentMultilineComment(commentRange: TextRange, indentation: number, firstLineIsIndented: boolean) { // split comment in lines - var startLine = getNonAdjustedLineAndCharacterFromPosition(commentRange.pos, sourceFile).line; - var endLine = getNonAdjustedLineAndCharacterFromPosition(commentRange.end, sourceFile).line; + var startLine = sourceFile.getLineAndCharacterFromPosition(commentRange.pos).line; + var endLine = sourceFile.getLineAndCharacterFromPosition(commentRange.end).line; if (startLine === endLine) { if (!firstLineIsIndented) { diff --git a/src/services/formatting/lineMapUtilities.ts b/src/services/formatting/lineMapUtilities.ts index c5dfa5dae52..cd429019dba 100644 --- a/src/services/formatting/lineMapUtilities.ts +++ b/src/services/formatting/lineMapUtilities.ts @@ -3,7 +3,10 @@ module ts.formatting { export function getEndLinePosition(line: number, sourceFile: SourceFile): number { + Debug.assert(line >= 1); var lineStarts = sourceFile.getLineStarts(); + + line = line - 1; if (line === lineStarts.length - 1) { // last line - return EOF return sourceFile.text.length - 1; @@ -25,18 +28,14 @@ module ts.formatting { } } - export function getNonAdjustedLineAndCharacterFromPosition(position: number, sourceFile: SourceFile): LineAndCharacter { - var lineAndChar = sourceFile.getLineAndCharacterFromPosition(position); - return { line: lineAndChar.line - 1, character: lineAndChar.character - 1 }; - } - export function getStartPositionOfLine(line: number, sourceFile: SourceFile): number { - return sourceFile.getLineStarts()[line]; + Debug.assert(line >= 1); + return sourceFile.getLineStarts()[line - 1]; } export function getStartLinePositionForPosition(position: number, sourceFile: SourceFile): number { var lineStarts = sourceFile.getLineStarts(); - var line = getNonAdjustedLineAndCharacterFromPosition(position, sourceFile).line; - return lineStarts[line]; + var line = sourceFile.getLineAndCharacterFromPosition(position).line; + return lineStarts[line - 1]; } } \ No newline at end of file From e795b59a87f5a0399cdf7b5f3f4a0c6301680669 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 24 Oct 2014 15:32:25 -0700 Subject: [PATCH 018/154] initial rev of using error information in formatting --- src/compiler/types.ts | 2 +- src/services/formatting/format.ts | 42 +++++++++++++++----- src/services/formatting/formattingScanner.ts | 4 +- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 6e01a7b2e36..fdb49d8dfdd 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -549,7 +549,7 @@ module ts { export interface SourceFile extends Block { filename: string; text: string; - getLineAndCharacterFromPosition(position: number): { line: number; character: number }; + getLineAndCharacterFromPosition(position: number): LineAndCharacter; getPositionFromLineAndCharacter(line: number, character: number): number; getLineStarts(): number[]; amdDependencies: string[]; diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index ef5315703f6..9831921e874 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -121,7 +121,12 @@ module ts.formatting { sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, - requestKind: FormattingRequestKind): TextChange[] { + requestKind: FormattingRequestKind): TextChange[]{ + + var syntacticErrors = sourceFile.syntacticErrors.length !== 0 && sourceFile.syntacticErrors.slice(0); + if (syntacticErrors) { + syntacticErrors.sort((d1, d2) => d1.start - d2.start); + } // formatting context to be used by rules provider to get rules var formattingContext = new FormattingContext(sourceFile, requestKind); @@ -131,6 +136,7 @@ module ts.formatting { var formattingScanner = getFormattingScanner(sourceFile, enclosingNode, originalRange); + var previousRangeHasError: boolean; var previousRange: TextRangeWithKind; var previousParent: Node; var previousRangeStartLine: number; @@ -144,6 +150,9 @@ module ts.formatting { var startLine = sourceFile.getLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile)).line; processNode(enclosingNode, enclosingNode, startLine, initialIndentation); } + + formattingScanner.close(); + return edits; function getIndentationDelta(node: Node, lineAdded: boolean): number { @@ -238,7 +247,6 @@ module ts.formatting { // determine child indentation // TODO: share this code with SmartIndenter - // NOTE: SI uses non-adjusted lines var increaseIndentation = childStartLine !== nodeStartLine && !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && @@ -254,6 +262,14 @@ module ts.formatting { } } + function rangeContainsError(range: TextRange): boolean { + if (!syntacticErrors.length) { + return false; + } + + binarySearch + } + function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, contextNode: Node, indentation: DynamicIndentation): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); @@ -266,13 +282,14 @@ module ts.formatting { var lineAdded: boolean; var isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); var indentToken: boolean = true; + if (isTokenInRange) { var prevStartLine = previousRangeStartLine; var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, contextNode, indentation); if (lineAdded !== undefined) { indentToken = lineAdded; - } + } else { indentToken = tokenStart.line !== prevStartLine; } @@ -329,20 +346,23 @@ module ts.formatting { } function processRange(range: TextRangeWithKind, rangeStart: LineAndCharacter, parent: Node, contextNode: Node, indentation: DynamicIndentation): boolean { - + var rangeHasError = rangeContainsError(range); var lineAdded: boolean; - if (!previousRange) { - // trim whitespaces starting from the beginning of the span up to the current line - var originalStart = sourceFile.getLineAndCharacterFromPosition(originalRange.pos); - trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); - } - else { - lineAdded = processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, indentation) + if (!rangeHasError && !previousRangeHasError) { + if (!previousRange) { + // trim whitespaces starting from the beginning of the span up to the current line + var originalStart = sourceFile.getLineAndCharacterFromPosition(originalRange.pos); + trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); + } + else { + lineAdded = processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, indentation) + } } previousRange = range; previousParent = parent; previousRangeStartLine = rangeStart.line; + previousRangeHasError = rangeHasError; return lineAdded; } diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index a4b574bdb8a..3728ebeb417 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -6,6 +6,7 @@ module ts.formatting { isOnToken(): boolean; readTokenInfo(n: Node): TokenInfo; lastTrailingTriviaWasNewLine(): boolean; + close(): void; } export function getFormattingScanner(sourceFile: SourceFile, enclosingNode: Node, range: TextRange): FormattingScanner { @@ -23,7 +24,8 @@ module ts.formatting { advance: advance, readTokenInfo: readTokenInfo, isOnToken: isOnToken, - lastTrailingTriviaWasNewLine: lastTrailingTriviaWasNewLine + lastTrailingTriviaWasNewLine: lastTrailingTriviaWasNewLine, + close: () => scanner.setText(undefined) } From d2e9a627264aa1fd8f3c57b5e3f4a1549dcd2a70 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 24 Oct 2014 18:15:02 -0700 Subject: [PATCH 019/154] distinguish parse errors so non-parse errors can be ignored during formatting --- src/compiler/parser.ts | 4 +- src/compiler/types.ts | 1 + src/services/formatting/format.ts | 51 ++++++++++++++----- .../fourslash/formattingSkippedTokens.ts | 6 +-- tests/cases/fourslash/semicolonFormatting.ts | 2 +- 5 files changed, 47 insertions(+), 17 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 1694d30fa53..16446113d01 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -907,7 +907,9 @@ module ts { ? file.syntacticErrors[file.syntacticErrors.length - 1].start : -1; if (start !== lastErrorPos) { - file.syntacticErrors.push(createFileDiagnostic(file, start, length, message, arg0, arg1, arg2)); + var diagnostic = createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); + diagnostic.isParseError = true; + file.syntacticErrors.push(diagnostic); } if (lookAheadMode === LookAheadMode.NoErrorYet) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 1f8e10f619b..87b95a07f93 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1067,6 +1067,7 @@ module ts { category: DiagnosticCategory; code: number; isEarly?: boolean; + isParseError?: boolean; } export enum DiagnosticCategory { diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 9831921e874..a05bdee6c0f 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -117,16 +117,50 @@ module ts.formatting { } } + function prepareRangeContainsErrorFunction(errors: Diagnostic[], originalRange: TextRange): (r: TextRange) => boolean { + if (!errors.length) { + // no errors - always return false + return r => false; + } + else { + var sorted = errors.slice(0).filter(d => d.isParseError).sort((e1, e2) => e1.start - e2.start); + var index = 0; // TODO: set based on the range + var endIndex = sorted.length; // TODO: set based on the range + if (endIndex === 0 || index === sorted.length) { + // errors are outside the interesting span - always return false + return r => false; + } + return r => { + while (true) { + if (index >= endIndex) { + return false; + } + else { + var curr = sorted[index]; + if (r.end <= curr.start) { + return false; + } + else { + var s = Math.max(r.pos, curr.start); + var e = Math.min(r.end, curr.start + curr.length); + if (s < e) { + return true; + } + index++; + } + } + } + }; + } + } + function formatSpan(originalRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, requestKind: FormattingRequestKind): TextChange[]{ - var syntacticErrors = sourceFile.syntacticErrors.length !== 0 && sourceFile.syntacticErrors.slice(0); - if (syntacticErrors) { - syntacticErrors.sort((d1, d2) => d1.start - d2.start); - } + var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.syntacticErrors, originalRange); // formatting context to be used by rules provider to get rules var formattingContext = new FormattingContext(sourceFile, requestKind); @@ -262,14 +296,6 @@ module ts.formatting { } } - function rangeContainsError(range: TextRange): boolean { - if (!syntacticErrors.length) { - return false; - } - - binarySearch - } - function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, contextNode: Node, indentation: DynamicIndentation): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); @@ -424,6 +450,7 @@ module ts.formatting { return lineAdded; } + function insertIndentation(pos: number, indentation: number, lineAdded: boolean): void { var indentationString = getIndentationString(indentation, options); if (lineAdded) { diff --git a/tests/cases/fourslash/formattingSkippedTokens.ts b/tests/cases/fourslash/formattingSkippedTokens.ts index 62cd0b67c37..a8fc8522f8d 100644 --- a/tests/cases/fourslash/formattingSkippedTokens.ts +++ b/tests/cases/fourslash/formattingSkippedTokens.ts @@ -13,10 +13,10 @@ format.document(); goTo.marker('1'); verify.currentLineContentIs('foo(): Bar { }'); goTo.marker('2'); -verify.currentLineContentIs('function Foo () # { }'); +verify.currentLineContentIs('function Foo() # { }'); goTo.marker('3'); -verify.currentLineContentIs('4+:5'); +verify.currentLineContentIs('4 +:5'); goTo.marker('4'); verify.currentLineContentIs(' : T) { }'); goTo.marker('5'); -verify.currentLineContentIs('var x ='); \ No newline at end of file +verify.currentLineContentIs('var x ='); \ No newline at end of file diff --git a/tests/cases/fourslash/semicolonFormatting.ts b/tests/cases/fourslash/semicolonFormatting.ts index da828e8e389..1522e7b32fa 100644 --- a/tests/cases/fourslash/semicolonFormatting.ts +++ b/tests/cases/fourslash/semicolonFormatting.ts @@ -4,4 +4,4 @@ goTo.eof(); edit.insert(';'); -verify.currentLineContentIs('function of1 (b:{ r:{ c: number;'); \ No newline at end of file +verify.currentLineContentIs('function of1(b: { r: { c: number;'); \ No newline at end of file From 417555c9e9a0aa185035dad70f762e71da291f03 Mon Sep 17 00:00:00 2001 From: Dick van den Brink Date: Sun, 26 Oct 2014 14:53:26 +0100 Subject: [PATCH 020/154] implemented treat warning as errors commandline option (warnaserror). --- src/compiler/commandLineParser.ts | 5 +++++ src/compiler/diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 4 ++++ src/compiler/tsc.ts | 8 ++++---- src/compiler/types.ts | 1 + 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index a7993484c64..210c71541f3 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -113,6 +113,11 @@ module ts { type: "boolean", description: Diagnostics.Print_the_compiler_s_version, }, + { + name: "warnAsError", + type: "boolean", + description: Diagnostics.Report_all_warnings_as_errors, + }, { name: "watch", shortName: "w", diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index a5dda0b1f4b..5ab076413cc 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -364,6 +364,7 @@ module ts { Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: DiagnosticCategory.Message, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." }, Watch_input_files: { code: 6005, category: DiagnosticCategory.Message, key: "Watch input files." }, Redirect_output_structure_to_the_directory: { code: 6006, category: DiagnosticCategory.Message, key: "Redirect output structure to the directory." }, + Report_all_warnings_as_errors: { code: 6007, category: DiagnosticCategory.Message, key: "Report all warnings as errors." }, Do_not_emit_comments_to_output: { code: 6009, category: DiagnosticCategory.Message, key: "Do not emit comments to output." }, Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: DiagnosticCategory.Message, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" }, Specify_module_code_generation_Colon_commonjs_or_amd: { code: 6016, category: DiagnosticCategory.Message, key: "Specify module code generation: 'commonjs' or 'amd'" }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 1336af21aaf..2442d21d206 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1456,6 +1456,10 @@ "category": "Message", "code": 6006 }, + "Report all warnings as errors.": { + "category": "Message", + "code": 6007 + }, "Do not emit comments to output.": { "category": "Message", "code": 6009 diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 15f231bc74e..dff2ac8d0b1 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -362,7 +362,10 @@ module ts { var checker = program.getTypeChecker(/*fullTypeCheckMode*/ true); var checkStart = new Date().getTime(); errors = checker.getDiagnostics(); - if (!checker.hasEarlyErrors()) { + if (checker.hasEarlyErrors() || (compilerOptions.warnAsError && errors.length > 0)) { + exitStatus = EmitReturnStatus.AllOutputGenerationSkipped; + } + else { var emitStart = new Date().getTime(); var emitOutput = checker.emitFiles(); var emitErrors = emitOutput.errors; @@ -370,9 +373,6 @@ module ts { var reportStart = new Date().getTime(); errors = concatenate(errors, emitErrors); } - else { - exitStatus = EmitReturnStatus.AllOutputGenerationSkipped; - } } reportDiagnostics(errors); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index aa2ca3b4ba8..d96a50b8e84 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1092,6 +1092,7 @@ module ts { sourceRoot?: string; target?: ScriptTarget; version?: boolean; + warnAsError?: boolean; watch?: boolean; [option: string]: any; } From bd2c5965f524aad1db66612cb7120a56045fc6d2 Mon Sep 17 00:00:00 2001 From: Dick van den Brink Date: Mon, 27 Oct 2014 20:48:46 +0100 Subject: [PATCH 021/154] Changed name to noEmitOnError --- src/compiler/commandLineParser.ts | 10 +++++----- src/compiler/diagnosticInformationMap.generated.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- src/compiler/tsc.ts | 2 +- src/compiler/types.ts | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 210c71541f3..ad6452d1639 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -54,6 +54,11 @@ module ts { paramType: Diagnostics.KIND, error: Diagnostics.Argument_for_module_option_must_be_commonjs_or_amd }, + { + name: "noEmitOnError", + type: "boolean", + description: Diagnostics.Do_not_emit_JavaScript_on_error, + }, { name: "noImplicitAny", type: "boolean", @@ -113,11 +118,6 @@ module ts { type: "boolean", description: Diagnostics.Print_the_compiler_s_version, }, - { - name: "warnAsError", - type: "boolean", - description: Diagnostics.Report_all_warnings_as_errors, - }, { name: "watch", shortName: "w", diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 5ab076413cc..3e464e62c33 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -364,7 +364,7 @@ module ts { Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: DiagnosticCategory.Message, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." }, Watch_input_files: { code: 6005, category: DiagnosticCategory.Message, key: "Watch input files." }, Redirect_output_structure_to_the_directory: { code: 6006, category: DiagnosticCategory.Message, key: "Redirect output structure to the directory." }, - Report_all_warnings_as_errors: { code: 6007, category: DiagnosticCategory.Message, key: "Report all warnings as errors." }, + Do_not_emit_JavaScript_on_error: { code: 6007, category: DiagnosticCategory.Message, key: "Do not emit JavaScript on error." }, Do_not_emit_comments_to_output: { code: 6009, category: DiagnosticCategory.Message, key: "Do not emit comments to output." }, Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: DiagnosticCategory.Message, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" }, Specify_module_code_generation_Colon_commonjs_or_amd: { code: 6016, category: DiagnosticCategory.Message, key: "Specify module code generation: 'commonjs' or 'amd'" }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 2442d21d206..94bbe966f30 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1456,7 +1456,7 @@ "category": "Message", "code": 6006 }, - "Report all warnings as errors.": { + "Do not emit JavaScript on error.": { "category": "Message", "code": 6007 }, diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index dff2ac8d0b1..e578448457e 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -362,7 +362,7 @@ module ts { var checker = program.getTypeChecker(/*fullTypeCheckMode*/ true); var checkStart = new Date().getTime(); errors = checker.getDiagnostics(); - if (checker.hasEarlyErrors() || (compilerOptions.warnAsError && errors.length > 0)) { + if (checker.hasEarlyErrors() || (compilerOptions.noEmitOnError && errors.length > 0)) { exitStatus = EmitReturnStatus.AllOutputGenerationSkipped; } else { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index d96a50b8e84..07b230976ed 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1080,6 +1080,7 @@ module ts { locale?: string; mapRoot?: string; module?: ModuleKind; + noEmitOnError?: boolean; noErrorTruncation?: boolean; noImplicitAny?: boolean; noLib?: boolean; @@ -1092,7 +1093,6 @@ module ts { sourceRoot?: string; target?: ScriptTarget; version?: boolean; - warnAsError?: boolean; watch?: boolean; [option: string]: any; } From fc261b7bd3ea7db8fcbf85c663c195c256245ede Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 27 Oct 2014 15:36:50 -0700 Subject: [PATCH 022/154] correctly propagate child indentation --- src/services/formatting/format.ts | 35 ++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index a05bdee6c0f..607b5c148e6 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -262,16 +262,37 @@ module ts.formatting { return; } + var childStartLine = sourceFile.getLineAndCharacterFromPosition(start).line; + // determine child indentation + // TODO: share this code with SmartIndenter + var increaseIndentation = + childStartLine !== nodeStartLine && + !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && + SmartIndenter.shouldIndentChildNode(node, child); + + + var childIndentationValue = increaseIndentation ? indentation + options.IndentSize : indentation; + var childIndentation: DynamicIndentation = { + getIndentation: () => childIndentationValue, + getCommentIndentation: () => childIndentationValue, + recomputeIndentation: lineAdded => { + parentIndentation.recomputeIndentation(lineAdded); + var delta = getIndentationDelta(node, lineAdded); //? + if (delta) { + childIndentationValue += delta; + } + }, + }; // ensure that current token is inside child node if (isToken(child)) { var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); - doConsumeTokenAndAdvanceScanner(tokenInfo, node, parentIndentation); + doConsumeTokenAndAdvanceScanner(tokenInfo, node, childIndentation); return; } - var childStartLine = sourceFile.getLineAndCharacterFromPosition(start).line; - + + var newIndentation: number; if (listElementIndex === -1) { // child is not list element } @@ -279,14 +300,8 @@ module ts.formatting { // child is a list element } - // determine child indentation - // TODO: share this code with SmartIndenter - var increaseIndentation = - childStartLine !== nodeStartLine && - !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && - SmartIndenter.shouldIndentChildNode(node, child); - processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation); + processNode(child, childContextNode, childStartLine, childIndentationValue); childContextNode = node; } From e4f57569b721662841d6599474adcc6cc375e396 Mon Sep 17 00:00:00 2001 From: Dick van den Brink Date: Tue, 28 Oct 2014 19:45:18 +0100 Subject: [PATCH 023/154] addressed feedback --- src/compiler/checker.ts | 10 ++++++++-- src/compiler/commandLineParser.ts | 2 +- src/compiler/diagnosticInformationMap.generated.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- src/compiler/emitter.ts | 6 +++--- src/compiler/tsc.ts | 2 +- src/compiler/types.ts | 4 ++-- src/harness/harness.ts | 6 ++---- 8 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7a959c0dbfc..91b27812d04 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -109,7 +109,7 @@ module ts { getAliasedSymbol: resolveImport, isUndefinedSymbol: symbol => symbol === undefinedSymbol, isArgumentsSymbol: symbol => symbol === argumentsSymbol, - hasEarlyErrors: hasEarlyErrors + isEmitBlocked: isEmitBlocked }; var undefinedSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "undefined"); @@ -8316,6 +8316,12 @@ module ts { return getDiagnostics().length > 0 || getGlobalDiagnostics().length > 0; } + function isEmitBlocked(sourceFile?: SourceFile): boolean { + return program.getDiagnostics(sourceFile).length !== 0 || + hasEarlyErrors(sourceFile) || + (compilerOptions.noEmitOnError && getDiagnostics(sourceFile).length !== 0); + } + function hasEarlyErrors(sourceFile?: SourceFile): boolean { return forEach(getDiagnostics(sourceFile), d => d.isEarly); } @@ -8403,7 +8409,7 @@ module ts { getEnumMemberValue: getEnumMemberValue, isTopLevelValueImportedViaEntityName: isTopLevelValueImportedViaEntityName, hasSemanticErrors: hasSemanticErrors, - hasEarlyErrors: hasEarlyErrors, + isEmitBlocked: isEmitBlocked, isDeclarationVisible: isDeclarationVisible, isImplementationOfOverload: isImplementationOfOverload, writeTypeAtLocation: writeTypeAtLocation, diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index ad6452d1639..71d68c546d2 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -57,7 +57,7 @@ module ts { { name: "noEmitOnError", type: "boolean", - description: Diagnostics.Do_not_emit_JavaScript_on_error, + description: Diagnostics.Do_not_emit_outputs_if_any_type_checking_errors_were_reported, }, { name: "noImplicitAny", diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 3e464e62c33..61842486450 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -364,7 +364,7 @@ module ts { Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: DiagnosticCategory.Message, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." }, Watch_input_files: { code: 6005, category: DiagnosticCategory.Message, key: "Watch input files." }, Redirect_output_structure_to_the_directory: { code: 6006, category: DiagnosticCategory.Message, key: "Redirect output structure to the directory." }, - Do_not_emit_JavaScript_on_error: { code: 6007, category: DiagnosticCategory.Message, key: "Do not emit JavaScript on error." }, + Do_not_emit_outputs_if_any_type_checking_errors_were_reported: { code: 6007, category: DiagnosticCategory.Message, key: "Do not emit outputs if any type checking errors were reported." }, Do_not_emit_comments_to_output: { code: 6009, category: DiagnosticCategory.Message, key: "Do not emit comments to output." }, Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: DiagnosticCategory.Message, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" }, Specify_module_code_generation_Colon_commonjs_or_amd: { code: 6016, category: DiagnosticCategory.Message, key: "Specify module code generation: 'commonjs' or 'amd'" }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 94bbe966f30..cfb30775251 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1456,7 +1456,7 @@ "category": "Message", "code": 6006 }, - "Do not emit JavaScript on error.": { + "Do not emit outputs if any type checking errors were reported.": { "category": "Message", "code": 6007 }, diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 1517584e4c8..3ce39b95127 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3271,10 +3271,10 @@ module ts { } var hasSemanticErrors = resolver.hasSemanticErrors(); - var hasEarlyErrors = resolver.hasEarlyErrors(targetSourceFile); + var isEmitBlocked = resolver.isEmitBlocked(targetSourceFile); function emitFile(jsFilePath: string, sourceFile?: SourceFile) { - if (!hasEarlyErrors) { + if (!isEmitBlocked) { emitJavaScript(jsFilePath, sourceFile); if (!hasSemanticErrors && compilerOptions.declaration) { emitDeclarations(jsFilePath, sourceFile); @@ -3318,7 +3318,7 @@ module ts { // Check and update returnCode for syntactic and semantic var returnCode: EmitReturnStatus; - if (hasEarlyErrors) { + if (isEmitBlocked) { returnCode = EmitReturnStatus.AllOutputGenerationSkipped; } else if (hasEmitterError) { returnCode = EmitReturnStatus.EmitErrorsEncountered; diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index e578448457e..e5291c9d7f1 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -362,7 +362,7 @@ module ts { var checker = program.getTypeChecker(/*fullTypeCheckMode*/ true); var checkStart = new Date().getTime(); errors = checker.getDiagnostics(); - if (checker.hasEarlyErrors() || (compilerOptions.noEmitOnError && errors.length > 0)) { + if (checker.isEmitBlocked()) { exitStatus = EmitReturnStatus.AllOutputGenerationSkipped; } else { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 07b230976ed..694294d2d12 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -666,7 +666,7 @@ module ts { isImplementationOfOverload(node: FunctionDeclaration): boolean; isUndefinedSymbol(symbol: Symbol): boolean; isArgumentsSymbol(symbol: Symbol): boolean; - hasEarlyErrors(sourceFile?: SourceFile): boolean; + isEmitBlocked(sourceFile?: SourceFile): boolean; // Returns the constant value of this enum member, or 'undefined' if the enum member has a // computed value. @@ -762,7 +762,7 @@ module ts { // Returns the constant value this property access resolves to, or 'undefined' if it does // resolve to a constant. getConstantValue(node: PropertyAccess): number; - hasEarlyErrors(sourceFile?: SourceFile): boolean; + isEmitBlocked(sourceFile?: SourceFile): boolean; } export enum SymbolFlags { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 60c5da5a1a6..e1735a6ad6d 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -796,16 +796,14 @@ module Harness { options.target, useCaseSensitiveFileNames)); - var hadParseErrors = program.getDiagnostics().length > 0; - var checker = program.getTypeChecker(/*fullTypeCheckMode*/ true); checker.checkProgram(); - var hasEarlyErrors = checker.hasEarlyErrors(); + var isEmitBlocked = checker.isEmitBlocked(); // only emit if there weren't parse errors var emitResult: ts.EmitResult; - if (!hadParseErrors && !hasEarlyErrors) { + if (!isEmitBlocked) { emitResult = checker.emitFiles(); } From 41a2a0371251937b77f80db0d0f407f93d880f55 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 28 Oct 2014 15:08:36 -0700 Subject: [PATCH 024/154] initial version of list item formatting --- src/services/formatting/format.ts | 107 +++++++++++++++++++----------- src/services/utilities.ts | 10 ++- 2 files changed, 75 insertions(+), 42 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 607b5c148e6..cec141bd875 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -123,16 +123,20 @@ module ts.formatting { return r => false; } else { - var sorted = errors.slice(0).filter(d => d.isParseError).sort((e1, e2) => e1.start - e2.start); - var index = 0; // TODO: set based on the range - var endIndex = sorted.length; // TODO: set based on the range - if (endIndex === 0 || index === sorted.length) { - // errors are outside the interesting span - always return false + // pick only errors that fall in range + var sorted = errors + .filter(d => d.isParseError && (d.start >= originalRange.pos && d.start + d.length < originalRange.end)) + .sort((e1, e2) => e1.start - e2.start); + + if (!sorted.length) { + // no errors in interesting span - always return false return r => false; } + + var index = 0; return r => { while (true) { - if (index >= endIndex) { + if (index >= sorted.length) { return false; } else { @@ -196,14 +200,24 @@ module ts.formatting { return 0; } + function getListItemIndentation(nodes: Node[], index: number, parentStartLine: number, options: EditorOptions): number { + Debug.assert(index >= 0 && index < nodes.length); + var node = nodes[index]; + var start = node.getStart(sourceFile); + var nodeStartLine = sourceFile.getLineAndCharacterFromPosition(start).line; + var startLinePosition = getStartPositionOfLine(nodeStartLine, sourceFile); + var shareLine = nodeStartLine === parentStartLine; + var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, start, sourceFile, options); // ? + return shareLine && start !== column? -1 : column; + } + function processNode(node: Node, contextNode: Node, nodeStartLine: number, indentation: number) { - // TODO: skip nodes that has skipped or missing tokens - if (!rangeOverlapsWithRange(originalRange, node)) { + if (!rangeOverlapsWithStartEnd(originalRange, node.getStart(sourceFile), node.getEnd())) { return; } var commentIndentation = indentation; - var parentIndentation: DynamicIndentation = { + var nodeIndentation: DynamicIndentation = { getCommentIndentation: () => commentIndentation, getIndentation: () => indentation, recomputeIndentation: (lineAdded) => { @@ -218,10 +232,13 @@ module ts.formatting { var childContextNode = contextNode; forEachChild( node, - child => processChildNode(child, /*containingList*/ undefined, /*listElementIndex*/ -1), + child => { + processChildNode(child, undefined, /*containingList*/ undefined, /*listElementIndex*/ -1) + }, nodes => { + var inheritedIndentation: number = undefined; for (var i = 0, len = nodes.length; i < len; ++i) { - processChildNode(nodes[i], /*containingList*/ nodes, /*listElementIndex*/ i) + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, /*containingList*/ nodes, /*listElementIndex*/ i) } } ); @@ -238,14 +255,14 @@ module ts.formatting { ? indentation + options.IndentSize : indentation; - doConsumeTokenAndAdvanceScanner(tokenInfo, node, parentIndentation); + doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); } /// Local functions - function processChildNode(child: Node, containingList: Node[], listElementIndex: number): void { + function processChildNode(child: Node, inheritedIndentation: number, containingList: Node[], listElementIndex: number): number { if (child.kind === SyntaxKind.Missing) { - return; + return inheritedIndentation; } var start = child.getStart(sourceFile); @@ -255,54 +272,66 @@ module ts.formatting { break; } - doConsumeTokenAndAdvanceScanner(tokenInfo, node, parentIndentation); + doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); } if (!formattingScanner.isOnToken()) { - return; + return inheritedIndentation; } - var childStartLine = sourceFile.getLineAndCharacterFromPosition(start).line; - // determine child indentation - // TODO: share this code with SmartIndenter - var increaseIndentation = - childStartLine !== nodeStartLine && - !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && - SmartIndenter.shouldIndentChildNode(node, child); - + var childStart = sourceFile.getLineAndCharacterFromPosition(start); + var actualIndentation = inheritedIndentation; + + var isChildInRange = rangeOverlapsWithStartEnd(originalRange, start, child.getEnd()); + + var childIndentationValue: number; + if (containingList && !isChildInRange) { + // child is a list item that is not in span being formatted + // fetch actual indentation for the child item to push it downstream + // TODO: ensure that indentation is picked correctly + var actualIndentation = getListItemIndentation(containingList, listElementIndex, nodeStartLine, options); + if (actualIndentation !== -1) { + inheritedIndentation = actualIndentation; + } + var childIndentationValue = increaseIndentation || indentation; + } + else { + if (inheritedIndentation !== undefined) { + var childIndentationValue = inheritedIndentation; + } + else { + var shareLine = nodeStartLine === childStart.line; + var increaseIndentation = + !shareLine && + !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && + SmartIndenter.shouldIndentChildNode(node, child); + var childIndentationValue = increaseIndentation ? indentation + options.IndentSize : indentation; + } + } - var childIndentationValue = increaseIndentation ? indentation + options.IndentSize : indentation; var childIndentation: DynamicIndentation = { getIndentation: () => childIndentationValue, getCommentIndentation: () => childIndentationValue, recomputeIndentation: lineAdded => { - parentIndentation.recomputeIndentation(lineAdded); - var delta = getIndentationDelta(node, lineAdded); //? + nodeIndentation.recomputeIndentation(lineAdded); + var delta = getIndentationDelta(node, lineAdded); if (delta) { childIndentationValue += delta; } }, }; + // ensure that current token is inside child node if (isToken(child)) { var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); doConsumeTokenAndAdvanceScanner(tokenInfo, node, childIndentation); - return; - } - - - var newIndentation: number; - if (listElementIndex === -1) { - // child is not list element } else { - // child is a list element + processNode(child, childContextNode, childStart.line, childIndentationValue); + childContextNode = node; } - - - processNode(child, childContextNode, childStartLine, childIndentationValue); - childContextNode = node; + return inheritedIndentation; } function doConsumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, indentation: DynamicIndentation): void { diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 58f7f6f936a..8693b7ae230 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -13,9 +13,13 @@ module ts { return start <= range.pos && end >= range.end; } - export function rangeOverlapsWithRange(r1: TextRange, r2: TextRange): boolean { - var start = Math.max(r1.pos, r2.pos); - var end = Math.min(r1.end, r2.end); + export function rangeContainsStartEnd(range: TextRange, start: number, end: number): boolean { + return range.pos <= start && range.end >= end; + } + + export function rangeOverlapsWithStartEnd(r1: TextRange, start: number, end: number) { + var start = Math.max(r1.pos, start); + var end = Math.min(r1.end, end); return start < end; } From 593fb327dccef8d864a57d31a6c662a0cd59ecbf Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 29 Oct 2014 12:25:57 -0700 Subject: [PATCH 025/154] indentation for export assignments --- src/services/formatting/format.ts | 49 +++++++++++++++--------- src/services/formatting/smartIndenter.ts | 1 + 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index cec141bd875..d13c6ff62b9 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -285,29 +285,40 @@ module ts.formatting { var isChildInRange = rangeOverlapsWithStartEnd(originalRange, start, child.getEnd()); var childIndentationValue: number; - if (containingList && !isChildInRange) { - // child is a list item that is not in span being formatted - // fetch actual indentation for the child item to push it downstream - // TODO: ensure that indentation is picked correctly - var actualIndentation = getListItemIndentation(containingList, listElementIndex, nodeStartLine, options); - if (actualIndentation !== -1) { - inheritedIndentation = actualIndentation; - } - var childIndentationValue = increaseIndentation || indentation; - } - else { - if (inheritedIndentation !== undefined) { - var childIndentationValue = inheritedIndentation; + if (containingList) { + if (isChildInRange) { + if (inheritedIndentation !== undefined) { + // use indentation inherited from preceding list items + childIndentationValue = inheritedIndentation; + } + else { + var increaseIndentation = + node.kind !== SyntaxKind.SourceFile && + node.pos !== child.pos && + formattingScanner.lastTrailingTriviaWasNewLine(); + + var childIndentationValue = increaseIndentation ? indentation + options.IndentSize : indentation; + } } else { - var shareLine = nodeStartLine === childStart.line; - var increaseIndentation = - !shareLine && - !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && - SmartIndenter.shouldIndentChildNode(node, child); - var childIndentationValue = increaseIndentation ? indentation + options.IndentSize : indentation; + // child is a list item that is not in span being formatted + // fetch actual indentation for the child item to push it downstream + // TODO: ensure that indentation is picked correctly + var actualIndentation = getListItemIndentation(containingList, listElementIndex, nodeStartLine, options); + if (actualIndentation !== -1) { + inheritedIndentation = actualIndentation; + } + var childIndentationValue = inheritedIndentation || indentation; } } + else { + var shareLine = nodeStartLine === childStart.line; + var increaseIndentation = + !shareLine && + !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && + SmartIndenter.shouldIndentChildNode(node, child); + var childIndentationValue = increaseIndentation ? indentation + options.IndentSize : indentation; + } var childIndentation: DynamicIndentation = { getIndentation: () => childIndentationValue, diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index f50c8faaa09..b83230047e8 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -318,6 +318,7 @@ module ts.formatting { case SyntaxKind.NewExpression: case SyntaxKind.VariableStatement: case SyntaxKind.VariableDeclaration: + case SyntaxKind.ExportAssignment: return true; default: return false; From 4c1397b9a61c03fbc17b7e8764d226236bab577f Mon Sep 17 00:00:00 2001 From: Dick van den Brink Date: Thu, 30 Oct 2014 00:10:58 +0100 Subject: [PATCH 026/154] Added test for noEmitOnError --- src/harness/compilerRunner.ts | 13 ++++++++++++- src/harness/harness.ts | 6 +++++- tests/baselines/reference/noEmitOnError.errors.txt | 9 +++++++++ tests/cases/compiler/noEmitOnError.ts | 5 +++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/noEmitOnError.errors.txt create mode 100644 tests/cases/compiler/noEmitOnError.ts diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index 6e211892437..01dc1208010 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -175,7 +175,12 @@ class CompilerBaselineRunner extends RunnerBase { it('Correct sourcemap content for ' + fileName, () => { if (options.sourceMap) { Harness.Baseline.runBaseline('Correct sourcemap content for ' + fileName, justName.replace(/\.ts$/, '.sourcemap.txt'), () => { - return result.getSourceMapRecord(); + var record = result.getSourceMapRecord(); + if (options.noEmitOnError && result.errors.length !== 0 && record === undefined) { + // Because of the noEmitOnError option no files are created. We need to return null because baselining isn't required. + return null; + } + return record; }); } }); @@ -246,6 +251,12 @@ class CompilerBaselineRunner extends RunnerBase { } Harness.Baseline.runBaseline('Correct Sourcemap output for ' + fileName, justName.replace(/\.ts/, '.js.map'), () => { + if (options.noEmitOnError && result.errors.length !== 0 && result.sourceMaps.length === 0) { + // We need to return null here or the runBaseLine will actually create a empty file. + // Baselining isn't required here because there is no output. + return null; + } + var sourceMapCode = ''; for (var i = 0; i < result.sourceMaps.length; i++) { sourceMapCode += '//// [' + Harness.Path.getFileName(result.sourceMaps[i].fileName) + ']\r\n'; diff --git a/src/harness/harness.ts b/src/harness/harness.ts index e1735a6ad6d..b39682913b1 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -703,6 +703,10 @@ module Harness { } break; + case 'noemitonerror': + options.noEmitOnError = !!setting.value; + break; + case 'noresolve': options.noResolve = !!setting.value; break; @@ -1145,7 +1149,7 @@ module Harness { var optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*(\S*)/gm; // multiple matches on multiple lines // List of allowed metadata names - var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames"]; + var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames"]; function extractCompilerSettings(content: string): CompilerSetting[] { diff --git a/tests/baselines/reference/noEmitOnError.errors.txt b/tests/baselines/reference/noEmitOnError.errors.txt new file mode 100644 index 00000000000..e969a3fbbbc --- /dev/null +++ b/tests/baselines/reference/noEmitOnError.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/noEmitOnError.ts(2,5): error TS2323: Type 'string' is not assignable to type 'number'. + + +==== tests/cases/compiler/noEmitOnError.ts (1 errors) ==== + + var x: number = ""; + ~ +!!! error TS2323: Type 'string' is not assignable to type 'number'. + \ No newline at end of file diff --git a/tests/cases/compiler/noEmitOnError.ts b/tests/cases/compiler/noEmitOnError.ts new file mode 100644 index 00000000000..b171a23c5b9 --- /dev/null +++ b/tests/cases/compiler/noEmitOnError.ts @@ -0,0 +1,5 @@ +// @noemitonerror: true +// @sourcemap: true +// @declaration: true + +var x: number = ""; From dbd5b31a982e50976e32deb8b07433403ce03e7f Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 30 Oct 2014 13:34:20 -0700 Subject: [PATCH 027/154] preparation to process list terminator tokens with lists - 5 falling tests --- src/services/formatting/format.ts | 86 +++++++++++++++++++------------ 1 file changed, 54 insertions(+), 32 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index d13c6ff62b9..bec598a0467 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -19,6 +19,7 @@ module ts.formatting { interface DynamicIndentation { getIndentation(): number; getCommentIndentation(): number; + increaseCommentIndentation(delta: number): void; recomputeIndentation(lineAddedByFormatting: boolean): void; } @@ -200,6 +201,26 @@ module ts.formatting { return 0; } + function getDynamicIndentation(node: Node, indentation: number, commentIndentation: number, parentIndentation: DynamicIndentation): DynamicIndentation { + return { + getCommentIndentation: () => commentIndentation, + getIndentation: () => indentation, + recomputeIndentation: (lineAdded) => { + if (parentIndentation) { + parentIndentation.recomputeIndentation(lineAdded); + } + var delta = getIndentationDelta(node, lineAdded); + if (delta) { + indentation += delta; + commentIndentation += delta; + } + }, + increaseCommentIndentation: (delta) => { + commentIndentation += delta; + } + } + } + function getListItemIndentation(nodes: Node[], index: number, parentStartLine: number, options: EditorOptions): number { Debug.assert(index >= 0 && index < nodes.length); var node = nodes[index]; @@ -215,19 +236,7 @@ module ts.formatting { if (!rangeOverlapsWithStartEnd(originalRange, node.getStart(sourceFile), node.getEnd())) { return; } - var commentIndentation = indentation; - - var nodeIndentation: DynamicIndentation = { - getCommentIndentation: () => commentIndentation, - getIndentation: () => indentation, - recomputeIndentation: (lineAdded) => { - var delta = getIndentationDelta(node, lineAdded); - if (delta) { - indentation += delta; - commentIndentation += delta; - } - } - }; + var nodeIndentation = getDynamicIndentation(node, indentation, indentation, undefined); var childContextNode = contextNode; forEachChild( @@ -240,6 +249,24 @@ module ts.formatting { for (var i = 0, len = nodes.length; i < len; ++i) { inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, /*containingList*/ nodes, /*listElementIndex*/ i) } + switch (node.kind) { + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.Method: + case SyntaxKind.ArrowFunction: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + //if (formattingScanner.isOnToken()) { + // var tokenInfo = formattingScanner.readTokenInfo(node); + // Debug.assert(rangeContainsRange(node, tokenInfo.token)); + // // TODO: check if token is a list terminator + // if (node.parent.kind !== SyntaxKind.SourceFile && formattingScanner.lastTrailingTriviaWasNewLine()) { + // var listTerminatorIndentation = nodeIndentation.getIndentation() + options.IndentSize; + // doConsumeTokenAndAdvanceScanner(tokenInfo, node, getDynamicIndentation(node, listTerminatorIndentation, listTerminatorIndentation, nodeIndentation)); + // } + //} + break; + } } ); @@ -250,11 +277,9 @@ module ts.formatting { break; } - commentIndentation = - SmartIndenter.nodeContentIsAlwaysIndented(node) && node.end === tokenInfo.token.end - ? indentation + options.IndentSize - : indentation; - + if (SmartIndenter.nodeContentIsAlwaysIndented(node) && node.end === tokenInfo.token.end) { + nodeIndentation.increaseCommentIndentation(options.IndentSize); + } doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); } @@ -297,7 +322,10 @@ module ts.formatting { node.pos !== child.pos && formattingScanner.lastTrailingTriviaWasNewLine(); - var childIndentationValue = increaseIndentation ? indentation + options.IndentSize : indentation; + var childIndentationValue = + increaseIndentation + ? nodeIndentation.getIndentation() + options.IndentSize + : nodeIndentation.getIndentation(); } } else { @@ -308,7 +336,7 @@ module ts.formatting { if (actualIndentation !== -1) { inheritedIndentation = actualIndentation; } - var childIndentationValue = inheritedIndentation || indentation; + var childIndentationValue = inheritedIndentation || nodeIndentation.getIndentation(); } } else { @@ -317,20 +345,14 @@ module ts.formatting { !shareLine && !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && SmartIndenter.shouldIndentChildNode(node, child); - var childIndentationValue = increaseIndentation ? indentation + options.IndentSize : indentation; + var childIndentationValue = + increaseIndentation + ? nodeIndentation.getIndentation() + options.IndentSize + : nodeIndentation.getIndentation(); } - var childIndentation: DynamicIndentation = { - getIndentation: () => childIndentationValue, - getCommentIndentation: () => childIndentationValue, - recomputeIndentation: lineAdded => { - nodeIndentation.recomputeIndentation(lineAdded); - var delta = getIndentationDelta(node, lineAdded); - if (delta) { - childIndentationValue += delta; - } - }, - }; + + var childIndentation = getDynamicIndentation(node, childIndentationValue, childIndentationValue, nodeIndentation); // ensure that current token is inside child node if (isToken(child)) { From e830ae28b72512576c5b1b91b0849f33475170c8 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 30 Oct 2014 14:32:39 -0700 Subject: [PATCH 028/154] process start and end tokens in list as part of list, indent return statements --- src/services/formatting/format.ts | 60 +++++++++++++++++++----- src/services/formatting/smartIndenter.ts | 1 + 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index bec598a0467..e5e255e4d82 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -245,28 +245,62 @@ module ts.formatting { processChildNode(child, undefined, /*containingList*/ undefined, /*listElementIndex*/ -1) }, nodes => { - var inheritedIndentation: number = undefined; - for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, /*containingList*/ nodes, /*listElementIndex*/ i) - } + var listStartToken = SyntaxKind.Unknown; + var listEndToken = SyntaxKind.Unknown; switch (node.kind) { + case SyntaxKind.Constructor: case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: case SyntaxKind.Method: case SyntaxKind.ArrowFunction: + if ((node).typeParameters === nodes) { + listStartToken = SyntaxKind.LessThanToken + listEndToken = SyntaxKind.GreaterThanToken; + } + else if ((node).parameters === nodes) { + listStartToken = SyntaxKind.OpenParenToken; + listEndToken = SyntaxKind.CloseParenToken; + } + break; case SyntaxKind.CallExpression: case SyntaxKind.NewExpression: - //if (formattingScanner.isOnToken()) { - // var tokenInfo = formattingScanner.readTokenInfo(node); - // Debug.assert(rangeContainsRange(node, tokenInfo.token)); - // // TODO: check if token is a list terminator - // if (node.parent.kind !== SyntaxKind.SourceFile && formattingScanner.lastTrailingTriviaWasNewLine()) { - // var listTerminatorIndentation = nodeIndentation.getIndentation() + options.IndentSize; - // doConsumeTokenAndAdvanceScanner(tokenInfo, node, getDynamicIndentation(node, listTerminatorIndentation, listTerminatorIndentation, nodeIndentation)); - // } - //} + if ((node).typeArguments === nodes) { + listStartToken = SyntaxKind.LessThanToken + listEndToken = SyntaxKind.GreaterThanToken; + } + else if ((node).arguments === nodes) { + listStartToken = SyntaxKind.OpenParenToken; + listEndToken = SyntaxKind.CloseParenToken; + } break; } + + if (listStartToken !== SyntaxKind.Unknown) { + // try to consume open token + if (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(node); + if (tokenInfo.token.kind === listStartToken) { + // make sure that this token does not belong to the child + doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + } + } + } + + var inheritedIndentation: number = undefined; + for (var i = 0, len = nodes.length; i < len; ++i) { + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, /*containingList*/ nodes, /*listElementIndex*/ i) + } + + if (listEndToken !== SyntaxKind.Unknown) { + if (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(node); + if (tokenInfo.token.kind === listEndToken && formattingScanner.lastTrailingTriviaWasNewLine()) { + + var endTokenIndentation = nodeIndentation.getIndentation() + options.IndentSize; + doConsumeTokenAndAdvanceScanner(tokenInfo, node, getDynamicIndentation(node, endTokenIndentation, endTokenIndentation, nodeIndentation)); + } + } + } } ); diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index b83230047e8..3d5e08fed5a 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -319,6 +319,7 @@ module ts.formatting { case SyntaxKind.VariableStatement: case SyntaxKind.VariableDeclaration: case SyntaxKind.ExportAssignment: + case SyntaxKind.ReturnStatement: return true; default: return false; From 31e256f23f640581659659a218611b866694ee2f Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 30 Oct 2014 15:35:28 -0700 Subject: [PATCH 029/154] indent argument lists if they are on different line with parent --- src/services/formatting/format.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index e5e255e4d82..14b86a4f1dc 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -281,7 +281,13 @@ module ts.formatting { var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.kind === listStartToken) { // make sure that this token does not belong to the child - doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + var startTokenIndentation = nodeIndentation; + var tokenStartLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; + if (node.parent.kind !== SyntaxKind.SourceFile && tokenStartLine !== nodeStartLine) { + var indentation = nodeIndentation.getIndentation() + options.IndentSize; + startTokenIndentation = getDynamicIndentation(node, indentation, indentation, nodeIndentation); + } + doConsumeTokenAndAdvanceScanner(tokenInfo, node, startTokenIndentation); } } } @@ -301,6 +307,7 @@ module ts.formatting { } } } + } ); From 7f3842f8cfe3833341b62a061fe0b1e514f97c2a Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 30 Oct 2014 15:58:05 -0700 Subject: [PATCH 030/154] drop wasNewLine if previous token has no trailing trivia --- src/services/formatting/formattingScanner.ts | 14 ++++++++++---- .../formattingOnStatementsWithNoSemicolon.ts | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index 3728ebeb417..fc6aa6dd20c 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -31,17 +31,23 @@ module ts.formatting { function advance(): void { lastTokenInfo = undefined; + var isStarted = scanner.getStartPos() !== enclosingNode.pos; // accumulate leading trivia and token - if (trailingTrivia) { - Debug.assert(trailingTrivia.length); - wasNewLine = trailingTrivia[trailingTrivia.length - 1].kind === SyntaxKind.NewLineTrivia; + if (isStarted) { + if (trailingTrivia) { + Debug.assert(trailingTrivia.length); + wasNewLine = trailingTrivia[trailingTrivia.length - 1].kind === SyntaxKind.NewLineTrivia; + } + else { + wasNewLine = false; + } } leadingTrivia = undefined; trailingTrivia = undefined; - if (scanner.getStartPos() === enclosingNode.pos) { + if (!isStarted) { scanner.scan(); } diff --git a/tests/cases/fourslash/formattingOnStatementsWithNoSemicolon.ts b/tests/cases/fourslash/formattingOnStatementsWithNoSemicolon.ts index 8456182036d..c49152f5011 100644 --- a/tests/cases/fourslash/formattingOnStatementsWithNoSemicolon.ts +++ b/tests/cases/fourslash/formattingOnStatementsWithNoSemicolon.ts @@ -135,9 +135,9 @@ verify.currentLineContentIs(" return 0"); goTo.marker("51"); verify.currentLineContentIs("}).then(function(doc) {"); goTo.marker("52"); -verify.currentLineContentIs(" return 1"); +verify.currentLineContentIs(" return 1"); goTo.marker("53"); -verify.currentLineContentIs(" });"); +verify.currentLineContentIs("});"); goTo.marker("54"); verify.currentLineContentIs("if (1)"); goTo.marker("55"); From e270bda57e15784b753ad478c5e444cde6d0dffc Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 31 Oct 2014 14:38:21 -0700 Subject: [PATCH 031/154] update test baselines --- .../consistenceOnIndentionsOfObjectsInAListAfterFormatting.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cases/fourslash/consistenceOnIndentionsOfObjectsInAListAfterFormatting.ts b/tests/cases/fourslash/consistenceOnIndentionsOfObjectsInAListAfterFormatting.ts index 310f91915db..b41b2281e29 100644 --- a/tests/cases/fourslash/consistenceOnIndentionsOfObjectsInAListAfterFormatting.ts +++ b/tests/cases/fourslash/consistenceOnIndentionsOfObjectsInAListAfterFormatting.ts @@ -8,4 +8,4 @@ format.document(); goTo.marker("1"); verify.currentLineContentIs("}, {"); goTo.marker("2"); -verify.currentLineContentIs(" });"); \ No newline at end of file +verify.currentLineContentIs("});"); \ No newline at end of file From f28c1a34983f2532379a24674848af4193835484 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 5 Nov 2014 15:23:11 -0800 Subject: [PATCH 032/154] fix indentations in functions --- src/services/formatting/format.ts | 283 ++++++++++++++---- src/services/formatting/smartIndenter.ts | 6 +- ...dentionsOfObjectsInAListAfterFormatting.ts | 2 +- 3 files changed, 233 insertions(+), 58 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 14b86a4f1dc..e96608bbf71 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -17,10 +17,14 @@ module ts.formatting { } interface DynamicIndentation { - getIndentation(): number; - getCommentIndentation(): number; + getEffectiveIndentation(line: number, kind: SyntaxKind): number; + getEffectiveCommentIndentation(line: number): number; + getDelta(): number; + getBaseIndentation(): number; + getBaseCommentIndentation(): number; increaseCommentIndentation(delta: number): void; recomputeIndentation(lineAddedByFormatting: boolean): void; + setDelta(delta: number): number; } export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ @@ -61,6 +65,41 @@ module ts.formatting { return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatSelection); } + function isSomeBlock(kind: SyntaxKind): boolean { + switch (kind) { + case SyntaxKind.Block: + case SyntaxKind.FunctionBlock: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.ModuleBlock: + return true; + default: + return false; + } + } + + function indentChildNodes(kind: SyntaxKind): boolean { + if (SmartIndenter.nodeContentIsAlwaysIndented(kind)) { + return true; + } + switch (kind) { + case SyntaxKind.IfStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.Method: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + return true; + break; + } + return false; + } + function formatOutermostParent(position: number, expectedLastToken: SyntaxKind, sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, requestKind: FormattingRequestKind): TextChange[]{ var parent = findOutermostParent(position, expectedLastToken, sourceFile); if (!parent) { @@ -187,7 +226,8 @@ module ts.formatting { if (formattingScanner.isOnToken()) { var startLine = sourceFile.getLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile)).line; - processNode(enclosingNode, enclosingNode, startLine, initialIndentation); + var delta = indentChildNodes(enclosingNode.kind) ? options.IndentSize : 0; + processNode(enclosingNode, enclosingNode, startLine, initialIndentation, delta); } formattingScanner.close(); @@ -201,10 +241,35 @@ module ts.formatting { return 0; } - function getDynamicIndentation(node: Node, indentation: number, commentIndentation: number, parentIndentation: DynamicIndentation): DynamicIndentation { + function getDynamicIndentation(node: Node, nodeStartLine: number, indentation: number, commentIndentation: number, delta: number, parentIndentation: DynamicIndentation): DynamicIndentation { return { - getCommentIndentation: () => commentIndentation, - getIndentation: () => indentation, + getEffectiveCommentIndentation: (line) => { + if (nodeStartLine !== line) { + return commentIndentation + delta; + } + return commentIndentation; + }, + getEffectiveIndentation: (line, kind) => { + switch (kind) { + case SyntaxKind.OpenBraceToken: + case SyntaxKind.CloseBraceToken: + case SyntaxKind.OpenBracketToken: + case SyntaxKind.CloseBracketToken: + case SyntaxKind.ElseKeyword: + case SyntaxKind.WhileKeyword: + return indentation; + default: + return nodeStartLine !== line ? indentation + delta : indentation; + + } + //if (nodeStartLine !== line && kind !== SyntaxKind.CloseBraceToken) { + // return indentation + delta; + //} + //return indentation; + }, + getBaseIndentation: () => indentation, + getBaseCommentIndentation: () => commentIndentation, + getDelta: () => delta, recomputeIndentation: (lineAdded) => { if (parentIndentation) { parentIndentation.recomputeIndentation(lineAdded); @@ -217,6 +282,11 @@ module ts.formatting { }, increaseCommentIndentation: (delta) => { commentIndentation += delta; + }, + setDelta(newDelta: number): number { + var old = delta; + delta = newDelta; + return old; } } } @@ -228,15 +298,16 @@ module ts.formatting { var nodeStartLine = sourceFile.getLineAndCharacterFromPosition(start).line; var startLinePosition = getStartPositionOfLine(nodeStartLine, sourceFile); var shareLine = nodeStartLine === parentStartLine; - var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, start, sourceFile, options); // ? + var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, start, sourceFile, options); return shareLine && start !== column? -1 : column; } - function processNode(node: Node, contextNode: Node, nodeStartLine: number, indentation: number) { + function processNode(node: Node, contextNode: Node, nodeStartLine: number, indentation: number, delta: number) { if (!rangeOverlapsWithStartEnd(originalRange, node.getStart(sourceFile), node.getEnd())) { return; } - var nodeIndentation = getDynamicIndentation(node, indentation, indentation, undefined); + + var nodeIndentation = getDynamicIndentation(node, nodeStartLine, indentation, indentation, delta, undefined); var childContextNode = contextNode; forEachChild( @@ -283,11 +354,16 @@ module ts.formatting { // make sure that this token does not belong to the child var startTokenIndentation = nodeIndentation; var tokenStartLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; + var oldDelta = -1; if (node.parent.kind !== SyntaxKind.SourceFile && tokenStartLine !== nodeStartLine) { - var indentation = nodeIndentation.getIndentation() + options.IndentSize; - startTokenIndentation = getDynamicIndentation(node, indentation, indentation, nodeIndentation); + oldDelta = nodeIndentation.setDelta(options.IndentSize); + //var indentation = nodeIndentation.getIndentation() + options.IndentSize; + //startTokenIndentation = getDynamicIndentation(node, indentation, indentation, nodeIndentation); } doConsumeTokenAndAdvanceScanner(tokenInfo, node, startTokenIndentation); + if (oldDelta !== -1) { + nodeIndentation.setDelta(oldDelta); + } } } } @@ -301,9 +377,10 @@ module ts.formatting { if (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.kind === listEndToken && formattingScanner.lastTrailingTriviaWasNewLine()) { - - var endTokenIndentation = nodeIndentation.getIndentation() + options.IndentSize; - doConsumeTokenAndAdvanceScanner(tokenInfo, node, getDynamicIndentation(node, endTokenIndentation, endTokenIndentation, nodeIndentation)); + var old = nodeIndentation.setDelta(options.IndentSize); + //var endTokenIndentation = nodeIndentation.getIndentation() + options.IndentSize; + doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + nodeIndentation.setDelta(old); } } } @@ -318,7 +395,7 @@ module ts.formatting { break; } - if (SmartIndenter.nodeContentIsAlwaysIndented(node) && node.end === tokenInfo.token.end) { + if (SmartIndenter.nodeContentIsAlwaysIndented(node.kind) && node.end === tokenInfo.token.end) { nodeIndentation.increaseCommentIndentation(options.IndentSize); } doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); @@ -347,62 +424,159 @@ module ts.formatting { var childStart = sourceFile.getLineAndCharacterFromPosition(start); var actualIndentation = inheritedIndentation; - + var childIndentationAmount: number; + var childDelta: number = 0; var isChildInRange = rangeOverlapsWithStartEnd(originalRange, start, child.getEnd()); - - var childIndentationValue: number; if (containingList) { - if (isChildInRange) { + if (isChildInRange) { if (inheritedIndentation !== undefined) { - // use indentation inherited from preceding list items - childIndentationValue = inheritedIndentation; - } - else { - var increaseIndentation = - node.kind !== SyntaxKind.SourceFile && - node.pos !== child.pos && - formattingScanner.lastTrailingTriviaWasNewLine(); - - var childIndentationValue = - increaseIndentation - ? nodeIndentation.getIndentation() + options.IndentSize - : nodeIndentation.getIndentation(); + childIndentationAmount = inheritedIndentation; + childDelta = 0; } } else { - // child is a list item that is not in span being formatted - // fetch actual indentation for the child item to push it downstream - // TODO: ensure that indentation is picked correctly var actualIndentation = getListItemIndentation(containingList, listElementIndex, nodeStartLine, options); if (actualIndentation !== -1) { - inheritedIndentation = actualIndentation; + inheritedIndentation = childIndentationAmount = actualIndentation; + childDelta = 0; } - var childIndentationValue = inheritedIndentation || nodeIndentation.getIndentation(); } } - else { - var shareLine = nodeStartLine === childStart.line; - var increaseIndentation = - !shareLine && - !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && - SmartIndenter.shouldIndentChildNode(node, child); - var childIndentationValue = - increaseIndentation - ? nodeIndentation.getIndentation() + options.IndentSize - : nodeIndentation.getIndentation(); + + if (childIndentationAmount === undefined) { + if (isSomeBlock(child.kind)) { + // child is indented + childDelta = options.IndentSize; + if (isSomeBlock(node.kind) || node.kind === SyntaxKind.SourceFile || node.kind === SyntaxKind.CaseClause || node.kind === SyntaxKind.DefaultClause) { + childIndentationAmount = nodeIndentation.getBaseIndentation() + nodeIndentation.getDelta(); + } + else { + childIndentationAmount = nodeIndentation.getBaseIndentation(); + } + } + else { + var increaseIndentation = SmartIndenter.nodeContentIsAlwaysIndented(child.kind); + if (!increaseIndentation) { + switch (child.kind) { + case SyntaxKind.IfStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.Method: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + increaseIndentation = true; + break; + } + } + //var increaseIndentation = + // !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && + // SmartIndenter.shouldIndentChildNode(child, undefined); + if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) || node.kind === SyntaxKind.PropertyAccess) { + childIndentationAmount = nodeIndentation.getBaseIndentation(); + } + else { + childIndentationAmount = nodeIndentation.getBaseIndentation() + nodeIndentation.getDelta(); + } + if (increaseIndentation) { + childDelta = options.IndentSize; + } + } } - var childIndentation = getDynamicIndentation(node, childIndentationValue, childIndentationValue, nodeIndentation); + ////var childIndentationValue: number; + //var childIndentationAmount: number; + //var childDelta: number; + //if (containingList) { + // childDelta = 0; + // if (isChildInRange) { + // if (inheritedIndentation !== undefined) { + // // use indentation inherited from preceding list items + // // childIndentationValue = inheritedIndentation; + // childIndentationAmount = inheritedIndentation; + + // } + // else { + // childIndentationAmount = nodeIndentation.getEffectiveIndentation(childStart.line, child.kind); + // //var increaseIndentation = + // // node.kind !== SyntaxKind.SourceFile && + // // node.pos !== child.pos && + // // formattingScanner.lastTrailingTriviaWasNewLine(); + + // //var childIndentationValue = + // // increaseIndentation + // // ? nodeIndentation.getIndentation() + options.IndentSize + // // : nodeIndentation.getIndentation(); + // } + // } + // else { + // // child is a list item that is not in span being formatted + // // fetch actual indentation for the child item to push it downstream + // // TODO: ensure that indentation is picked correctly + // var actualIndentation = getListItemIndentation(containingList, listElementIndex, nodeStartLine, options); + // if (actualIndentation !== -1) { + // inheritedIndentation = actualIndentation; + // childIndentationAmount = actualIndentation; + // } + // else { + // childIndentationAmount = nodeIndentation.getEffectiveIndentation(childStart.line, child.kind); + // } + // } + + // var increaseIndentation = + // // !shareLine && + // !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && + // SmartIndenter.shouldIndentChildNode(node, child); + + // childIndentationAmount = nodeIndentation.getEffectiveIndentation(childStart.line, child.kind); + + // if (increaseIndentation) { + // childDelta = options.IndentSize; + // } + // else { + // childDelta = 0; + // } + //} + //else { + + // //var shareLine = nodeStartLine === childStart.line; + // var increaseIndentation = + // // !shareLine && + // !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && + // SmartIndenter.shouldIndentChildNode(node, child); + + // childIndentationAmount = nodeIndentation.getEffectiveIndentation(childStart.line, child.kind); + + // if (increaseIndentation) { + // childDelta = options.IndentSize; + // } + // else { + // childDelta = 0; + // } + // //var childIndentationValue = + // // increaseIndentation + // // ? nodeIndentation.getIndentation() + options.IndentSize + // // : nodeIndentation.getIndentation(); + //} + + if (nodeStartLine === childStart.line) { + childIndentationAmount = nodeIndentation.getBaseIndentation(); + childDelta = Math.min(options.IndentSize, delta + childDelta); + } // ensure that current token is inside child node if (isToken(child)) { var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); + var childIndentation = getDynamicIndentation(node, nodeStartLine, childIndentationAmount, childIndentationAmount, childDelta, nodeIndentation); doConsumeTokenAndAdvanceScanner(tokenInfo, node, childIndentation); } else { - processNode(child, childContextNode, childStart.line, childIndentationValue); + processNode(child, childContextNode, childStart.line, childIndentationAmount, childDelta); childContextNode = node; } return inheritedIndentation; @@ -427,9 +601,9 @@ module ts.formatting { var isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); var indentToken: boolean = true; + var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); if (isTokenInRange) { - var prevStartLine = previousRangeStartLine; - var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); + var prevStartLine = previousRangeStartLine; lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, contextNode, indentation); if (lineAdded !== undefined) { indentToken = lineAdded; @@ -449,15 +623,16 @@ module ts.formatting { if (currentTokenInfo.leadingTrivia) { for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { var triviaItem = currentTokenInfo.leadingTrivia[i]; + var triviaStartLine = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos).line; if (rangeContainsRange(originalRange, triviaItem)) { switch (triviaItem.kind) { case SyntaxKind.MultiLineCommentTrivia: - indentMultilineComment(triviaItem, indentation.getCommentIndentation(), /*firstLineIsIndented*/ !indentNextTokenOrTrivia); + indentMultilineComment(triviaItem, indentation.getBaseCommentIndentation(), /*firstLineIsIndented*/ !indentNextTokenOrTrivia); indentNextTokenOrTrivia = false; break; case SyntaxKind.SingleLineCommentTrivia: if (indentNextTokenOrTrivia) { - insertIndentation(triviaItem.pos, indentation.getCommentIndentation(), /*lineAdded*/ false); + insertIndentation(triviaItem.pos, indentation.getBaseCommentIndentation(), /*lineAdded*/ false); indentNextTokenOrTrivia = false; } break; @@ -472,7 +647,7 @@ module ts.formatting { } } if (isTokenInRange) { - insertIndentation(currentTokenInfo.token.pos, indentation.getIndentation(), lineAdded); + insertIndentation(currentTokenInfo.token.pos, indentation.getEffectiveIndentation(tokenStart.line, currentTokenInfo.token.kind), lineAdded); } } diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 3d5e08fed5a..ac15085509b 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -296,8 +296,8 @@ module ts.formatting { return column; } - export function nodeContentIsAlwaysIndented(n: Node): boolean { - switch (n.kind) { + export function nodeContentIsAlwaysIndented(kind: SyntaxKind): boolean { + switch (kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: case SyntaxKind.EnumDeclaration: @@ -327,7 +327,7 @@ module ts.formatting { } export function shouldIndentChildNode(parent: Node, child: Node): boolean { - if (nodeContentIsAlwaysIndented(parent)) { + if (nodeContentIsAlwaysIndented(parent.kind)) { return true; } switch (parent.kind) { diff --git a/tests/cases/fourslash/consistenceOnIndentionsOfObjectsInAListAfterFormatting.ts b/tests/cases/fourslash/consistenceOnIndentionsOfObjectsInAListAfterFormatting.ts index b41b2281e29..310f91915db 100644 --- a/tests/cases/fourslash/consistenceOnIndentionsOfObjectsInAListAfterFormatting.ts +++ b/tests/cases/fourslash/consistenceOnIndentionsOfObjectsInAListAfterFormatting.ts @@ -8,4 +8,4 @@ format.document(); goTo.marker("1"); verify.currentLineContentIs("}, {"); goTo.marker("2"); -verify.currentLineContentIs("});"); \ No newline at end of file +verify.currentLineContentIs(" });"); \ No newline at end of file From 9a30fa882b36119a3fc74aa1ac78d5e3675adc42 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 5 Nov 2014 15:29:51 -0800 Subject: [PATCH 033/154] do not indent tokens with errors --- src/services/formatting/format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index e96608bbf71..fb18792d05b 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -646,7 +646,7 @@ module ts.formatting { } } } - if (isTokenInRange) { + if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { insertIndentation(currentTokenInfo.token.pos, indentation.getEffectiveIndentation(tokenStart.line, currentTokenInfo.token.kind), lineAdded); } } From 680b59481bb74f0d6974d2e1ba83d5bfd23a9e4d Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 5 Nov 2014 15:35:18 -0800 Subject: [PATCH 034/154] fix indentation for nested items --- src/services/formatting/format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index fb18792d05b..0387ce87c12 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -272,7 +272,7 @@ module ts.formatting { getDelta: () => delta, recomputeIndentation: (lineAdded) => { if (parentIndentation) { - parentIndentation.recomputeIndentation(lineAdded); + //parentIndentation.recomputeIndentation(lineAdded); } var delta = getIndentationDelta(node, lineAdded); if (delta) { From 13054710c7134e5cb9af1816e05d939d795c5985 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 5 Nov 2014 17:07:47 -0800 Subject: [PATCH 035/154] track effective parent indentation for list items --- src/services/formatting/format.ts | 109 ++++-------------------------- 1 file changed, 13 insertions(+), 96 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 0387ce87c12..23d4fd337dc 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -241,7 +241,7 @@ module ts.formatting { return 0; } - function getDynamicIndentation(node: Node, nodeStartLine: number, indentation: number, commentIndentation: number, delta: number, parentIndentation: DynamicIndentation): DynamicIndentation { + function getDynamicIndentation(node: Node, nodeStartLine: number, indentation: number, commentIndentation: number, delta: number): DynamicIndentation { return { getEffectiveCommentIndentation: (line) => { if (nodeStartLine !== line) { @@ -262,18 +262,11 @@ module ts.formatting { return nodeStartLine !== line ? indentation + delta : indentation; } - //if (nodeStartLine !== line && kind !== SyntaxKind.CloseBraceToken) { - // return indentation + delta; - //} - //return indentation; }, getBaseIndentation: () => indentation, getBaseCommentIndentation: () => commentIndentation, getDelta: () => delta, recomputeIndentation: (lineAdded) => { - if (parentIndentation) { - //parentIndentation.recomputeIndentation(lineAdded); - } var delta = getIndentationDelta(node, lineAdded); if (delta) { indentation += delta; @@ -307,13 +300,13 @@ module ts.formatting { return; } - var nodeIndentation = getDynamicIndentation(node, nodeStartLine, indentation, indentation, delta, undefined); + var nodeIndentation = getDynamicIndentation(node, nodeStartLine, indentation, indentation, delta); var childContextNode = contextNode; forEachChild( node, child => { - processChildNode(child, undefined, /*containingList*/ undefined, /*listElementIndex*/ -1) + processChildNode(child, undefined, nodeStartLine, /*containingList*/ undefined, /*listElementIndex*/ -1) }, nodes => { var listStartToken = SyntaxKind.Unknown; @@ -369,8 +362,9 @@ module ts.formatting { } var inheritedIndentation: number = undefined; + var effectiveStartLine = tokenStartLine || nodeStartLine; for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, /*containingList*/ nodes, /*listElementIndex*/ i) + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, effectiveStartLine, /*containingList*/ nodes, /*listElementIndex*/ i) } if (listEndToken !== SyntaxKind.Unknown) { @@ -403,7 +397,7 @@ module ts.formatting { /// Local functions - function processChildNode(child: Node, inheritedIndentation: number, containingList: Node[], listElementIndex: number): number { + function processChildNode(child: Node, inheritedIndentation: number, nodeEffectiveStartLine: number, containingList: Node[], listElementIndex: number): number { if (child.kind === SyntaxKind.Missing) { return inheritedIndentation; } @@ -435,7 +429,7 @@ module ts.formatting { } } else { - var actualIndentation = getListItemIndentation(containingList, listElementIndex, nodeStartLine, options); + var actualIndentation = getListItemIndentation(containingList, listElementIndex, nodeEffectiveStartLine, options); if (actualIndentation !== -1) { inheritedIndentation = childIndentationAmount = actualIndentation; childDelta = 0; @@ -472,98 +466,21 @@ module ts.formatting { break; } } - //var increaseIndentation = - // !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && - // SmartIndenter.shouldIndentChildNode(child, undefined); - if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) || node.kind === SyntaxKind.PropertyAccess) { + + if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile)) { childIndentationAmount = nodeIndentation.getBaseIndentation(); } else { childIndentationAmount = nodeIndentation.getBaseIndentation() + nodeIndentation.getDelta(); } + if (increaseIndentation) { childDelta = options.IndentSize; } } - } - - - ////var childIndentationValue: number; - //var childIndentationAmount: number; - //var childDelta: number; - //if (containingList) { - // childDelta = 0; - // if (isChildInRange) { - // if (inheritedIndentation !== undefined) { - // // use indentation inherited from preceding list items - // // childIndentationValue = inheritedIndentation; - // childIndentationAmount = inheritedIndentation; - - // } - // else { - // childIndentationAmount = nodeIndentation.getEffectiveIndentation(childStart.line, child.kind); - // //var increaseIndentation = - // // node.kind !== SyntaxKind.SourceFile && - // // node.pos !== child.pos && - // // formattingScanner.lastTrailingTriviaWasNewLine(); - - // //var childIndentationValue = - // // increaseIndentation - // // ? nodeIndentation.getIndentation() + options.IndentSize - // // : nodeIndentation.getIndentation(); - // } - // } - // else { - // // child is a list item that is not in span being formatted - // // fetch actual indentation for the child item to push it downstream - // // TODO: ensure that indentation is picked correctly - // var actualIndentation = getListItemIndentation(containingList, listElementIndex, nodeStartLine, options); - // if (actualIndentation !== -1) { - // inheritedIndentation = actualIndentation; - // childIndentationAmount = actualIndentation; - // } - // else { - // childIndentationAmount = nodeIndentation.getEffectiveIndentation(childStart.line, child.kind); - // } - // } - - // var increaseIndentation = - // // !shareLine && - // !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && - // SmartIndenter.shouldIndentChildNode(node, child); - - // childIndentationAmount = nodeIndentation.getEffectiveIndentation(childStart.line, child.kind); - - // if (increaseIndentation) { - // childDelta = options.IndentSize; - // } - // else { - // childDelta = 0; - // } - //} - //else { - - // //var shareLine = nodeStartLine === childStart.line; - // var increaseIndentation = - // // !shareLine && - // !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile) && - // SmartIndenter.shouldIndentChildNode(node, child); - - // childIndentationAmount = nodeIndentation.getEffectiveIndentation(childStart.line, child.kind); - - // if (increaseIndentation) { - // childDelta = options.IndentSize; - // } - // else { - // childDelta = 0; - // } - // //var childIndentationValue = - // // increaseIndentation - // // ? nodeIndentation.getIndentation() + options.IndentSize - // // : nodeIndentation.getIndentation(); - //} + } - if (nodeStartLine === childStart.line) { + if (nodeEffectiveStartLine === childStart.line) { childIndentationAmount = nodeIndentation.getBaseIndentation(); childDelta = Math.min(options.IndentSize, delta + childDelta); } @@ -572,7 +489,7 @@ module ts.formatting { if (isToken(child)) { var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); - var childIndentation = getDynamicIndentation(node, nodeStartLine, childIndentationAmount, childIndentationAmount, childDelta, nodeIndentation); + var childIndentation = getDynamicIndentation(node, nodeEffectiveStartLine, childIndentationAmount, childIndentationAmount, childDelta); doConsumeTokenAndAdvanceScanner(tokenInfo, node, childIndentation); } else { From 154977ce95ccbe084133666aa8c1847a37bebf90 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 5 Nov 2014 19:35:53 -0800 Subject: [PATCH 036/154] add child delta for all nodes --- src/services/formatting/format.ts | 47 ++++++++++++++++--------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 23d4fd337dc..397f074820d 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -449,24 +449,6 @@ module ts.formatting { } } else { - var increaseIndentation = SmartIndenter.nodeContentIsAlwaysIndented(child.kind); - if (!increaseIndentation) { - switch (child.kind) { - case SyntaxKind.IfStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.Method: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - increaseIndentation = true; - break; - } - } - if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile)) { childIndentationAmount = nodeIndentation.getBaseIndentation(); } @@ -474,12 +456,31 @@ module ts.formatting { childIndentationAmount = nodeIndentation.getBaseIndentation() + nodeIndentation.getDelta(); } - if (increaseIndentation) { - childDelta = options.IndentSize; - } + } - } - + } + + var increaseIndentation = SmartIndenter.nodeContentIsAlwaysIndented(child.kind); + if (!increaseIndentation) { + switch (child.kind) { + case SyntaxKind.IfStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.Method: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + increaseIndentation = true; + break; + } + } + if (increaseIndentation) { + childDelta = options.IndentSize; + } + if (nodeEffectiveStartLine === childStart.line) { childIndentationAmount = nodeIndentation.getBaseIndentation(); childDelta = Math.min(options.IndentSize, delta + childDelta); From bbc2da79bbf1afd210c1f3336a9c03ddeeb75fd0 Mon Sep 17 00:00:00 2001 From: vladima Date: Thu, 6 Nov 2014 00:37:58 -0800 Subject: [PATCH 037/154] return last scanned token if possible --- src/services/formatting/formattingScanner.ts | 85 ++++++++++++++------ 1 file changed, 60 insertions(+), 25 deletions(-) diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index fc12bb97cce..2d588046f1f 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -9,6 +9,12 @@ module ts.formatting { close(): void; } + const enum ScanAction{ + Normal, + RescanGreaterThanToken, + RescanSlashToken + } + export function getFormattingScanner(sourceFile: SourceFile, enclosingNode: Node, range: TextRange): FormattingScanner { scanner.setText(sourceFile.text); @@ -17,23 +23,26 @@ module ts.formatting { var wasNewLine: boolean = true; var leadingTrivia: TextRangeWithKind[]; var trailingTrivia: TextRangeWithKind[]; + var savedStartPos: number; + var lastScanAction: ScanAction; var lastTokenInfo: TokenInfo; return { advance: advance, readTokenInfo: readTokenInfo, isOnToken: isOnToken, - lastTrailingTriviaWasNewLine: lastTrailingTriviaWasNewLine, - close: () => scanner.setText(undefined) + lastTrailingTriviaWasNewLine: () => wasNewLine, + close: () => { + lastTokenInfo = undefined; + scanner.setText(undefined); + } } - function advance(): void { lastTokenInfo = undefined; var isStarted = scanner.getStartPos() !== enclosingNode.pos; - // accumulate leading trivia and token if (isStarted) { if (trailingTrivia) { Debug.assert(trailingTrivia.length !== 0); @@ -79,17 +88,28 @@ module ts.formatting { savedStartPos = scanner.getStartPos(); } - function startsWithGreaterThanToken(t: SyntaxKind): boolean { - switch(t) { + function shouldRescanGreaterThanToken(container: Node): boolean { + if (container.kind !== SyntaxKind.BinaryExpression) { + return false; + } + switch ((container).operator) { case SyntaxKind.GreaterThanEqualsToken: case SyntaxKind.GreaterThanGreaterThanEqualsToken: case SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken: case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: case SyntaxKind.GreaterThanGreaterThanToken: return true; - default: - return false; } + + return false; + } + + function shouldRescanSlashToken(container: Node): boolean { + return container.kind === SyntaxKind.RegularExpressionLiteral; + } + + function startsWithSlashToken(t: SyntaxKind): boolean { + return t === SyntaxKind.SlashToken || t === SyntaxKind.SlashEqualsToken; } function readTokenInfo(n: Node): TokenInfo { @@ -101,8 +121,21 @@ module ts.formatting { }; } + if (lastTokenInfo) { - //return lastTokenInfo; + if (shouldRescanGreaterThanToken(n)) { + if (lastScanAction === ScanAction.RescanGreaterThanToken) { + return lastTokenInfo; + } + } + else if (shouldRescanSlashToken(n)) { + if (lastScanAction === ScanAction.RescanSlashToken) { + return lastTokenInfo; + } + } + else if (lastScanAction === ScanAction.Normal) { + return lastTokenInfo; + } } if (scanner.getStartPos() !== savedStartPos) { @@ -110,15 +143,21 @@ module ts.formatting { scanner.scan(); } - var current = scanner.getToken(); + var currentToken = scanner.getToken(); var endPos: number; - if (n.kind === SyntaxKind.BinaryExpression && startsWithGreaterThanToken((n).operator) && current === SyntaxKind.GreaterThanToken) { - current = scanner.reScanGreaterToken(); - Debug.assert((n).operator === current); + + if (currentToken === SyntaxKind.GreaterThanToken && shouldRescanGreaterThanToken(n)) { + currentToken = scanner.reScanGreaterToken(); + Debug.assert((n).operator === currentToken); + lastScanAction = ScanAction.RescanGreaterThanToken; } - else if (n.kind === SyntaxKind.RegularExpressionLiteral && current === SyntaxKind.SlashToken) { - current = scanner.reScanSlashToken(); - Debug.assert(n.kind === current); + else if (n.kind === SyntaxKind.RegularExpressionLiteral && startsWithSlashToken(currentToken)) { + currentToken = scanner.reScanSlashToken(); + Debug.assert(n.kind === currentToken); + lastScanAction = ScanAction.RescanSlashToken; + } + else { + lastScanAction = ScanAction.Normal; } endPos = scanner.getTextPos(); @@ -126,18 +165,18 @@ module ts.formatting { var token: TextRangeWithKind = { pos: scanner.getStartPos(), end: scanner.getTextPos(), - kind: current + kind: currentToken } while(scanner.getStartPos() < range.end) { - current = scanner.scan(); - if (!isTrivia(current)) { + currentToken = scanner.scan(); + if (!isTrivia(currentToken)) { break; } var trivia = { pos: scanner.getStartPos(), end: scanner.getTextPos(), - kind: current + kind: currentToken }; if (!trailingTrivia) { @@ -146,7 +185,7 @@ module ts.formatting { trailingTrivia.push(trivia); - if (current === SyntaxKind.NewLineTrivia) { + if (currentToken === SyntaxKind.NewLineTrivia) { // move past new line scanner.scan(); break; @@ -165,9 +204,5 @@ module ts.formatting { var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); return startPos < range.end && current !== SyntaxKind.EndOfFileToken && !isTrivia(current); } - - function lastTrailingTriviaWasNewLine(): boolean { - return wasNewLine; - } } } \ No newline at end of file From ace99ad05147d3b63a6facbdb1e8c712518e0a46 Mon Sep 17 00:00:00 2001 From: vladima Date: Thu, 6 Nov 2014 10:57:19 -0800 Subject: [PATCH 038/154] code cleanup, removed unused files --- src/services/formatting/format.ts | 184 +++---- src/services/formatting/formattingScanner.ts | 31 +- src/services/formatting/new/formatter.ts | 320 ------------ src/services/formatting/new/formatting.ts | 13 +- .../formatting/new/formattingManager.ts | 123 ----- .../formatting/new/formattingRequestKind.ts | 2 +- .../formatting/new/indentationNodeContext.ts | 103 ---- .../new/indentationNodeContextPool.ts | 43 -- .../new/indentationTrackingWalker.ts | 349 ------------- .../formatting/new/multipleTokenIndenter.ts | 206 -------- src/services/formatting/new/ruleAction.ts | 2 +- src/services/formatting/new/ruleFlag.ts | 2 +- .../formatting/new/smartIndenter.ts.orig | 476 ------------------ src/services/formatting/new/snapshotPoint.ts | 30 -- src/services/formatting/new/textEditInfo.ts | 28 -- src/services/formatting/new/textSnapshot.ts | 89 ---- .../formatting/new/textSnapshotLine.ts | 80 --- 17 files changed, 112 insertions(+), 1969 deletions(-) delete mode 100644 src/services/formatting/new/formatter.ts delete mode 100644 src/services/formatting/new/formattingManager.ts delete mode 100644 src/services/formatting/new/indentationNodeContext.ts delete mode 100644 src/services/formatting/new/indentationNodeContextPool.ts delete mode 100644 src/services/formatting/new/indentationTrackingWalker.ts delete mode 100644 src/services/formatting/new/multipleTokenIndenter.ts delete mode 100644 src/services/formatting/new/smartIndenter.ts.orig delete mode 100644 src/services/formatting/new/snapshotPoint.ts delete mode 100644 src/services/formatting/new/textEditInfo.ts delete mode 100644 src/services/formatting/new/textSnapshot.ts delete mode 100644 src/services/formatting/new/textSnapshotLine.ts diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 397f074820d..0adc2cb00fb 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -16,18 +16,22 @@ module ts.formatting { trailingTrivia: TextRangeWithKind[]; } + const enum Indentation { + Unknown = -1 + } + interface DynamicIndentation { - getEffectiveIndentation(line: number, kind: SyntaxKind): number; - getEffectiveCommentIndentation(line: number): number; + getEffectiveIndentation(tokenLine: number, kind: SyntaxKind): number; + getEffectiveCommentIndentation(commentLine: number): number; getDelta(): number; - getBaseIndentation(): number; - getBaseCommentIndentation(): number; + getIndentation(): number; + getCommentIndentation(): number; increaseCommentIndentation(delta: number): void; recomputeIndentation(lineAddedByFormatting: boolean): void; setDelta(delta: number): number; } - export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ + export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { var line = sourceFile.getLineAndCharacterFromPosition(position).line; Debug.assert(line >= 2); // get the span for the previous\current line @@ -36,11 +40,11 @@ module ts.formatting { pos: getStartPositionOfLine(line - 1, sourceFile), // get end position for the current line (end value is exclusive so add 1 to the result) end: getEndLinePosition(line, sourceFile) + 1 - } + } return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnEnter); } - export function formatOnSemicolon(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ + export function formatOnSemicolon(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { return formatOutermostParent(position, SyntaxKind.SemicolonToken, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnSemicolon); } @@ -48,15 +52,15 @@ module ts.formatting { return formatOutermostParent(position, SyntaxKind.CloseBraceToken, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnClosingCurlyBrace); } - export function formatDocument(sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ + export function formatDocument(sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { var span = { pos: 0, end: sourceFile.text.length }; return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatDocument); } - - export function formatSelection(start: number, end: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[]{ + + export function formatSelection(start: number, end: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { // format from the beginning of the line var span = { pos: getStartLinePositionForPosition(start, sourceFile), @@ -65,42 +69,7 @@ module ts.formatting { return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatSelection); } - function isSomeBlock(kind: SyntaxKind): boolean { - switch (kind) { - case SyntaxKind.Block: - case SyntaxKind.FunctionBlock: - case SyntaxKind.TryBlock: - case SyntaxKind.CatchBlock: - case SyntaxKind.FinallyBlock: - case SyntaxKind.ModuleBlock: - return true; - default: - return false; - } - } - - function indentChildNodes(kind: SyntaxKind): boolean { - if (SmartIndenter.nodeContentIsAlwaysIndented(kind)) { - return true; - } - switch (kind) { - case SyntaxKind.IfStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.Method: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - return true; - break; - } - return false; - } - - function formatOutermostParent(position: number, expectedLastToken: SyntaxKind, sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, requestKind: FormattingRequestKind): TextChange[]{ + function formatOutermostParent(position: number, expectedLastToken: SyntaxKind, sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, requestKind: FormattingRequestKind): TextChange[] { var parent = findOutermostParent(position, expectedLastToken, sourceFile); if (!parent) { return []; @@ -121,9 +90,9 @@ module ts.formatting { // walk up and search for the parent node that ends at the same position with precedingToken var current = precedingToken; while (current && - current.parent && - current.parent.end === precedingToken.end && - !isListElement(current.parent, current) ) { + current.parent && + current.parent.end === precedingToken.end && + !isListElement(current.parent, current)) { current = current.parent; } @@ -152,25 +121,26 @@ module ts.formatting { return find(sourceFile); function find(n: Node): Node { + if (!n) { + return undefined; + } var candidate = forEachChild(n, c => startEndContainsRange(c.getStart(sourceFile), c.end, range) && c); - return (candidate && find(candidate)) || n; + return find(candidate) || n; } } function prepareRangeContainsErrorFunction(errors: Diagnostic[], originalRange: TextRange): (r: TextRange) => boolean { if (!errors.length) { - // no errors - always return false - return r => false; + return rangeHasNoErrors; } else { // pick only errors that fall in range var sorted = errors .filter(d => d.isParseError && (d.start >= originalRange.pos && d.start + d.length < originalRange.end)) .sort((e1, e2) => e1.start - e2.start); - + if (!sorted.length) { - // no errors in interesting span - always return false - return r => false; + return rangeHasNoErrors; } var index = 0; @@ -195,6 +165,10 @@ module ts.formatting { } } }; + + function rangeHasNoErrors(r: TextRange): boolean { + return false; + } } } @@ -202,7 +176,7 @@ module ts.formatting { sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, - requestKind: FormattingRequestKind): TextChange[]{ + requestKind: FormattingRequestKind): TextChange[] { var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.syntacticErrors, originalRange); @@ -212,7 +186,7 @@ module ts.formatting { var enclosingNode = findEnclosingNode(originalRange, sourceFile); var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); - var formattingScanner = getFormattingScanner(sourceFile, enclosingNode, originalRange); + var formattingScanner = getFormattingScanner(sourceFile, enclosingNode, originalRange); var previousRangeHasError: boolean; var previousRange: TextRangeWithKind; @@ -226,7 +200,7 @@ module ts.formatting { if (formattingScanner.isOnToken()) { var startLine = sourceFile.getLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile)).line; - var delta = indentChildNodes(enclosingNode.kind) ? options.IndentSize : 0; + var delta = shouldIndentChildNodes(enclosingNode.kind) ? options.IndentSize : 0; processNode(enclosingNode, enclosingNode, startLine, initialIndentation, delta); } @@ -263,8 +237,8 @@ module ts.formatting { } }, - getBaseIndentation: () => indentation, - getBaseCommentIndentation: () => commentIndentation, + getIndentation: () => indentation, + getCommentIndentation: () => commentIndentation, getDelta: () => delta, recomputeIndentation: (lineAdded) => { var delta = getIndentationDelta(node, lineAdded); @@ -292,7 +266,7 @@ module ts.formatting { var startLinePosition = getStartPositionOfLine(nodeStartLine, sourceFile); var shareLine = nodeStartLine === parentStartLine; var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, start, sourceFile, options); - return shareLine && start !== column? -1 : column; + return shareLine && start !== column ? Indentation.Unknown : column; } function processNode(node: Node, contextNode: Node, nodeStartLine: number, indentation: number, delta: number) { @@ -305,8 +279,8 @@ module ts.formatting { var childContextNode = contextNode; forEachChild( node, - child => { - processChildNode(child, undefined, nodeStartLine, /*containingList*/ undefined, /*listElementIndex*/ -1) + child => { + processChildNode(child, Indentation.Unknown, nodeStartLine, /*containingList*/ undefined, /*listElementIndex*/ -1) }, nodes => { var listStartToken = SyntaxKind.Unknown; @@ -317,7 +291,7 @@ module ts.formatting { case SyntaxKind.FunctionExpression: case SyntaxKind.Method: case SyntaxKind.ArrowFunction: - if ((node).typeParameters === nodes) { + if ((node).typeParameters === nodes) { listStartToken = SyntaxKind.LessThanToken listEndToken = SyntaxKind.GreaterThanToken; } @@ -361,7 +335,7 @@ module ts.formatting { } } - var inheritedIndentation: number = undefined; + var inheritedIndentation: number = Indentation.Unknown; var effectiveStartLine = tokenStartLine || nodeStartLine; for (var i = 0, len = nodes.length; i < len; ++i) { inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, effectiveStartLine, /*containingList*/ nodes, /*listElementIndex*/ i) @@ -380,7 +354,7 @@ module ts.formatting { } } - ); + ); // this eats up last tokens in the node while (formattingScanner.isOnToken()) { @@ -423,14 +397,14 @@ module ts.formatting { var isChildInRange = rangeOverlapsWithStartEnd(originalRange, start, child.getEnd()); if (containingList) { if (isChildInRange) { - if (inheritedIndentation !== undefined) { + if (inheritedIndentation !== Indentation.Unknown) { childIndentationAmount = inheritedIndentation; childDelta = 0; } } else { var actualIndentation = getListItemIndentation(containingList, listElementIndex, nodeEffectiveStartLine, options); - if (actualIndentation !== -1) { + if (actualIndentation !== Indentation.Unknown) { inheritedIndentation = childIndentationAmount = actualIndentation; childDelta = 0; } @@ -442,22 +416,20 @@ module ts.formatting { // child is indented childDelta = options.IndentSize; if (isSomeBlock(node.kind) || node.kind === SyntaxKind.SourceFile || node.kind === SyntaxKind.CaseClause || node.kind === SyntaxKind.DefaultClause) { - childIndentationAmount = nodeIndentation.getBaseIndentation() + nodeIndentation.getDelta(); + childIndentationAmount = nodeIndentation.getIndentation() + nodeIndentation.getDelta(); } else { - childIndentationAmount = nodeIndentation.getBaseIndentation(); + childIndentationAmount = nodeIndentation.getIndentation(); } } else { if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile)) { - childIndentationAmount = nodeIndentation.getBaseIndentation(); + childIndentationAmount = nodeIndentation.getIndentation(); } else { - childIndentationAmount = nodeIndentation.getBaseIndentation() + nodeIndentation.getDelta(); + childIndentationAmount = nodeIndentation.getIndentation() + nodeIndentation.getDelta(); } - - - } + } } var increaseIndentation = SmartIndenter.nodeContentIsAlwaysIndented(child.kind); @@ -482,7 +454,7 @@ module ts.formatting { } if (nodeEffectiveStartLine === childStart.line) { - childIndentationAmount = nodeIndentation.getBaseIndentation(); + childIndentationAmount = nodeIndentation.getIndentation(); childDelta = Math.min(options.IndentSize, delta + childDelta); } @@ -521,7 +493,7 @@ module ts.formatting { var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); if (isTokenInRange) { - var prevStartLine = previousRangeStartLine; + var prevStartLine = previousRangeStartLine; lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, contextNode, indentation); if (lineAdded !== undefined) { indentToken = lineAdded; @@ -545,12 +517,12 @@ module ts.formatting { if (rangeContainsRange(originalRange, triviaItem)) { switch (triviaItem.kind) { case SyntaxKind.MultiLineCommentTrivia: - indentMultilineComment(triviaItem, indentation.getBaseCommentIndentation(), /*firstLineIsIndented*/ !indentNextTokenOrTrivia); + indentMultilineComment(triviaItem, indentation.getCommentIndentation(), /*firstLineIsIndented*/ !indentNextTokenOrTrivia); indentNextTokenOrTrivia = false; break; case SyntaxKind.SingleLineCommentTrivia: if (indentNextTokenOrTrivia) { - insertIndentation(triviaItem.pos, indentation.getBaseCommentIndentation(), /*lineAdded*/ false); + insertIndentation(triviaItem.pos, indentation.getCommentIndentation(), /*lineAdded*/ false); indentNextTokenOrTrivia = false; } break; @@ -585,7 +557,7 @@ module ts.formatting { function processRange(range: TextRangeWithKind, rangeStart: LineAndCharacter, parent: Node, contextNode: Node, indentation: DynamicIndentation): boolean { var rangeHasError = rangeContainsError(range); var lineAdded: boolean; - if (!rangeHasError && !previousRangeHasError) { + if (!rangeHasError && !previousRangeHasError) { if (!previousRange) { // trim whitespaces starting from the beginning of the span up to the current line var originalStart = sourceFile.getLineAndCharacterFromPosition(originalRange.pos); @@ -647,8 +619,8 @@ module ts.formatting { // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line trimTrailingWhitespaces = - (rule.Operation.Action & (RuleAction.NewLine | RuleAction.Space)) && - rule.Flag !== RuleFlags.CanDeleteNewLines; + (rule.Operation.Action & (RuleAction.NewLine | RuleAction.Space)) && + rule.Flag !== RuleFlags.CanDeleteNewLines; } else { trimTrailingWhitespaces = true; @@ -721,8 +693,8 @@ module ts.formatting { var startLinePos = getStartPositionOfLine(startLine, sourceFile); var nonWhitespaceColumn = i === 0 - ? nonWhitespaceColumnInFirstPart - : SmartIndenter.findFirstNonWhitespaceColumn(parts[i].pos, parts[i].end, sourceFile, options); + ? nonWhitespaceColumnInFirstPart + : SmartIndenter.findFirstNonWhitespaceColumn(parts[i].pos, parts[i].end, sourceFile, options); var newIndentation = nonWhitespaceColumn + delta; if (newIndentation > 0) { @@ -757,7 +729,7 @@ module ts.formatting { } function newTextChange(start: number, len: number, newText: string): TextChange { - return { span: new TypeScript.TextSpan(start, len), newText: newText } + return { span: new TypeScript.TextSpan(start, len), newText: newText } } function recordDelete(start: number, len: number) { @@ -772,10 +744,10 @@ module ts.formatting { } } - function applyRuleEdits(rule: Rule, - previousRange: TextRangeWithKind, - previousStartLine: number, - currentRange: TextRangeWithKind, + function applyRuleEdits(rule: Rule, + previousRange: TextRangeWithKind, + previousStartLine: number, + currentRange: TextRangeWithKind, currentStartLine: number): void { var between: TextRange; @@ -817,4 +789,38 @@ module ts.formatting { } } } + function isSomeBlock(kind: SyntaxKind): boolean { + switch (kind) { + case SyntaxKind.Block: + case SyntaxKind.FunctionBlock: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.ModuleBlock: + return true; + default: + return false; + } + } + + function shouldIndentChildNodes(kind: SyntaxKind): boolean { + if (SmartIndenter.nodeContentIsAlwaysIndented(kind)) { + return true; + } + switch (kind) { + case SyntaxKind.IfStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.Method: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + return true; + break; + } + return false; + } } \ No newline at end of file diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index 2d588046f1f..c9dc2949d17 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -10,7 +10,7 @@ module ts.formatting { } const enum ScanAction{ - Normal, + Scan, RescanGreaterThanToken, RescanSlashToken } @@ -122,20 +122,15 @@ module ts.formatting { } - if (lastTokenInfo) { - if (shouldRescanGreaterThanToken(n)) { - if (lastScanAction === ScanAction.RescanGreaterThanToken) { - return lastTokenInfo; - } - } - else if (shouldRescanSlashToken(n)) { - if (lastScanAction === ScanAction.RescanSlashToken) { - return lastTokenInfo; - } - } - else if (lastScanAction === ScanAction.Normal) { - return lastTokenInfo; - } + var expectedScanAction = + shouldRescanSlashToken(n) + ? ScanAction.RescanGreaterThanToken + : shouldRescanSlashToken(n) + ? ScanAction.RescanSlashToken + : ScanAction.Scan + + if (lastTokenInfo && expectedScanAction === lastScanAction) { + return lastTokenInfo; } if (scanner.getStartPos() !== savedStartPos) { @@ -146,18 +141,18 @@ module ts.formatting { var currentToken = scanner.getToken(); var endPos: number; - if (currentToken === SyntaxKind.GreaterThanToken && shouldRescanGreaterThanToken(n)) { + if (expectedScanAction === ScanAction.RescanGreaterThanToken && currentToken === SyntaxKind.GreaterThanToken) { currentToken = scanner.reScanGreaterToken(); Debug.assert((n).operator === currentToken); lastScanAction = ScanAction.RescanGreaterThanToken; } - else if (n.kind === SyntaxKind.RegularExpressionLiteral && startsWithSlashToken(currentToken)) { + else if (expectedScanAction === ScanAction.RescanSlashToken && startsWithSlashToken(currentToken)) { currentToken = scanner.reScanSlashToken(); Debug.assert(n.kind === currentToken); lastScanAction = ScanAction.RescanSlashToken; } else { - lastScanAction = ScanAction.Normal; + lastScanAction = ScanAction.Scan; } endPos = scanner.getTextPos(); diff --git a/src/services/formatting/new/formatter.ts b/src/services/formatting/new/formatter.ts deleted file mode 100644 index e4a1229abef..00000000000 --- a/src/services/formatting/new/formatter.ts +++ /dev/null @@ -1,320 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class Formatter extends MultipleTokenIndenter { - private previousTokenSpan: TokenSpan = null; - private previousTokenParent: IndentationNodeContext = null; - - // TODO: implement it with skipped tokens in Fidelity - private scriptHasErrors: boolean = false; - - private rulesProvider: RulesProvider; - private formattingRequestKind: FormattingRequestKind; - private formattingContext: FormattingContext; - - constructor(textSpan: TextSpan, - sourceUnit: SourceUnitSyntax, - indentFirstToken: boolean, - options: FormattingOptions, - snapshot: ITextSnapshot, - rulesProvider: RulesProvider, - formattingRequestKind: FormattingRequestKind) { - - super(textSpan, sourceUnit, snapshot, indentFirstToken, options); - - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - - this.rulesProvider = rulesProvider; - this.formattingRequestKind = formattingRequestKind; - this.formattingContext = new FormattingContext(this.snapshot(), this.formattingRequestKind); - } - - public static getEdits(textSpan: TextSpan, - sourceUnit: SourceUnitSyntax, - options: FormattingOptions, - indentFirstToken: boolean, - snapshot: ITextSnapshot, - rulesProvider: RulesProvider, - formattingRequestKind: FormattingRequestKind): TextEditInfo[] { - var walker = new Formatter(textSpan, sourceUnit, indentFirstToken, options, snapshot, rulesProvider, formattingRequestKind); - visitNodeOrToken(walker, sourceUnit); - return walker.edits(); - } - - public visitTokenInSpan(token: ISyntaxToken): void { - if (token.fullWidth() !== 0) { - var tokenSpan = new TextSpan(this.position() + token.leadingTriviaWidth(), width(token)); - if (this.textSpan().containsTextSpan(tokenSpan)) { - this.processToken(token); - } - } - - // Call the base class to process the token and indent it if needed - super.visitTokenInSpan(token); - } - - private processToken(token: ISyntaxToken): void { - var position = this.position(); - - // Extract any leading comments - if (token.leadingTriviaWidth() !== 0) { - this.processTrivia(token.leadingTrivia(), position); - position += token.leadingTriviaWidth(); - } - - // Push the token - var currentTokenSpan = new TokenSpan(token.kind(), position, width(token)); - if (!this.parent().hasSkippedOrMissingTokenChild()) { - if (this.previousTokenSpan) { - // Note that formatPair calls TrimWhitespaceInLineRange in between the 2 tokens - this.formatPair(this.previousTokenSpan, this.previousTokenParent, currentTokenSpan, this.parent()); - } - else { - // We still want to trim whitespace even if it is the first trivia of the first token. Trim from the beginning of the span to the trivia - this.trimWhitespaceInLineRange(this.getLineNumber(this.textSpan()), this.getLineNumber(currentTokenSpan)); - } - } - this.previousTokenSpan = currentTokenSpan; - if (this.previousTokenParent) { - // Make sure to clear the previous parent before assigning a new value to it - this.indentationNodeContextPool().releaseNode(this.previousTokenParent, /* recursive */true); - } - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - position += width(token); - - // Extract any trailing comments - if (token.trailingTriviaWidth() !== 0) { - this.processTrivia(token.trailingTrivia(), position); - } - } - - private processTrivia(triviaList: ISyntaxTriviaList, fullStart: number) { - var position = fullStart; - - for (var i = 0, n = triviaList.count(); i < n ; i++) { - var trivia = triviaList.syntaxTriviaAt(i); - // For a comment, format it like it is a token. For skipped text, eat it up as a token, but skip the formatting - if (trivia.isComment() || trivia.isSkippedToken()) { - var currentTokenSpan = new TokenSpan(trivia.kind(), position, trivia.fullWidth()); - if (this.textSpan().containsTextSpan(currentTokenSpan)) { - if (trivia.isComment() && this.previousTokenSpan) { - // Note that formatPair calls TrimWhitespaceInLineRange in between the 2 tokens - this.formatPair(this.previousTokenSpan, this.previousTokenParent, currentTokenSpan, this.parent()); - } - else { - // We still want to trim whitespace even if it is the first trivia of the first token. Trim from the beginning of the span to the trivia - var startLine = this.getLineNumber(this.previousTokenSpan || this.textSpan()); - this.trimWhitespaceInLineRange(startLine, this.getLineNumber(currentTokenSpan)); - } - this.previousTokenSpan = currentTokenSpan; - if (this.previousTokenParent) { - // Make sure to clear the previous parent before assigning a new value to it - this.indentationNodeContextPool().releaseNode(this.previousTokenParent, /* recursive */true); - } - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - } - } - - position += trivia.fullWidth(); - } - } - - private findCommonParents(parent1: IndentationNodeContext, parent2: IndentationNodeContext): IndentationNodeContext { - // TODO: disable debug assert message - - var shallowParent: IndentationNodeContext; - var shallowParentDepth: number; - var deepParent: IndentationNodeContext; - var deepParentDepth: number; - - if (parent1.depth() < parent2.depth()) { - shallowParent = parent1; - shallowParentDepth = parent1.depth(); - deepParent = parent2; - deepParentDepth = parent2.depth(); - } - else { - shallowParent = parent2; - shallowParentDepth = parent2.depth(); - deepParent = parent1; - deepParentDepth = parent1.depth(); - } - - Debug.assert(shallowParentDepth >= 0, "Expected shallowParentDepth >= 0"); - Debug.assert(deepParentDepth >= 0, "Expected deepParentDepth >= 0"); - Debug.assert(deepParentDepth >= shallowParentDepth, "Expected deepParentDepth >= shallowParentDepth"); - - while (deepParentDepth > shallowParentDepth) { - deepParent = deepParent.parent(); - deepParentDepth--; - } - - Debug.assert(deepParentDepth === shallowParentDepth, "Expected deepParentDepth === shallowParentDepth"); - - while (deepParent.node() && shallowParent.node()) { - if (deepParent.node() === shallowParent.node()) { - return deepParent; - } - deepParent = deepParent.parent(); - shallowParent = shallowParent.parent(); - } - - // The root should be the first element in the parent chain, we can not be here unless something wrong - // happened along the way - throw Errors.invalidOperation(); - } - - private formatPair(t1: TokenSpan, t1Parent: IndentationNodeContext, t2: TokenSpan, t2Parent: IndentationNodeContext): void { - var token1Line = this.getLineNumber(t1); - var token2Line = this.getLineNumber(t2); - - // Find common parent - var commonParent= this.findCommonParents(t1Parent, t2Parent); - - // Update the context - this.formattingContext.updateContext(t1, t1Parent, t2, t2Parent, commonParent); - - // Find rules matching the current context - var rule = this.rulesProvider.getRulesMap().GetRule(this.formattingContext); - - if (rule != null) { - // Record edits from the rule - this.RecordRuleEdits(rule, t1, t2); - - // Handle the case where the next line is moved to be the end of this line. - // In this case we don't indent the next line in the next pass. - if ((rule.Operation.Action == RuleAction.Space || rule.Operation.Action == RuleAction.Delete) && - token1Line != token2Line) { - this.forceSkipIndentingNextToken(t2.start()); - } - - // Handle the case where token2 is moved to the new line. - // In this case we indent token2 in the next pass but we set - // sameLineIndent flag to notify the indenter that the indentation is within the line. - if (rule.Operation.Action == RuleAction.NewLine && token1Line == token2Line) { - this.forceIndentNextToken(t2.start()); - } - } - - // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line - if (token1Line != token2Line && (!rule || (rule.Operation.Action != RuleAction.Delete && rule.Flag != RuleFlags.CanDeleteNewLines))) { - this.trimWhitespaceInLineRange(token1Line, token2Line, t1); - } - } - - private getLineNumber(span: TextSpan): number { - return this.snapshot().getLineNumberFromPosition(span.start()); - } - - private trimWhitespaceInLineRange(startLine: number, endLine: number, token?: TokenSpan): void { - for (var lineNumber = startLine; lineNumber < endLine; ++lineNumber) { - var line = this.snapshot().getLineFromLineNumber(lineNumber); - - this.trimWhitespace(line, token); - } - } - - private trimWhitespace(line: ITextSnapshotLine, token?: TokenSpan): void { - // Don't remove the trailing spaces inside comments (this includes line comments and block comments) - if (token && (token.kind == SyntaxKind.MultiLineCommentTrivia || token.kind == SyntaxKind.SingleLineCommentTrivia) && token.start() <= line.endPosition() && token.end() >= line.endPosition()) - return; - - var text = line.getText(); - var index = 0; - - for (index = text.length - 1; index >= 0; --index) { - if (!CharacterInfo.isWhitespace(text.charCodeAt(index))) { - break; - } - } - - ++index; - - if (index < text.length) { - this.recordEdit(line.startPosition() + index, line.length() - index, ""); - } - } - - private RecordRuleEdits(rule: Rule, t1: TokenSpan, t2: TokenSpan): void { - if (rule.Operation.Action == RuleAction.Ignore) { - return; - } - - var betweenSpan: TextSpan; - - switch (rule.Operation.Action) { - case RuleAction.Delete: - { - betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); - - if (betweenSpan.length() > 0) { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), ""); - return; - } - } - break; - - case RuleAction.NewLine: - { - if (!(rule.Flag == RuleFlags.CanDeleteNewLines || this.getLineNumber(t1) == this.getLineNumber(t2))) { - return; - } - - betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); - - var doEdit = false; - var betweenText = this.snapshot().getText(betweenSpan); - - var lineFeedLoc = betweenText.indexOf(this.options.newLineCharacter); - if (lineFeedLoc < 0) { - // no linefeeds, do the edit - doEdit = true; - } - else { - // We only require one line feed. If there is another one, do the edit - lineFeedLoc = betweenText.indexOf(this.options.newLineCharacter, lineFeedLoc + 1); - if (lineFeedLoc >= 0) { - doEdit = true; - } - } - - if (doEdit) { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), this.options.newLineCharacter); - return; - } - } - break; - - case RuleAction.Space: - { - if (!(rule.Flag == RuleFlags.CanDeleteNewLines || this.getLineNumber(t1) == this.getLineNumber(t2))) { - return; - } - - betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); - - if (betweenSpan.length() > 1 || this.snapshot().getText(betweenSpan) != " ") { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), " "); - return; - } - } - break; - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/new/formatting.ts b/src/services/formatting/new/formatting.ts index a2a15c374e4..c61f1bce8af 100644 --- a/src/services/formatting/new/formatting.ts +++ b/src/services/formatting/new/formatting.ts @@ -14,11 +14,7 @@ // /// -/// -/// -/// /// -// /// /// /// /// @@ -28,12 +24,5 @@ /// /// /// -/// -/// /// -/// -/// -/// -// /// -// /// -// /// \ No newline at end of file +/// \ No newline at end of file diff --git a/src/services/formatting/new/formattingManager.ts b/src/services/formatting/new/formattingManager.ts deleted file mode 100644 index 359f19c84ed..00000000000 --- a/src/services/formatting/new/formattingManager.ts +++ /dev/null @@ -1,123 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class FormattingManager { - private options: FormattingOptions; - - constructor(private syntaxTree: SyntaxTree, - private snapshot: ITextSnapshot, - private rulesProvider: RulesProvider, - editorOptions: ts.EditorOptions) { - // - // TODO: convert to use FormattingOptions instead of EditorOptions - this.options = new FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter) - } - - public formatSelection(minChar: number, limChar: number): ts.TextChange[] { - var span = TextSpan.fromBounds(minChar, limChar); - return this.formatSpan(span, FormattingRequestKind.FormatSelection); - } - - public formatDocument(): ts.TextChange[] { - var span = TextSpan.fromBounds(0, this.snapshot.getLength()); - return this.formatSpan(span, FormattingRequestKind.FormatDocument); - } - - public formatOnSemicolon(caretPosition: number): ts.TextChange[] { - var sourceUnit = this.syntaxTree.sourceUnit(); - var semicolonPositionedToken = findToken(sourceUnit, caretPosition - 1); - - if (semicolonPositionedToken.kind() === SyntaxKind.SemicolonToken) { - // Find the outer most parent that this semicolon terminates - var current: ISyntaxElement = semicolonPositionedToken; - while (current.parent !== null && - end(current.parent) === end(semicolonPositionedToken) && - current.parent.kind() !== SyntaxKind.List) { - current = current.parent; - } - - // Compute the span - var span = new TextSpan(fullStart(current), fullWidth(current)); - - // Format the span - return this.formatSpan(span, FormattingRequestKind.FormatOnSemicolon); - } - - return []; - } - - public formatOnClosingCurlyBrace(caretPosition: number): ts.TextChange[] { - var sourceUnit = this.syntaxTree.sourceUnit(); - var closeBracePositionedToken = findToken(sourceUnit, caretPosition - 1); - - if (closeBracePositionedToken.kind() === SyntaxKind.CloseBraceToken) { - // Find the outer most parent that this closing brace terminates - var current: ISyntaxElement = closeBracePositionedToken; - while (current.parent !== null && - end(current.parent) === end(closeBracePositionedToken) && - current.parent.kind() !== SyntaxKind.List) { - current = current.parent; - } - - // Compute the span - var span = new TextSpan(fullStart(current), fullWidth(current)); - - // Format the span - return this.formatSpan(span, FormattingRequestKind.FormatOnClosingCurlyBrace); - } - - return []; - } - - public formatOnEnter(caretPosition: number): ts.TextChange[] { - var lineNumber = this.snapshot.getLineNumberFromPosition(caretPosition); - - if (lineNumber > 0) { - // Format both lines - var prevLine = this.snapshot.getLineFromLineNumber(lineNumber - 1); - var currentLine = this.snapshot.getLineFromLineNumber(lineNumber); - var span = TextSpan.fromBounds(prevLine.startPosition(), currentLine.endPosition()); - - // Format the span - return this.formatSpan(span, FormattingRequestKind.FormatOnEnter); - - } - - return []; - } - - private formatSpan(span: TextSpan, formattingRequestKind: FormattingRequestKind): ts.TextChange[] { - // Always format from the beginning of the line - var startLine = this.snapshot.getLineFromPosition(span.start()); - span = TextSpan.fromBounds(startLine.startPosition(), span.end()); - - var result: ts.TextChange[] = []; - - var formattingEdits = Formatter.getEdits(span, this.syntaxTree.sourceUnit(), this.options, true, this.snapshot, this.rulesProvider, formattingRequestKind); - - // - // TODO: Change the ILanguageService interface to return TextEditInfo (with start, and length) instead of TextEdit (with minChar and limChar) - formattingEdits.forEach((item) => { - var edit = new ts.TextChange(new TextSpan(item.position, item.length), item.replaceWith); - result.push(edit); - }); - - return result; - } - } -} \ No newline at end of file diff --git a/src/services/formatting/new/formattingRequestKind.ts b/src/services/formatting/new/formattingRequestKind.ts index 1e7df200554..38cc0f233a2 100644 --- a/src/services/formatting/new/formattingRequestKind.ts +++ b/src/services/formatting/new/formattingRequestKind.ts @@ -16,7 +16,7 @@ /// module ts.formatting { - export enum FormattingRequestKind { + export const enum FormattingRequestKind { FormatDocument, FormatSelection, FormatOnEnter, diff --git a/src/services/formatting/new/indentationNodeContext.ts b/src/services/formatting/new/indentationNodeContext.ts deleted file mode 100644 index 838031227be..00000000000 --- a/src/services/formatting/new/indentationNodeContext.ts +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class IndentationNodeContext { - private _node: Node; - private _parent: IndentationNodeContext; - private _fullStart: number; - private _indentationAmount: number; - private _childIndentationAmountDelta: number; - private _depth: number; - private _hasSkippedOrMissingTokenChild: boolean; - - constructor(parent: IndentationNodeContext, node: Node, fullStart: number, indentationAmount: number, childIndentationAmountDelta: number) { - this.update(parent, node, fullStart, indentationAmount, childIndentationAmountDelta); - } - - public parent(): IndentationNodeContext { - return this._parent; - } - - public node(): Node { - return this._node; - } - - public fullStart(): number { - return this._fullStart; - } - - public fullWidth(): number { - return this._node.getFullWidth(); - } - - public start(): number { - return this._node.getStart(); - } - - public end(): number { - return this._node.getEnd(); - } - - public indentationAmount(): number { - return this._indentationAmount; - } - - public childIndentationAmountDelta(): number { - return this._childIndentationAmountDelta; - } - - public depth(): number { - return this._depth; - } - - public kind(): SyntaxKind { - return this._node.kind; - } - - public hasSkippedOrMissingTokenChild(): boolean { - if (this._hasSkippedOrMissingTokenChild === null) { - // this._hasSkippedOrMissingTokenChild = Syntax.nodeHasSkippedOrMissingTokens(this._node); - } - return this._hasSkippedOrMissingTokenChild; - } - - public clone(pool: IndentationNodeContextPool): IndentationNodeContext { - var parent: IndentationNodeContext = null; - if (this._parent) { - parent = this._parent.clone(pool); - } - return pool.getNode(parent, this._node, this._fullStart, this._indentationAmount, this._childIndentationAmountDelta); - } - - public update(parent: IndentationNodeContext, node: Node, fullStart: number, indentationAmount: number, childIndentationAmountDelta: number) { - this._parent = parent; - this._node = node; - this._fullStart = fullStart; - this._indentationAmount = indentationAmount; - this._childIndentationAmountDelta = childIndentationAmountDelta; - this._hasSkippedOrMissingTokenChild = null; - - if (parent) { - this._depth = parent.depth() + 1; - } - else { - this._depth = 0; - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/new/indentationNodeContextPool.ts b/src/services/formatting/new/indentationNodeContextPool.ts deleted file mode 100644 index b4bf2f09980..00000000000 --- a/src/services/formatting/new/indentationNodeContextPool.ts +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class IndentationNodeContextPool { - private nodes: IndentationNodeContext[] = []; - - public getNode(parent: IndentationNodeContext, node: Node, fullStart: number, indentationLevel: number, childIndentationLevelDelta: number): IndentationNodeContext { - if (this.nodes.length > 0) { - var cachedNode = this.nodes.pop(); - cachedNode.update(parent, node, fullStart, indentationLevel, childIndentationLevelDelta); - return cachedNode; - } - - return new IndentationNodeContext(parent, node, fullStart, indentationLevel, childIndentationLevelDelta); - } - - public releaseNode(node: IndentationNodeContext, recursive: boolean = false): void { - this.nodes.push(node); - - if (recursive) { - var parent = node.parent(); - if (parent) { - this.releaseNode(parent, recursive); - } - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/new/indentationTrackingWalker.ts b/src/services/formatting/new/indentationTrackingWalker.ts deleted file mode 100644 index b07b477623e..00000000000 --- a/src/services/formatting/new/indentationTrackingWalker.ts +++ /dev/null @@ -1,349 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class IndentationTrackingWalker extends SyntaxWalker { - private _position: number = 0; - private _parent: IndentationNodeContext = null; - private _textSpan: TextSpan; - private _snapshot: ITextSnapshot; - private _lastTriviaWasNewLine: boolean; - private _indentationNodeContextPool: IndentationNodeContextPool; - private _text: ISimpleText; - - constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, public options: FormattingOptions) { - super(); - - // Create a pool object to manage context nodes while walking the tree - this._indentationNodeContextPool = new IndentationNodeContextPool(); - - this._textSpan = textSpan; - this._text = sourceUnit.syntaxTree.text; - this._snapshot = snapshot; - this._parent = this._indentationNodeContextPool.getNode(null, sourceUnit, 0, 0, 0); - - // Is the first token in the span at the start of a new line. - this._lastTriviaWasNewLine = indentFirstToken; - } - - public position(): number { - return this._position; - } - - public parent(): IndentationNodeContext { - return this._parent; - } - - public textSpan(): TextSpan { - return this._textSpan; - } - - public snapshot(): ITextSnapshot { - return this._snapshot; - } - - public indentationNodeContextPool(): IndentationNodeContextPool { - return this._indentationNodeContextPool; - } - - public forceIndentNextToken(tokenStart: number): void { - this._lastTriviaWasNewLine = true; - this.forceRecomputeIndentationOfParent(tokenStart, true); - } - - public forceSkipIndentingNextToken(tokenStart: number): void { - this._lastTriviaWasNewLine = false; - this.forceRecomputeIndentationOfParent(tokenStart, false); - } - - public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void { - throw Errors.abstract(); - } - - public visitTokenInSpan(token: ISyntaxToken): void { - if (this._lastTriviaWasNewLine) { - // Compute the indentation level at the current token - var indentationAmount = this.getTokenIndentationAmount(token); - var commentIndentationAmount = this.getCommentIndentationAmount(token); - - // Process the token - this.indentToken(token, indentationAmount, commentIndentationAmount); - } - } - - public visitToken(token: ISyntaxToken): void { - var tokenSpan = new TextSpan(this._position, token.fullWidth()); - - if (tokenSpan.intersectsWithTextSpan(this._textSpan)) { - this.visitTokenInSpan(token); - - // Only track new lines on tokens within the range. Make sure to check that the last trivia is a newline, and not just one of the trivia - var trivia = token.trailingTrivia(); - this._lastTriviaWasNewLine = trivia.hasNewLine() && trivia.syntaxTriviaAt(trivia.count() - 1).kind() == SyntaxKind.NewLineTrivia; - } - - // Update the position - this._position += token.fullWidth(); - } - - public visitNode(node: ISyntaxNode): void { - var nodeSpan = new TextSpan(this._position, fullWidth(node)); - - if (nodeSpan.intersectsWithTextSpan(this._textSpan)) { - // Update indentation level - var indentation = this.getNodeIndentation(node); - - // Update the parent - var currentParent = this._parent; - this._parent = this._indentationNodeContextPool.getNode(currentParent, node, this._position, indentation.indentationAmount, indentation.indentationAmountDelta); - - // Visit node - visitNodeOrToken(this, node); - - // Reset state - this._indentationNodeContextPool.releaseNode(this._parent); - this._parent = currentParent; - } - else { - // We're skipping the node, so update our position accordingly. - this._position += fullWidth(node); - } - } - - private getTokenIndentationAmount(token: ISyntaxToken): number { - // If this is the first token of a node, it should follow the node indentation and not the child indentation; - // (e.g.class in a class declaration or module in module declariotion). - // Open and close braces should follow the indentation of thier parent as well(e.g. - // class { - // } - // Also in a do-while statement, the while should be indented like the parent. - if (firstToken(this._parent.node()) === token || - token.kind() === SyntaxKind.OpenBraceToken || token.kind() === SyntaxKind.CloseBraceToken || - token.kind() === SyntaxKind.OpenBracketToken || token.kind() === SyntaxKind.CloseBracketToken || - (token.kind() === SyntaxKind.WhileKeyword && this._parent.node().kind() == SyntaxKind.DoStatement)) { - return this._parent.indentationAmount(); - } - - return (this._parent.indentationAmount() + this._parent.childIndentationAmountDelta()); - } - - private getCommentIndentationAmount(token: ISyntaxToken): number { - // If this is token terminating an indentation scope, leading comments should be indented to follow the children - // indentation level and not the node - - if (token.kind() === SyntaxKind.CloseBraceToken || token.kind() === SyntaxKind.CloseBracketToken) { - return (this._parent.indentationAmount() + this._parent.childIndentationAmountDelta()); - } - return this._parent.indentationAmount(); - } - - private getNodeIndentation(node: ISyntaxNode, newLineInsertedByFormatting?: boolean): { indentationAmount: number; indentationAmountDelta: number; } { - var parent = this._parent; - - // We need to get the parent's indentation, which could be one of 2 things. If first token of the parent is in the span, use the parent's computed indentation. - // If the parent was outside the span, use the actual indentation of the parent. - var parentIndentationAmount: number; - if (this._textSpan.containsPosition(parent.start())) { - parentIndentationAmount = parent.indentationAmount(); - } - else { - if (parent.kind() === SyntaxKind.Block && !this.shouldIndentBlockInParent(this._parent.parent())) { - // Blocks preserve the indentation of their containing node (unless they're a - // standalone block in a list). i.e. if you have: - // - // function foo( - // a: number) { - // - // Then we expect the indentation of the block to be tied to the function, not to - // the line that the block is defined on. If we were to do the latter, then the - // indentation would be here: - // - // function foo( - // a: number) { - // | - // - // Instead of: - // - // function foo( - // a: number) { - // | - parent = this._parent.parent(); - } - - var line = this._snapshot.getLineFromPosition(parent.start()).getText(); - var firstNonWhiteSpacePosition = Indentation.firstNonWhitespacePosition(line); - parentIndentationAmount = Indentation.columnForPositionInString(line, firstNonWhiteSpacePosition, this.options); - } - var parentIndentationAmountDelta = parent.childIndentationAmountDelta(); - - // The indentation level of the node - var indentationAmount: number; - - // The delta it adds to its children. - var indentationAmountDelta: number; - var parentNode = parent.node(); - - switch (node.kind()) { - default: - // General case - // This node should follow the child indentation set by its parent - // This node does not introduce any new indentation scope, indent any decendants of this node (tokens or child nodes) - // using the same indentation level - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - indentationAmountDelta = 0; - break; - - // Statements introducing {} - case SyntaxKind.ClassDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.ObjectType: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.SwitchStatement: - case SyntaxKind.ObjectLiteralExpression: - case SyntaxKind.ConstructorDeclaration: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.MemberFunctionDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.IndexMemberDeclaration: - case SyntaxKind.CatchClause: - // Statements introducing [] - case SyntaxKind.ArrayLiteralExpression: - case SyntaxKind.ArrayType: - case SyntaxKind.ElementAccessExpression: - case SyntaxKind.IndexSignature: - // Other statements - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WithStatement: - case SyntaxKind.CaseSwitchClause: - case SyntaxKind.DefaultSwitchClause: - case SyntaxKind.ReturnStatement: - case SyntaxKind.ThrowStatement: - case SyntaxKind.SimpleArrowFunctionExpression: - case SyntaxKind.ParenthesizedArrowFunctionExpression: - case SyntaxKind.VariableDeclaration: - case SyntaxKind.ExportAssignment: - - // Expressions which have argument lists or parameter lists - case SyntaxKind.InvocationExpression: - case SyntaxKind.ObjectCreationExpression: - case SyntaxKind.CallSignature: - case SyntaxKind.ConstructSignature: - - // These nodes should follow the child indentation set by its parent; - // they introduce a new indenation scope; children should be indented at one level deeper - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - indentationAmountDelta = this.options.indentSpaces; - break; - - case SyntaxKind.IfStatement: - if (parent.kind() === SyntaxKind.ElseClause && - !SyntaxUtilities.isLastTokenOnLine((parentNode).elseKeyword, this._text)) { - // This is an else if statement with the if on the same line as the else, do not indent the if statmement. - // Note: Children indentation has already been set by the parent if statement, so no need to increment - indentationAmount = parentIndentationAmount; - } - else { - // Otherwise introduce a new indenation scope; children should be indented at one level deeper - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - } - indentationAmountDelta = this.options.indentSpaces; - break; - - case SyntaxKind.ElseClause: - // Else should always follow its parent if statement indentation. - // Note: Children indentation has already been set by the parent if statement, so no need to increment - indentationAmount = parentIndentationAmount; - indentationAmountDelta = this.options.indentSpaces; - break; - - - case SyntaxKind.Block: - // Check if the block is a member in a list of statements (if the parent is a source unit, module, or block, or switch clause) - if (this.shouldIndentBlockInParent(parent)) { - indentationAmount = parentIndentationAmount + parentIndentationAmountDelta; - } - else { - indentationAmount = parentIndentationAmount; - } - - indentationAmountDelta = this.options.indentSpaces; - break; - } - - // If the parent happens to start on the same line as this node, then override the current node indenation with that - // of the parent. This avoid having to add an extra level of indentation for the children. e.g.: - // return { - // a:1 - // }; - // instead of: - // return { - // a:1 - // }; - // We also need to pass the delta (if it is nonzero) to the children, so that subsequent lines get indented. Essentially, if any node starting on the given line - // has a nonzero delta , the resulting delta should be inherited from this node. This is to indent cases like the following: - // return a - // || b; - // Lastly, it is possible the node indentation needs to be recomputed because the formatter inserted a newline before its first token. - // If this is the case, we know the node no longer starts on the same line as its parent (or at least we shouldn't treat it as such). - if (parentNode) { - if (!newLineInsertedByFormatting /*This could be false or undefined here*/) { - var parentStartLine = this._snapshot.getLineNumberFromPosition(parent.start()); - var currentNodeStartLine = this._snapshot.getLineNumberFromPosition(this._position + leadingTriviaWidth(node)); - if (parentStartLine === currentNodeStartLine || newLineInsertedByFormatting === false /*meaning a new line was removed and we are force recomputing*/) { - indentationAmount = parentIndentationAmount; - indentationAmountDelta = Math.min(this.options.indentSpaces, parentIndentationAmountDelta + indentationAmountDelta); - } - } - } - - return { - indentationAmount: indentationAmount, - indentationAmountDelta: indentationAmountDelta - }; - } - - private shouldIndentBlockInParent(parent: IndentationNodeContext): boolean { - switch (parent.kind()) { - case SyntaxKind.SourceUnit: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.Block: - case SyntaxKind.CaseSwitchClause: - case SyntaxKind.DefaultSwitchClause: - return true; - - default: - return false; - } - } - - private forceRecomputeIndentationOfParent(tokenStart: number, newLineAdded: boolean /*as opposed to removed*/): void { - var parent = this._parent; - if (parent.fullStart() === tokenStart) { - // Temporarily pop the parent before recomputing - this._parent = parent.parent(); - var indentation = this.getNodeIndentation(parent.node(), /* newLineInsertedByFormatting */ newLineAdded); - parent.update(parent.parent(), parent.node(), parent.fullStart(), indentation.indentationAmount, indentation.indentationAmountDelta); - this._parent = parent; - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/new/multipleTokenIndenter.ts b/src/services/formatting/new/multipleTokenIndenter.ts deleted file mode 100644 index 23181571427..00000000000 --- a/src/services/formatting/new/multipleTokenIndenter.ts +++ /dev/null @@ -1,206 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class MultipleTokenIndenter extends IndentationTrackingWalker { - private _edits: TextEditInfo[] = []; - - constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, options: FormattingOptions) { - super(textSpan, sourceUnit, snapshot, indentFirstToken, options); - } - - public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void { - // Ignore generated tokens - if (token.fullWidth() === 0) { - return; - } - - // If we have any skipped tokens as children, do not process this node for indentation or formatting - if (this.parent().hasSkippedOrMissingTokenChild()) { - return; - } - - // Be strict, and only consider nodes that fall inside the span. This avoids indenting a multiline string - // on enter at the end of, as the whole token was not included in the span - var tokenSpan = new TextSpan(this.position() + token.leadingTriviaWidth(), width(token)); - if (!this.textSpan().containsTextSpan(tokenSpan)) { - return; - } - - // Compute an indentation string for this token - var indentationString = Indentation.indentationString(indentationAmount, this.options); - - var commentIndentationString = Indentation.indentationString(commentIndentationAmount, this.options); - - // Record any needed indentation edits - this.recordIndentationEditsForToken(token, indentationString, commentIndentationString); - } - - public edits(): TextEditInfo[]{ - return this._edits; - } - - public recordEdit(position: number, length: number, replaceWith: string): void { - this._edits.push(new TextEditInfo(position, length, replaceWith)); - } - - private recordIndentationEditsForToken(token: ISyntaxToken, indentationString: string, commentIndentationString: string) { - var position = this.position(); - var indentNextTokenOrTrivia = true; - var leadingWhiteSpace = ""; // We need to track the whitespace before a multiline comment - - // Process any leading trivia if any - var triviaList = token.leadingTrivia(); - if (triviaList) { - for (var i = 0, length = triviaList.count(); i < length; i++, position += trivia.fullWidth()) { - var trivia = triviaList.syntaxTriviaAt(i); - // Skip this trivia if it is not in the span - if (!this.textSpan().containsTextSpan(new TextSpan(position, trivia.fullWidth()))) { - continue; - } - - switch (trivia.kind()) { - case SyntaxKind.MultiLineCommentTrivia: - // We will only indent the first line of the multiline comment if we were planning to indent the next trivia. However, - // subsequent lines will always be indented - this.recordIndentationEditsForMultiLineComment(trivia, position, commentIndentationString, leadingWhiteSpace, !indentNextTokenOrTrivia /* already indented first line */); - indentNextTokenOrTrivia = false; - leadingWhiteSpace = ""; - break; - - case SyntaxKind.SingleLineCommentTrivia: - case SyntaxKind.SkippedTokenTrivia: - if (indentNextTokenOrTrivia) { - this.recordIndentationEditsForSingleLineOrSkippedText(trivia, position, commentIndentationString); - indentNextTokenOrTrivia = false; - } - break; - - case SyntaxKind.WhitespaceTrivia: - // If the next trivia is a comment, use the comment indentation level instead of the regular indentation level - // If the next trivia is a newline, this whole line is just whitespace, so don't do anything (trimming will take care of it) - var nextTrivia = length > i + 1 && triviaList.syntaxTriviaAt(i + 1); - var whiteSpaceIndentationString = nextTrivia && nextTrivia.isComment() ? commentIndentationString : indentationString; - if (indentNextTokenOrTrivia) { - if (!(nextTrivia && nextTrivia.isNewLine())) { - this.recordIndentationEditsForWhitespace(trivia, position, whiteSpaceIndentationString); - } - indentNextTokenOrTrivia = false; - } - leadingWhiteSpace += trivia.fullText(); - break; - - case SyntaxKind.NewLineTrivia: - // We hit a newline processing the trivia. We need to add the indentation to the - // next line as well. Note: don't bother indenting the newline itself. This will - // just insert ugly whitespace that most users probably will not want. - indentNextTokenOrTrivia = true; - leadingWhiteSpace = ""; - break; - - default: - throw Errors.invalidOperation(); - } - } - - } - - if (token.kind() !== SyntaxKind.EndOfFileToken && indentNextTokenOrTrivia) { - // If the last trivia item was a new line, or no trivia items were encounterd record the - // indentation edit at the token position - if (indentationString.length > 0) { - this.recordEdit(position, 0, indentationString); - } - } - } - - private recordIndentationEditsForSingleLineOrSkippedText(trivia: ISyntaxTrivia, fullStart: number, indentationString: string): void { - // Record the edit - if (indentationString.length > 0) { - this.recordEdit(fullStart, 0, indentationString); - } - } - - private recordIndentationEditsForWhitespace(trivia: ISyntaxTrivia, fullStart: number, indentationString: string): void { - var text = trivia.fullText(); - - // Check if the current indentation matches the desired indentation or not - if (indentationString === text) { - return; - } - - // Record the edit - this.recordEdit(fullStart, text.length, indentationString); - } - - private recordIndentationEditsForMultiLineComment(trivia: ISyntaxTrivia, fullStart: number, indentationString: string, leadingWhiteSpace: string, firstLineAlreadyIndented: boolean): void { - // If the multiline comment spans multiple lines, we need to add the right indent amount to - // each successive line segment as well. - var position = fullStart; - var segments = Syntax.splitMultiLineCommentTriviaIntoMultipleLines(trivia); - - if (segments.length <= 1) { - if (!firstLineAlreadyIndented) { - // Process the one-line multiline comment just like a single line comment - this.recordIndentationEditsForSingleLineOrSkippedText(trivia, fullStart, indentationString); - } - return; - } - - // Find number of columns in first segment - var whiteSpaceColumnsInFirstSegment = Indentation.columnForPositionInString(leadingWhiteSpace, leadingWhiteSpace.length, this.options); - - var indentationColumns = Indentation.columnForPositionInString(indentationString, indentationString.length, this.options); - var startIndex = 0; - if (firstLineAlreadyIndented) { - startIndex = 1; - position += segments[0].length; - } - for (var i = startIndex; i < segments.length; i++) { - var segment = segments[i]; - this.recordIndentationEditsForSegment(segment, position, indentationColumns, whiteSpaceColumnsInFirstSegment); - position += segment.length; - } - } - - private recordIndentationEditsForSegment(segment: string, fullStart: number, indentationColumns: number, whiteSpaceColumnsInFirstSegment: number): void { - // Indent subsequent lines using a column delta of the actual indentation relative to the first line - var firstNonWhitespacePosition = Indentation.firstNonWhitespacePosition(segment); - var leadingWhiteSpaceColumns = Indentation.columnForPositionInString(segment, firstNonWhitespacePosition, this.options); - var deltaFromFirstSegment = leadingWhiteSpaceColumns - whiteSpaceColumnsInFirstSegment; - var finalColumns = indentationColumns + deltaFromFirstSegment; - if (finalColumns < 0) { - finalColumns = 0; - } - var indentationString = Indentation.indentationString(finalColumns, this.options); - - if (firstNonWhitespacePosition < segment.length && - CharacterInfo.isLineTerminator(segment.charCodeAt(firstNonWhitespacePosition))) { - // If this segment was just a newline, then don't bother indenting it. That will just - // leave the user with an ugly indent in their output that they probably do not want. - return; - } - - if (indentationString === segment.substring(0, firstNonWhitespacePosition)) { - return; - } - - // Record the edit - this.recordEdit(fullStart, firstNonWhitespacePosition, indentationString); - } - } -} \ No newline at end of file diff --git a/src/services/formatting/new/ruleAction.ts b/src/services/formatting/new/ruleAction.ts index aa80943ec3d..596a7a64451 100644 --- a/src/services/formatting/new/ruleAction.ts +++ b/src/services/formatting/new/ruleAction.ts @@ -16,7 +16,7 @@ /// module ts.formatting { - export enum RuleAction { + export const enum RuleAction { Ignore = 0x00000001, Space = 0x00000002, NewLine = 0x00000004, diff --git a/src/services/formatting/new/ruleFlag.ts b/src/services/formatting/new/ruleFlag.ts index 3b61bc78754..1e55abc54c1 100644 --- a/src/services/formatting/new/ruleFlag.ts +++ b/src/services/formatting/new/ruleFlag.ts @@ -16,7 +16,7 @@ /// module ts.formatting { - export enum RuleFlags { + export const enum RuleFlags { None, CanDeleteNewLines } diff --git a/src/services/formatting/new/smartIndenter.ts.orig b/src/services/formatting/new/smartIndenter.ts.orig deleted file mode 100644 index 422c7d0c408..00000000000 --- a/src/services/formatting/new/smartIndenter.ts.orig +++ /dev/null @@ -1,476 +0,0 @@ -/// - -module ts.formatting { - export module SmartIndenter { - export function getIndentation(position: number, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { - if (position > sourceFile.text.length) { - return 0; // past EOF - } - - var precedingToken = findPrecedingToken(position, sourceFile); - if (!precedingToken) { - return 0; - } - - // no indentation in string \regex literals - if ((precedingToken.kind === SyntaxKind.StringLiteral || precedingToken.kind === SyntaxKind.RegularExpressionLiteral) && - precedingToken.getStart(sourceFile) <= position && - precedingToken.end > position) { - return 0; - } - - var lineAtPosition = sourceFile.getLineAndCharacterFromPosition(position).line; - - if (precedingToken.kind === SyntaxKind.CommaToken && precedingToken.parent.kind !== SyntaxKind.BinaryExpression) { - - // previous token is comma that separates items in list - find the previous item and try to derive indentation from it - var precedingListItem = findPrecedingListItem(precedingToken); - var precedingListItemStartLineAndChar = sourceFile.getLineAndCharacterFromPosition(precedingListItem.getStart(sourceFile)); - var listStartLine = getStartLineForNode(precedingListItem.parent, sourceFile); - - if (precedingListItemStartLineAndChar.line !== listStartLine) { - return findFirstNonWhitespaceCharacterInLine(precedingListItemStartLineAndChar.line, precedingListItemStartLineAndChar.character, sourceFile); - // previous list item starts on the different line with list, find first non-whitespace character in this line and use its position as indentation - var lineStartPosition = sourceFile.getPositionFromLineAndCharacter(precedingListItemStartLineAndChar.line, 1); - for (var i = 0; i < precedingListItemStartLineAndChar.character; ++i) { - if (!isWhiteSpace(sourceFile.text.charCodeAt(lineStartPosition + i))) { - return i; - } - } - - // seems that this is the first non-whitespace character on the line - return it - return precedingListItemStartLineAndChar.character; - } - } - - // try to find the node that will include 'position' starting from 'precedingToken' - // if such node is found - compute initial indentation for 'position' inside this node - var previous: Node; - var current = precedingToken; - var currentStartLine: number; - var indentation: number; - - while (current) { - if (isPositionBelongToNode(current, position, sourceFile)) { -<<<<<<< HEAD - -======= ->>>>>>> added support for smart indentation in the middle of list items, updated test baselines - currentStartLine = getStartLineForNode(current, sourceFile); - - if (discardInitialIndentationIfNextTokenIsOpenOrCloseBrace(precedingToken, current, lineAtPosition, sourceFile)) { - indentation = 0; - } - else { - indentation = isNodeContentIndented(current, previous) && lineAtPosition !== currentStartLine ? options.indentSpaces : 0; - } - - break; - } - var customIndentation = getCustomIndentationForListItem(current, sourceFile); - if (customIndentation !== -1) { - return customIndentation; - } - - // check if current node is a list item - if yes, take indentation from it - var customIndentation = getCustomIndentationForListItem(current, sourceFile); - if (customIndentation !== -1) { - return customIndentation; - } - - previous = current; - current = current.parent; - } - - if (!current) { - // no parent was found - return 0 to be indented on the level of SourceFile - return 0; - } - - - var parent: Node = current.parent; - var parentStartLine: number; - - // walk upwards and collect indentations for pairs of parent-child nodes - // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' - while (parent) { -<<<<<<< HEAD -======= - - // check if current node is a list item - if yes, take indentation from it ->>>>>>> added support for smart indentation in the middle of list items, updated test baselines - var customIndentation = getCustomIndentationForListItem(current, sourceFile); - if (customIndentation !== -1) { - return customIndentation + indentation; - } - - parentStartLine = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)).line; - // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line - var increaseIndentation = - isNodeContentIndented(parent, current) && - parentStartLine !== currentStartLine && - !isChildStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStartLine, sourceFile); - - if (increaseIndentation) { - indentation += options.indentSpaces; - } - - current = parent; - currentStartLine = parentStartLine; - parent = current.parent; - } - - return indentation; - } - - function discardInitialIndentationIfNextTokenIsOpenOrCloseBrace(precedingToken: Node, current: Node, lineAtPosition: number, sourceFile: SourceFile): boolean { - var nextToken = findNextToken(precedingToken, current); - if (!nextToken) { - return false; - } - - if (nextToken.kind === SyntaxKind.OpenBraceToken) { - // open braces are always indented at the parent level - return true; - } - else if (nextToken.kind === SyntaxKind.CloseBraceToken) { - // close braces are indented at the parent level if they are located on the same line with cursor - // this means that if new line will be added at $ position, this case will be indented - // class A { - // $ - // } - /// and this one - not - // class A { - // $} - - var nextTokenStartLine = getStartLineForNode(nextToken, sourceFile); - return lineAtPosition === nextTokenStartLine; - } - - return false; - } - - function getStartLineForNode(n: Node, sourceFile: SourceFile): number { - return sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)).line; - } - - function findPrecedingListItem(commaToken: Node): Node { - // CommaToken node is synthetic and thus will be stored in SyntaxList, however parent of the CommaToken points to the container of the SyntaxList skipping the list. - // In order to find the preceding list item we first need to locate SyntaxList itself and then search for the position of CommaToken - var syntaxList = forEach(commaToken.parent.getChildren(), c => { - // find syntax list that covers the span of CommaToken - if (c.kind == SyntaxKind.SyntaxList && c.pos <= commaToken.end && c.end >= commaToken.end) { - return c; - } - }); - Debug.assert(syntaxList); - - var children = syntaxList.getChildren(); - var commaIndex = indexOf(children, commaToken); - Debug.assert(commaIndex !== -1 && commaIndex !== 0); - - return children[commaIndex - 1]; - } - - function isPositionBelongToNode(candidate: Node, position: number, sourceFile: SourceFile): boolean { - return candidate.end > position || !isCompletedNode(candidate, sourceFile); - } - - function isChildStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: Node, childStartLine: number, sourceFile: SourceFile): boolean { - if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { - var elseKeyword = forEach(parent.getChildren(), c => c.kind === SyntaxKind.ElseKeyword && c); - Debug.assert(elseKeyword); - - var elseKeywordStartLine = getStartLineForNode(elseKeyword, sourceFile); - return elseKeywordStartLine === childStartLine; - } - } - - function getCustomIndentationForListItem(node: Node, sourceFile: SourceFile): number { - if (node.parent) { - switch (node.parent.kind) { - case SyntaxKind.ObjectLiteral: - return getCustomIndentationFromList((node.parent).properties); - case SyntaxKind.TypeLiteral: - return getCustomIndentationFromList((node.parent).members); - case SyntaxKind.ArrayLiteral: - return getCustomIndentationFromList((node.parent).elements); - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.ArrowFunction: - case SyntaxKind.Method: - case SyntaxKind.CallSignature: - case SyntaxKind.ConstructSignature: - if ((node.parent).typeParameters && node.end < (node.parent).typeParameters.end) { - return getCustomIndentationFromList((node.parent).typeParameters); - } - else { - return getCustomIndentationFromList((node.parent).parameters); - } - case SyntaxKind.NewExpression: - case SyntaxKind.CallExpression: - if ((node.parent).typeArguments && node.end < (node.parent).typeArguments.end) { - return getCustomIndentationFromList((node.parent).typeArguments); - } - else { - return getCustomIndentationFromList((node.parent).arguments); - } - - break; - } - } - - return -1; - - function getCustomIndentationFromList(list: Node[]): number { - var index = indexOf(list, node); - if (index !== -1) { - var lineAndCol = sourceFile.getLineAndCharacterFromPosition(node.getStart(sourceFile)); - for (var i = index - 1; i >= 0; --i) { - var prevLineAndCol = sourceFile.getLineAndCharacterFromPosition(list[i].getStart(sourceFile)); - if (lineAndCol.line !== prevLineAndCol.line) { -<<<<<<< HEAD - // find the line start position - var lineStart = sourceFile.getPositionFromLineAndCharacter(lineAndCol.line, 1); - for (var i = 0; i <= lineAndCol.character; ++i) { - if (!isWhiteSpace(sourceFile.text.charCodeAt(lineStart + i))) { - return i; - } - } - // code is unreachable because the range that we check above includes at least one non-whitespace character at the very end - Debug.fail("Unreachable code") - -======= - return findFirstNonWhitespaceCharacterInLine(lineAndCol.line, lineAndCol.character, sourceFile); ->>>>>>> added support for smart indentation in the middle of list items, updated test baselines - } - lineAndCol = prevLineAndCol; - } - } - return -1; - } - } - - function findFirstNonWhitespaceCharacterInLine(line: number, maxCharacter: number, sourceFile: SourceFile): number { - var lineStart = sourceFile.getPositionFromLineAndCharacter(line, 1); - for (var i = 0; i < maxCharacter; ++i) { - if (!isWhiteSpace(sourceFile.text.charCodeAt(lineStart + i))) { - return i; - } - } - - return maxCharacter; - } - - function findNextToken(previousToken: Node, parent: Node): Node { - return find(parent); - - function find(n: Node): Node { - if (isToken(n) && n.pos === previousToken.end) { - // this is token that starts at the end of previous token - return it - return n; - } - - var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; ++i) { - var child = children[i]; - var shouldDiveInChildNode = - // previous token is enclosed somewhere in the child - (child.pos <= previousToken.pos && child.end > previousToken.end) || - // previous token end exactly at the beginning of child - (child.pos === previousToken.end); - - if (shouldDiveInChildNode && isCandidateNode(child)) { - return find(child); - } - } - } - } - - function findPrecedingToken(position: number, sourceFile: SourceFile): Node { - return find(sourceFile, /*diveIntoLastChild*/ false); - - function find(n: Node, diveIntoLastChild: boolean): Node { - if (isToken(n)) { - return n; - } - - var children = n.getChildren(); - if (diveIntoLastChild) { - var candidate = findLastChildNodeCandidate(children, /*exclusiveStartPosition*/ children.length); - return candidate && find(candidate, diveIntoLastChild); - } - - for (var i = 0, len = children.length; i < len; ++i) { - var child = children[i]; - if (isCandidateNode(child)) { - if (position < child.end) { - if (child.getStart(sourceFile) >= position) { - // actual start of the node is past the position - previous token should be at the end of previous child - var candidate = findLastChildNodeCandidate(children, /*exclusiveStartPosition*/ i); - return candidate && find(candidate, /*diveIntoLastChild*/ true) - } - else { - // candidate should be in this node - return find(child, diveIntoLastChild); - } - } - } - } - - // here we know that none of child token nodes embrace the position - // try to find the closest token on the left - if (children.length) { - var candidate = findLastChildNodeCandidate(children, /*exclusiveStartPosition*/ children.length); - return candidate && find(candidate, /*diveIntoLastChild*/ true); - } - } - - /// finds last node that is considered as candidate for search (isCandidate(node) === true) starting from 'exclusiveStartPosition' - function findLastChildNodeCandidate(children: Node[], exclusiveStartPosition: number): Node { - for (var i = exclusiveStartPosition - 1; i >= 0; --i) { - if (isCandidateNode(children[i])) { - return children[i]; - } - } - } - } - - /// checks if node is something that can contain tokens (except EOF) - filters out EOF tokens, Missing\Omitted expressions, empty SyntaxLists and expression statements that wrap any of listed nodes. - function isCandidateNode(n: Node): boolean { - if (n.kind === SyntaxKind.ExpressionStatement) { - return isCandidateNode((n).expression); - } - - if (n.kind === SyntaxKind.EndOfFileToken || n.kind === SyntaxKind.OmittedExpression || n.kind === SyntaxKind.Missing) { - return false; - } - - // SyntaxList is already realized so getChildCount should be fast and non-expensive - return n.kind !== SyntaxKind.SyntaxList || n.getChildCount() !== 0; - } - - function isToken(n: Node): boolean { - return n.kind < SyntaxKind.Missing; - } - - function isNodeContentIndented(parent: Node, child: Node): boolean { - switch (parent.kind) { - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.EnumDeclaration: - return true; - case SyntaxKind.ModuleDeclaration: - // ModuleBlock should take care of indentation - return false; - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.Method: - case SyntaxKind.FunctionExpression: - // FunctionBlock should take care of indentation - return false; - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - return child && child.kind !== SyntaxKind.Block; - case SyntaxKind.IfStatement: - return child && child.kind !== SyntaxKind.Block; - case SyntaxKind.TryStatement: - // TryBlock\CatchBlock\FinallyBlock should take care of indentation - return false; - case SyntaxKind.ArrayLiteral: - case SyntaxKind.Block: - case SyntaxKind.FunctionBlock: - case SyntaxKind.TryBlock: - case SyntaxKind.CatchBlock: - case SyntaxKind.FinallyBlock: - case SyntaxKind.ModuleBlock: - case SyntaxKind.ObjectLiteral: - case SyntaxKind.TypeLiteral: - case SyntaxKind.SwitchStatement: - case SyntaxKind.DefaultClause: - case SyntaxKind.CaseClause: - case SyntaxKind.ParenExpression: - case SyntaxKind.BinaryExpression: - case SyntaxKind.CallExpression: - case SyntaxKind.NewExpression: - case SyntaxKind.VariableStatement: - case SyntaxKind.VariableDeclaration: - return true; - default: - return false; - } - } - - /// checks if node ends with 'expectedLastToken'. - /// If child at position 'length - 1' is 'SemicolonToken' it is skipped and 'expectedLastToken' is compared with child at position 'length - 2'. - function isNodeEndWith(n: Node, expectedLastToken: SyntaxKind, sourceFile: SourceFile): boolean { - var children = n.getChildren(sourceFile); - if (children.length) { - var last = children[children.length - 1]; - if (last.kind === expectedLastToken) { - return true; - } - else if (last.kind === SyntaxKind.SemicolonToken && children.length !== 1) { - return children[children.length - 2].kind === expectedLastToken; - } - } - return false; - } - - function isCompletedNode(n: Node, sourceFile: SourceFile): boolean { - switch (n.kind) { - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.ObjectLiteral: - case SyntaxKind.Block: - case SyntaxKind.CatchBlock: - case SyntaxKind.FinallyBlock: - case SyntaxKind.FunctionBlock: - case SyntaxKind.ModuleBlock: - case SyntaxKind.SwitchStatement: - return isNodeEndWith(n, SyntaxKind.CloseBraceToken, sourceFile); - case SyntaxKind.ParenExpression: - case SyntaxKind.CallSignature: - case SyntaxKind.CallExpression: - return isNodeEndWith(n, SyntaxKind.CloseParenToken, sourceFile); - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.Method: - case SyntaxKind.ArrowFunction: - return !(n).body || isCompletedNode((n).body, sourceFile); - case SyntaxKind.ModuleDeclaration: - return (n).body && isCompletedNode((n).body, sourceFile); - case SyntaxKind.IfStatement: - if ((n).elseStatement) { - return isCompletedNode((n).elseStatement, sourceFile); - } - return isCompletedNode((n).thenStatement, sourceFile); - case SyntaxKind.ExpressionStatement: - return isCompletedNode((n).expression, sourceFile); - case SyntaxKind.ArrayLiteral: - return isNodeEndWith(n, SyntaxKind.CloseBracketToken, sourceFile); - case SyntaxKind.Missing: - return false; - case SyntaxKind.CaseClause: - case SyntaxKind.DefaultClause: - // there is no such thing as terminator token for CaseClause\DefaultClause so for simplicitly always consider them non-completed - return false; - case SyntaxKind.VariableStatement: - // variable statement is considered completed if it either doesn'not have variable declarations or last variable declaration is completed - var variableDeclarations = (n).declarations; - return variableDeclarations.length === 0 || isCompletedNode(variableDeclarations[variableDeclarations.length - 1], sourceFile); - case SyntaxKind.VariableDeclaration: - // variable declaration is completed if it either doesn't have initializer or initializer is completed - return !(n).initializer || isCompletedNode((n).initializer, sourceFile); - case SyntaxKind.WhileStatement: - return isCompletedNode((n).statement, sourceFile); - case SyntaxKind.DoStatement: - return isCompletedNode((n).statement, sourceFile); - default: - return true; - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/new/snapshotPoint.ts b/src/services/formatting/new/snapshotPoint.ts deleted file mode 100644 index 781c9c69d31..00000000000 --- a/src/services/formatting/new/snapshotPoint.ts +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - - export class SnapshotPoint { - constructor(public snapshot: ITextSnapshot, public position: number) { - } - public getContainingLine(): ITextSnapshotLine { - return this.snapshot.getLineFromPosition(this.position); - } - public add(offset: number): SnapshotPoint { - return new SnapshotPoint(this.snapshot, this.position + offset); - } - } -} \ No newline at end of file diff --git a/src/services/formatting/new/textEditInfo.ts b/src/services/formatting/new/textEditInfo.ts deleted file mode 100644 index 18ee085dc19..00000000000 --- a/src/services/formatting/new/textEditInfo.ts +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class TextEditInfo { - - constructor(public position: number, public length: number, public replaceWith: string) { - } - - public toString() { - return "[ position: " + this.position + ", length: " + this.length + ", replaceWith: '" + this.replaceWith + "' ]"; - } - } -} \ No newline at end of file diff --git a/src/services/formatting/new/textSnapshot.ts b/src/services/formatting/new/textSnapshot.ts deleted file mode 100644 index 096159f12ab..00000000000 --- a/src/services/formatting/new/textSnapshot.ts +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export interface ITextSnapshot { - getLength(): number; - getText(span: TypeScript.TextSpan): string; - getLineNumberFromPosition(position: number): number; - getLineFromPosition(position: number): ITextSnapshotLine; - getLineFromLineNumber(lineNumber: number): ITextSnapshotLine; - } - - export class TextSnapshot implements ITextSnapshot { - private lines: TextSnapshotLine[]; - - constructor(private snapshot: /*ISimpleText*/ any) { - this.lines = []; - } - - public getLength(): number { - return this.snapshot.length(); - } - - public getText(span: TypeScript.TextSpan): string { - return this.snapshot.substr(span.start(), span.length()); - } - - public getLineNumberFromPosition(position: number): number { - return this.snapshot.lineMap().getLineNumberFromPosition(position); - } - - public getLineFromPosition(position: number): ITextSnapshotLine { - var lineNumber = this.getLineNumberFromPosition(position); - return this.getLineFromLineNumber(lineNumber); - } - - public getLineFromLineNumber(lineNumber: number): ITextSnapshotLine { - var line = this.lines[lineNumber]; - if (line === undefined) { - line = this.getLineFromLineNumberWorker(lineNumber); - this.lines[lineNumber] = line; - } - return line; - } - - private getLineFromLineNumberWorker(lineNumber: number): ITextSnapshotLine { - var lineMap = this.snapshot.lineMap().lineStarts(); - var lineMapIndex = lineNumber; //Note: lineMap is 0-based - if (lineMapIndex < 0 || lineMapIndex >= lineMap.length) - throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.Invalid_line_number_0, [lineMapIndex])); - var start = lineMap[lineMapIndex]; - - var end: number; - var endIncludingLineBreak: number; - var lineBreak = ""; - if (lineMapIndex == lineMap.length) { - end = endIncludingLineBreak = this.snapshot.length(); - } - else { - endIncludingLineBreak = (lineMapIndex >= lineMap.length - 1 ? this.snapshot.length() : lineMap[lineMapIndex + 1]); - for (var p = endIncludingLineBreak - 1; p >= start; p--) { - var c = this.snapshot.substr(p, 1); - //TODO: Other ones? - if (c != "\r" && c != "\n") { - break; - } - } - end = p + 1; - lineBreak = this.snapshot.substr(end, endIncludingLineBreak - end); - } - var result = new TextSnapshotLine(this, lineNumber, start, end, lineBreak); - return result; - } - } -} \ No newline at end of file diff --git a/src/services/formatting/new/textSnapshotLine.ts b/src/services/formatting/new/textSnapshotLine.ts deleted file mode 100644 index f0843b82e4e..00000000000 --- a/src/services/formatting/new/textSnapshotLine.ts +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export interface ITextSnapshotLine { - snapshot(): ITextSnapshot; - - start(): SnapshotPoint; - startPosition(): number; - - end(): SnapshotPoint; - endPosition(): number; - - endIncludingLineBreak(): SnapshotPoint; - endIncludingLineBreakPosition(): number; - - length(): number; - lineNumber(): number; - getText(): string; - } - - export class TextSnapshotLine implements ITextSnapshotLine { - constructor(private _snapshot: ITextSnapshot, private _lineNumber: number, private _start: number, private _end: number, private _lineBreak: string) { - } - - public snapshot() { - return this._snapshot; - } - - public start() { - return new SnapshotPoint(this._snapshot, this._start); - } - - public startPosition() { - return this._start; - } - - public end() { - return new SnapshotPoint(this._snapshot, this._end); - } - - public endPosition() { - return this._end; - } - - public endIncludingLineBreak() { - return new SnapshotPoint(this._snapshot, this._end + this._lineBreak.length); - } - - public endIncludingLineBreakPosition() { - return this._end + this._lineBreak.length; - } - - public length() { - return this._end - this._start; - } - - public lineNumber() { - return this._lineNumber; - } - - public getText(): string { - return this._snapshot.getText(TypeScript.TextSpan.fromBounds(this._start, this._end)); - } - } -} \ No newline at end of file From c3a88d34828b0516ac0519d42b23df97b137e613 Mon Sep 17 00:00:00 2001 From: vladima Date: Thu, 6 Nov 2014 11:10:27 -0800 Subject: [PATCH 039/154] code cleanup: replace nulls with undefined --- .../formatting/new/formattingContext.ts | 37 ++++++------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/src/services/formatting/new/formattingContext.ts b/src/services/formatting/new/formattingContext.ts index bd146397bbf..d96830e6e80 100644 --- a/src/services/formatting/new/formattingContext.ts +++ b/src/services/formatting/new/formattingContext.ts @@ -45,15 +45,16 @@ module ts.formatting { this.nextTokenParent = nextTokenParent; this.contextNode = commonParent; - this.contextNodeAllOnSameLine = null; - this.nextNodeAllOnSameLine = null; - this.tokensAreOnSameLine = null; - this.contextNodeBlockIsOnOneLine = null; - this.nextNodeBlockIsOnOneLine = null; + // drop cached results + this.contextNodeAllOnSameLine = undefined; + this.nextNodeAllOnSameLine = undefined; + this.tokensAreOnSameLine = undefined; + this.contextNodeBlockIsOnOneLine = undefined; + this.nextNodeBlockIsOnOneLine = undefined; } public ContextNodeAllOnSameLine(): boolean { - if (this.contextNodeAllOnSameLine === null) { + if (this.contextNodeAllOnSameLine === undefined) { this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode); } @@ -61,7 +62,7 @@ module ts.formatting { } public NextNodeAllOnSameLine(): boolean { - if (this.nextNodeAllOnSameLine === null) { + if (this.nextNodeAllOnSameLine === undefined) { this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent); } @@ -69,11 +70,7 @@ module ts.formatting { } public TokensAreOnSameLine(): boolean { - if (this.tokensAreOnSameLine === null) { - - //var startLine = this.snapshot.getLineNumberFromPosition(this.currentTokenSpan.token.pos); - //var endLine = this.snapshot.getLineNumberFromPosition(this.nextTokenSpan.token.pos); - + if (this.tokensAreOnSameLine === undefined) { var startLine = this.sourceFile.getLineAndCharacterFromPosition(this.currentTokenSpan.pos).line; var endLine = this.sourceFile.getLineAndCharacterFromPosition(this.nextTokenSpan.pos).line; this.tokensAreOnSameLine = (startLine == endLine); @@ -83,7 +80,7 @@ module ts.formatting { } public ContextNodeBlockIsOnOneLine() { - if (this.contextNodeBlockIsOnOneLine === null) { + if (this.contextNodeBlockIsOnOneLine === undefined) { this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode); } @@ -91,7 +88,7 @@ module ts.formatting { } public NextNodeBlockIsOnOneLine() { - if (this.nextNodeBlockIsOnOneLine === null) { + if (this.nextNodeBlockIsOnOneLine === undefined) { this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent); } @@ -101,14 +98,9 @@ module ts.formatting { private NodeIsOnOneLine(node: Node): boolean { var startLine = this.sourceFile.getLineAndCharacterFromPosition(node.getStart(this.sourceFile)).line; var endLine = this.sourceFile.getLineAndCharacterFromPosition(node.getEnd()).line; - //var startLine = this.snapshot.getLineNumberFromPosition(node.start()); - //var endLine = this.snapshot.getLineNumberFromPosition(node.end()); - return startLine == endLine; } - // Now we know we have a block (or a fake block represented by some other kind of node with an open and close brace as children). - // IMPORTANT!!! This relies on the invariant that IsBlockContext must return true ONLY for nodes with open and close braces as immediate children private BlockIsOnOneLine(node: Node): boolean { var openBrace = findChildOfKind(node, SyntaxKind.OpenBraceToken, this.sourceFile); var closeBrace = findChildOfKind(node, SyntaxKind.CloseBraceToken, this.sourceFile); @@ -117,12 +109,7 @@ module ts.formatting { var endLine = this.sourceFile.getLineAndCharacterFromPosition(closeBrace.getStart(this.sourceFile)).line; return startLine === endLine; } - - //var block = node.node(); - - //// Now check if they are on the same line - //return this.snapshot.getLineNumberFromPosition(end(block.openBraceToken)) === - // this.snapshot.getLineNumberFromPosition(start(block.closeBraceToken)); + return false; } } } \ No newline at end of file From e79bec5cbfb0133acfb1e57e2c4df5988c15a897 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 5 Nov 2014 14:12:19 -0800 Subject: [PATCH 040/154] TypeGuards narrow types in if statement works per spec: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The type of a variable or parameter is narrowed in the following situations: • In the true branch statement of an ‘if’ statement, the type of a variable or parameter is narrowed by any type guard in the ‘if’ condition when true, provided the if statement contains no assignments to the variable or parameter. • In the false branch statement of an ‘if’ statement, the type of a variable or parameter is narrowed by any type guard in the ‘if’ condition when false, provided the if statement contains no assignments to the variable or parameter. --- .../reference/typeGuardsInIfStatement.js | 287 ++++++++++++++ .../reference/typeGuardsInIfStatement.types | 371 ++++++++++++++++++ .../typeGuards/typeGuardsInIfStatement.ts | 148 +++++++ 3 files changed, 806 insertions(+) create mode 100644 tests/baselines/reference/typeGuardsInIfStatement.js create mode 100644 tests/baselines/reference/typeGuardsInIfStatement.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts diff --git a/tests/baselines/reference/typeGuardsInIfStatement.js b/tests/baselines/reference/typeGuardsInIfStatement.js new file mode 100644 index 00000000000..6b1fb4b062c --- /dev/null +++ b/tests/baselines/reference/typeGuardsInIfStatement.js @@ -0,0 +1,287 @@ +//// [typeGuardsInIfStatement.ts] +// In the true branch statement of an �if� statement, +// the type of a variable or parameter is narrowed by any type guard in the �if� condition when true, +// provided the true branch statement contains no assignments to the variable or parameter. +// In the false branch statement of an �if� statement, +// the type of a variable or parameter is narrowed by any type guard in the �if� condition when false, +// provided the false branch statement contains no assignments to the variable or parameter +function foo(x: number | string) { + if (typeof x === "string") { + return x.length; // string + } + else { + return x++; // number + } +} +function foo2(x: number | string) { + // x is assigned in the if true branch, the type is not narrowed + if (typeof x === "string") { + x = 10; + return x; // string | number + } + else { + return x; // string | number + } +} +function foo3(x: number | string) { + // x is assigned in the if true branch, the type is not narrowed + if (typeof x === "string") { + x = "Hello"; // even though assigned using same type as narrowed expression + return x; // string | number + } + else { + return x; // string | number + } +} +function foo4(x: number | string) { + // false branch updates the variable - so here it is not number + if (typeof x === "string") { + return x; // string | number + } + else { + x = 10; // even though assigned number - this should result in x to be string | number + return x; // string | number + } +} +function foo5(x: number | string) { + // false branch updates the variable - so here it is not number + if (typeof x === "string") { + return x; // string | number + } + else { + x = "hello"; + return x; // string | number + } +} +function foo6(x: number | string) { + // Modify in both branches + if (typeof x === "string") { + x = 10; + return x; // string | number + } + else { + x = "hello"; + return x; // string | number + } +} +function foo7(x: number | string | boolean) { + if (typeof x === "string") { + return x === "hello"; // string + } + else if (typeof x === "boolean") { + return x; // boolean + } + else { + return x == 10; // number + } +} +function foo8(x: number | string | boolean) { + if (typeof x === "string") { + return x === "hello"; // string + } + else { + var b: number | boolean = x; // number | boolean + if (typeof x === "boolean") { + return x; // boolean + } + else { + return x == 10; // number + } + } +} +function foo9(x: number | string) { + var y = 10; + if (typeof x === "string") { + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + y = x.length; + return x === "hello"; // string + } + else { + return x == 10; // number + } +} +function foo10(x: number | string | boolean) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + if (typeof x === "string") { + return x === "hello"; // string + } + else { + var y: boolean | string; + var b = x; // number | boolean + return typeof x === "number" + ? x === 10 // number + : x; // x should be boolean + } +} +function foo11(x: number | string | boolean) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + // Assigning value to x deep inside another guard stops narrowing of type too + if (typeof x === "string") { + return x; // string | number | boolean - x changed in else branch + } + else { + var y: number| boolean | string; + var b = x; // number | boolean | string - because below we are changing value of x in if statement + return typeof x === "number" + ? ( + // change value of x + x = 10 && x.toString() // number | boolean | string + ) + : ( + // do not change value + y = x && x.toString() // number | boolean | string + ); + } +} +function foo12(x: number | string | boolean) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + if (typeof x === "string") { + return x.toString(); // string | number | boolean - x changed in else branch + } + else { + x = 10; + var b = x; // number | boolean | string + return typeof x === "number" + ? x.toString() // number + : x.toString(); // boolean | string + } +} + +//// [typeGuardsInIfStatement.js] +// In the true branch statement of an �if� statement, +// the type of a variable or parameter is narrowed by any type guard in the �if� condition when true, +// provided the true branch statement contains no assignments to the variable or parameter. +// In the false branch statement of an �if� statement, +// the type of a variable or parameter is narrowed by any type guard in the �if� condition when false, +// provided the false branch statement contains no assignments to the variable or parameter +function foo(x) { + if (typeof x === "string") { + return x.length; // string + } + else { + return x++; // number + } +} +function foo2(x) { + // x is assigned in the if true branch, the type is not narrowed + if (typeof x === "string") { + x = 10; + return x; // string | number + } + else { + return x; // string | number + } +} +function foo3(x) { + // x is assigned in the if true branch, the type is not narrowed + if (typeof x === "string") { + x = "Hello"; // even though assigned using same type as narrowed expression + return x; // string | number + } + else { + return x; // string | number + } +} +function foo4(x) { + // false branch updates the variable - so here it is not number + if (typeof x === "string") { + return x; // string | number + } + else { + x = 10; // even though assigned number - this should result in x to be string | number + return x; // string | number + } +} +function foo5(x) { + // false branch updates the variable - so here it is not number + if (typeof x === "string") { + return x; // string | number + } + else { + x = "hello"; + return x; // string | number + } +} +function foo6(x) { + // Modify in both branches + if (typeof x === "string") { + x = 10; + return x; // string | number + } + else { + x = "hello"; + return x; // string | number + } +} +function foo7(x) { + if (typeof x === "string") { + return x === "hello"; // string + } + else if (typeof x === "boolean") { + return x; // boolean + } + else { + return x == 10; // number + } +} +function foo8(x) { + if (typeof x === "string") { + return x === "hello"; // string + } + else { + var b = x; // number | boolean + if (typeof x === "boolean") { + return x; // boolean + } + else { + return x == 10; // number + } + } +} +function foo9(x) { + var y = 10; + if (typeof x === "string") { + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + y = x.length; + return x === "hello"; // string + } + else { + return x == 10; // number + } +} +function foo10(x) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + if (typeof x === "string") { + return x === "hello"; // string + } + else { + var y; + var b = x; // number | boolean + return typeof x === "number" ? x === 10 : x; // x should be boolean + } +} +function foo11(x) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + // Assigning value to x deep inside another guard stops narrowing of type too + if (typeof x === "string") { + return x; // string | number | boolean - x changed in else branch + } + else { + var y; + var b = x; // number | boolean | string - because below we are changing value of x in if statement + return typeof x === "number" ? (x = 10 && x.toString()) : (y = x && x.toString()); + } +} +function foo12(x) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + if (typeof x === "string") { + return x.toString(); // string | number | boolean - x changed in else branch + } + else { + x = 10; + var b = x; // number | boolean | string + return typeof x === "number" ? x.toString() : x.toString(); // boolean | string + } +} diff --git a/tests/baselines/reference/typeGuardsInIfStatement.types b/tests/baselines/reference/typeGuardsInIfStatement.types new file mode 100644 index 00000000000..f443c0d7e0d --- /dev/null +++ b/tests/baselines/reference/typeGuardsInIfStatement.types @@ -0,0 +1,371 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts === +// In the true branch statement of an �if� statement, +// the type of a variable or parameter is narrowed by any type guard in the �if� condition when true, +// provided the true branch statement contains no assignments to the variable or parameter. +// In the false branch statement of an �if� statement, +// the type of a variable or parameter is narrowed by any type guard in the �if� condition when false, +// provided the false branch statement contains no assignments to the variable or parameter +function foo(x: number | string) { +>foo : (x: string | number) => number +>x : string | number + + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + return x.length; // string +>x.length : number +>x : string +>length : number + } + else { + return x++; // number +>x++ : number +>x : number + } +} +function foo2(x: number | string) { +>foo2 : (x: string | number) => string | number +>x : string | number + + // x is assigned in the if true branch, the type is not narrowed + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + x = 10; +>x = 10 : number +>x : string | number + + return x; // string | number +>x : string | number + } + else { + return x; // string | number +>x : string | number + } +} +function foo3(x: number | string) { +>foo3 : (x: string | number) => string | number +>x : string | number + + // x is assigned in the if true branch, the type is not narrowed + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + x = "Hello"; // even though assigned using same type as narrowed expression +>x = "Hello" : string +>x : string | number + + return x; // string | number +>x : string | number + } + else { + return x; // string | number +>x : string | number + } +} +function foo4(x: number | string) { +>foo4 : (x: string | number) => string | number +>x : string | number + + // false branch updates the variable - so here it is not number + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + return x; // string | number +>x : string | number + } + else { + x = 10; // even though assigned number - this should result in x to be string | number +>x = 10 : number +>x : string | number + + return x; // string | number +>x : string | number + } +} +function foo5(x: number | string) { +>foo5 : (x: string | number) => string | number +>x : string | number + + // false branch updates the variable - so here it is not number + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + return x; // string | number +>x : string | number + } + else { + x = "hello"; +>x = "hello" : string +>x : string | number + + return x; // string | number +>x : string | number + } +} +function foo6(x: number | string) { +>foo6 : (x: string | number) => string | number +>x : string | number + + // Modify in both branches + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + x = 10; +>x = 10 : number +>x : string | number + + return x; // string | number +>x : string | number + } + else { + x = "hello"; +>x = "hello" : string +>x : string | number + + return x; // string | number +>x : string | number + } +} +function foo7(x: number | string | boolean) { +>foo7 : (x: string | number | boolean) => boolean +>x : string | number | boolean + + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + return x === "hello"; // string +>x === "hello" : boolean +>x : string + } + else if (typeof x === "boolean") { +>typeof x === "boolean" : boolean +>typeof x : string +>x : number | boolean + + return x; // boolean +>x : boolean + } + else { + return x == 10; // number +>x == 10 : boolean +>x : number + } +} +function foo8(x: number | string | boolean) { +>foo8 : (x: string | number | boolean) => boolean +>x : string | number | boolean + + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + return x === "hello"; // string +>x === "hello" : boolean +>x : string + } + else { + var b: number | boolean = x; // number | boolean +>b : number | boolean +>x : number | boolean + + if (typeof x === "boolean") { +>typeof x === "boolean" : boolean +>typeof x : string +>x : number | boolean + + return x; // boolean +>x : boolean + } + else { + return x == 10; // number +>x == 10 : boolean +>x : number + } + } +} +function foo9(x: number | string) { +>foo9 : (x: string | number) => boolean +>x : string | number + + var y = 10; +>y : number + + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + y = x.length; +>y = x.length : number +>y : number +>x.length : number +>x : string +>length : number + + return x === "hello"; // string +>x === "hello" : boolean +>x : string + } + else { + return x == 10; // number +>x == 10 : boolean +>x : number + } +} +function foo10(x: number | string | boolean) { +>foo10 : (x: string | number | boolean) => boolean +>x : string | number | boolean + + // Mixing typeguard narrowing in if statement with conditional expression typeguard + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + return x === "hello"; // string +>x === "hello" : boolean +>x : string + } + else { + var y: boolean | string; +>y : string | boolean + + var b = x; // number | boolean +>b : number | boolean +>x : number | boolean + + return typeof x === "number" +>typeof x === "number" ? x === 10 // number : x : boolean +>typeof x === "number" : boolean +>typeof x : string +>x : number | boolean + + ? x === 10 // number +>x === 10 : boolean +>x : number + + : x; // x should be boolean +>x : boolean + } +} +function foo11(x: number | string | boolean) { +>foo11 : (x: string | number | boolean) => string | number | boolean +>x : string | number | boolean + + // Mixing typeguard narrowing in if statement with conditional expression typeguard + // Assigning value to x deep inside another guard stops narrowing of type too + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + return x; // string | number | boolean - x changed in else branch +>x : string | number | boolean + } + else { + var y: number| boolean | string; +>y : string | number | boolean + + var b = x; // number | boolean | string - because below we are changing value of x in if statement +>b : string | number | boolean +>x : string | number | boolean + + return typeof x === "number" +>typeof x === "number" ? ( // change value of x x = 10 && x.toString() // number | boolean | string ) : ( // do not change value y = x && x.toString() // number | boolean | string ) : string +>typeof x === "number" : boolean +>typeof x : string +>x : string | number | boolean + + ? ( +>( // change value of x x = 10 && x.toString() // number | boolean | string ) : string + + // change value of x + x = 10 && x.toString() // number | boolean | string +>x = 10 && x.toString() : string +>x : string | number | boolean +>10 && x.toString() : string +>x.toString() : string +>x.toString : () => string +>x : string | number | boolean +>toString : () => string + + ) + : ( +>( // do not change value y = x && x.toString() // number | boolean | string ) : string + + // do not change value + y = x && x.toString() // number | boolean | string +>y = x && x.toString() : string +>y : string | number | boolean +>x && x.toString() : string +>x : string | number | boolean +>x.toString() : string +>x.toString : () => string +>x : string | number | boolean +>toString : () => string + + ); + } +} +function foo12(x: number | string | boolean) { +>foo12 : (x: string | number | boolean) => string +>x : string | number | boolean + + // Mixing typeguard narrowing in if statement with conditional expression typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + return x.toString(); // string | number | boolean - x changed in else branch +>x.toString() : string +>x.toString : () => string +>x : string | number | boolean +>toString : () => string + } + else { + x = 10; +>x = 10 : number +>x : string | number | boolean + + var b = x; // number | boolean | string +>b : string | number | boolean +>x : string | number | boolean + + return typeof x === "number" +>typeof x === "number" ? x.toString() // number : x.toString() : string +>typeof x === "number" : boolean +>typeof x : string +>x : string | number | boolean + + ? x.toString() // number +>x.toString() : string +>x.toString : (radix?: number) => string +>x : number +>toString : (radix?: number) => string + + : x.toString(); // boolean | string +>x.toString() : string +>x.toString : () => string +>x : string | boolean +>toString : () => string + } +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts new file mode 100644 index 00000000000..1b1e3cfab6c --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts @@ -0,0 +1,148 @@ +// In the true branch statement of an ‘if’ statement, +// the type of a variable or parameter is narrowed by any type guard in the ‘if’ condition when true, +// provided the true branch statement contains no assignments to the variable or parameter. +// In the false branch statement of an ‘if’ statement, +// the type of a variable or parameter is narrowed by any type guard in the ‘if’ condition when false, +// provided the false branch statement contains no assignments to the variable or parameter +function foo(x: number | string) { + if (typeof x === "string") { + return x.length; // string + } + else { + return x++; // number + } +} +function foo2(x: number | string) { + // x is assigned in the if true branch, the type is not narrowed + if (typeof x === "string") { + x = 10; + return x; // string | number + } + else { + return x; // string | number + } +} +function foo3(x: number | string) { + // x is assigned in the if true branch, the type is not narrowed + if (typeof x === "string") { + x = "Hello"; // even though assigned using same type as narrowed expression + return x; // string | number + } + else { + return x; // string | number + } +} +function foo4(x: number | string) { + // false branch updates the variable - so here it is not number + if (typeof x === "string") { + return x; // string | number + } + else { + x = 10; // even though assigned number - this should result in x to be string | number + return x; // string | number + } +} +function foo5(x: number | string) { + // false branch updates the variable - so here it is not number + if (typeof x === "string") { + return x; // string | number + } + else { + x = "hello"; + return x; // string | number + } +} +function foo6(x: number | string) { + // Modify in both branches + if (typeof x === "string") { + x = 10; + return x; // string | number + } + else { + x = "hello"; + return x; // string | number + } +} +function foo7(x: number | string | boolean) { + if (typeof x === "string") { + return x === "hello"; // string + } + else if (typeof x === "boolean") { + return x; // boolean + } + else { + return x == 10; // number + } +} +function foo8(x: number | string | boolean) { + if (typeof x === "string") { + return x === "hello"; // string + } + else { + var b: number | boolean = x; // number | boolean + if (typeof x === "boolean") { + return x; // boolean + } + else { + return x == 10; // number + } + } +} +function foo9(x: number | string) { + var y = 10; + if (typeof x === "string") { + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + y = x.length; + return x === "hello"; // string + } + else { + return x == 10; // number + } +} +function foo10(x: number | string | boolean) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + if (typeof x === "string") { + return x === "hello"; // string + } + else { + var y: boolean | string; + var b = x; // number | boolean + return typeof x === "number" + ? x === 10 // number + : x; // x should be boolean + } +} +function foo11(x: number | string | boolean) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + // Assigning value to x deep inside another guard stops narrowing of type too + if (typeof x === "string") { + return x; // string | number | boolean - x changed in else branch + } + else { + var y: number| boolean | string; + var b = x; // number | boolean | string - because below we are changing value of x in if statement + return typeof x === "number" + ? ( + // change value of x + x = 10 && x.toString() // number | boolean | string + ) + : ( + // do not change value + y = x && x.toString() // number | boolean | string + ); + } +} +function foo12(x: number | string | boolean) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + if (typeof x === "string") { + return x.toString(); // string | number | boolean - x changed in else branch + } + else { + x = 10; + var b = x; // number | boolean | string + return typeof x === "number" + ? x.toString() // number + : x.toString(); // boolean | string + } +} \ No newline at end of file From 2088a89223f246191a31ee3e6b5798e06a51881b Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 5 Nov 2014 14:12:29 -0800 Subject: [PATCH 041/154] Test cases to make sure typeguard is defeated in case of function calls From spec: Also note that it is possible to defeat a type guard by calling a function that changes the type of the guarded variable. --- tests/baselines/reference/typeGuardsDefeat.js | 75 +++++++++++++++ .../reference/typeGuardsDefeat.types | 95 +++++++++++++++++++ .../typeGuards/typeGuardsDefeat.ts | 36 +++++++ 3 files changed, 206 insertions(+) create mode 100644 tests/baselines/reference/typeGuardsDefeat.js create mode 100644 tests/baselines/reference/typeGuardsDefeat.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsDefeat.ts diff --git a/tests/baselines/reference/typeGuardsDefeat.js b/tests/baselines/reference/typeGuardsDefeat.js new file mode 100644 index 00000000000..b5e1e0c362c --- /dev/null +++ b/tests/baselines/reference/typeGuardsDefeat.js @@ -0,0 +1,75 @@ +//// [typeGuardsDefeat.ts] +// Also note that it is possible to defeat a type guard by calling a function that changes the +// type of the guarded variable. +function foo(x: number | string) { + function f() { + x = 10; + } + if (typeof x === "string") { + f(); + return x.length; // string + } + else { + return x++; // number + } +} +function foo2(x: number | string) { + if (typeof x === "string") { + return x.length; // string + } + else { + (function f() { + x = 10; + })(); + return x++; // number + } +} +function foo3(x: number | string) { + if (typeof x === "string") { + return x.length; // string + } + else { + (() => { + x = 10; + })(); + return x++; // number + } +} + +//// [typeGuardsDefeat.js] +// Also note that it is possible to defeat a type guard by calling a function that changes the +// type of the guarded variable. +function foo(x) { + function f() { + x = 10; + } + if (typeof x === "string") { + f(); + return x.length; // string + } + else { + return x++; // number + } +} +function foo2(x) { + if (typeof x === "string") { + return x.length; // string + } + else { + (function f() { + x = 10; + })(); + return x++; // number + } +} +function foo3(x) { + if (typeof x === "string") { + return x.length; // string + } + else { + (function () { + x = 10; + })(); + return x++; // number + } +} diff --git a/tests/baselines/reference/typeGuardsDefeat.types b/tests/baselines/reference/typeGuardsDefeat.types new file mode 100644 index 00000000000..6c4153cc3e2 --- /dev/null +++ b/tests/baselines/reference/typeGuardsDefeat.types @@ -0,0 +1,95 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsDefeat.ts === +// Also note that it is possible to defeat a type guard by calling a function that changes the +// type of the guarded variable. +function foo(x: number | string) { +>foo : (x: string | number) => number +>x : string | number + + function f() { +>f : () => void + + x = 10; +>x = 10 : number +>x : string | number + } + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + f(); +>f() : void +>f : () => void + + return x.length; // string +>x.length : number +>x : string +>length : number + } + else { + return x++; // number +>x++ : number +>x : number + } +} +function foo2(x: number | string) { +>foo2 : (x: string | number) => number +>x : string | number + + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + return x.length; // string +>x.length : number +>x : string +>length : number + } + else { + (function f() { +>(function f() { x = 10; })() : void +>(function f() { x = 10; }) : () => void +>function f() { x = 10; } : () => void +>f : () => void + + x = 10; +>x = 10 : number +>x : string | number + + })(); + return x++; // number +>x++ : number +>x : number + } +} +function foo3(x: number | string) { +>foo3 : (x: string | number) => number +>x : string | number + + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + return x.length; // string +>x.length : number +>x : string +>length : number + } + else { + (() => { +>(() => { x = 10; })() : void +>(() => { x = 10; }) : () => void +>() => { x = 10; } : () => void + + x = 10; +>x = 10 : number +>x : string | number + + })(); + return x++; // number +>x++ : number +>x : number + } +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsDefeat.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsDefeat.ts new file mode 100644 index 00000000000..9c78e725397 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsDefeat.ts @@ -0,0 +1,36 @@ +// Also note that it is possible to defeat a type guard by calling a function that changes the +// type of the guarded variable. +function foo(x: number | string) { + function f() { + x = 10; + } + if (typeof x === "string") { + f(); + return x.length; // string + } + else { + return x++; // number + } +} +function foo2(x: number | string) { + if (typeof x === "string") { + return x.length; // string + } + else { + (function f() { + x = 10; + })(); + return x++; // number + } +} +function foo3(x: number | string) { + if (typeof x === "string") { + return x.length; // string + } + else { + (() => { + x = 10; + })(); + return x++; // number + } +} \ No newline at end of file From 4b3d603f2409df20e572aa7823a84d54eee16985 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 5 Nov 2014 14:21:32 -0800 Subject: [PATCH 042/154] Test cases for typeguards are scoped at function /module block --- .../typeGuardsInFunctionAndModuleBlock.js | 131 +++++++++ .../typeGuardsInFunctionAndModuleBlock.types | 274 ++++++++++++++++++ .../typeGuardsInFunctionAndModuleBlock.ts | 70 +++++ 3 files changed, 475 insertions(+) create mode 100644 tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js create mode 100644 tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts diff --git a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js new file mode 100644 index 00000000000..1152cd8d8b5 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js @@ -0,0 +1,131 @@ +//// [typeGuardsInFunctionAndModuleBlock.ts] +// typeguards are scoped in function/module block + +function foo(x: number | string | boolean) { + return typeof x === "string" + ? x + : function f() { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number | string + } (); +} +function foo2(x: number | string | boolean) { + return typeof x === "string" + ? x + : function f(a: number | boolean) { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number | string + } (x); // x here is narrowed to number | boolean +} +function foo3(x: number | string | boolean) { + return typeof x === "string" + ? x + : (() => { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number | string + })(); +} +function foo4(x: number | string | boolean) { + return typeof x === "string" + ? x + : ((a: number | boolean) => { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number | string + })(x); // x here is narrowed to number | boolean +} +module m { + var x: number | string | boolean; + module m2 { + var b = x; // new scope - number | boolean | string + var y: string; + if (typeof x === "string") { + y = x // string; + } else { + y = typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number + } + } +} +module m1 { + var x: number | string | boolean; + module m2.m3 { + var b = x; // new scope - number | boolean | string + var y: string; + if (typeof x === "string") { + y = x // string; + } else { + y = typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number + } + } +} + +//// [typeGuardsInFunctionAndModuleBlock.js] +// typeguards are scoped in function/module block +function foo(x) { + return typeof x === "string" ? x : function f() { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" ? x.toString() : x.toString(); // number | string + }(); +} +function foo2(x) { + return typeof x === "string" ? x : function f(a) { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" ? x.toString() : x.toString(); // number | string + }(x); // x here is narrowed to number | boolean +} +function foo3(x) { + return typeof x === "string" ? x : (function () { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" ? x.toString() : x.toString(); // number | string + })(); +} +function foo4(x) { + return typeof x === "string" ? x : (function (a) { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" ? x.toString() : x.toString(); // number | string + })(x); // x here is narrowed to number | boolean +} +var m; +(function (m) { + var x; + var m2; + (function (m2) { + var b = x; // new scope - number | boolean | string + var y; + if (typeof x === "string") { + y = x; // string; + } + else { + y = typeof x === "boolean" ? x.toString() : x.toString(); // number + } + })(m2 || (m2 = {})); +})(m || (m = {})); +var m1; +(function (m1) { + var x; + var m2; + (function (m2) { + var m3; + (function (m3) { + var b = x; // new scope - number | boolean | string + var y; + if (typeof x === "string") { + y = x; // string; + } + else { + y = typeof x === "boolean" ? x.toString() : x.toString(); // number + } + })(m3 = m2.m3 || (m2.m3 = {})); + })(m2 || (m2 = {})); +})(m1 || (m1 = {})); diff --git a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types new file mode 100644 index 00000000000..c1ba1a7d639 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types @@ -0,0 +1,274 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts === +// typeguards are scoped in function/module block + +function foo(x: number | string | boolean) { +>foo : (x: string | number | boolean) => string +>x : string | number | boolean + + return typeof x === "string" +>typeof x === "string" ? x : function f() { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string } () : string +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + ? x +>x : string + + : function f() { +>function f() { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string } () : string +>function f() { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string } : () => string +>f : () => string + + var b = x; // new scope - number | boolean | string +>b : string | number | boolean +>x : string | number | boolean + + return typeof x === "boolean" +>typeof x === "boolean" ? x.toString() // boolean : x.toString() : string +>typeof x === "boolean" : boolean +>typeof x : string +>x : string | number | boolean + + ? x.toString() // boolean +>x.toString() : string +>x.toString : () => string +>x : boolean +>toString : () => string + + : x.toString(); // number | string +>x.toString() : string +>x.toString : () => string +>x : string | number +>toString : () => string + + } (); +} +function foo2(x: number | string | boolean) { +>foo2 : (x: string | number | boolean) => string +>x : string | number | boolean + + return typeof x === "string" +>typeof x === "string" ? x : function f(a: number | boolean) { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string } (x) : string +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + ? x +>x : string + + : function f(a: number | boolean) { +>function f(a: number | boolean) { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string } (x) : string +>function f(a: number | boolean) { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string } : (a: number | boolean) => string +>f : (a: number | boolean) => string +>a : number | boolean + + var b = x; // new scope - number | boolean | string +>b : string | number | boolean +>x : string | number | boolean + + return typeof x === "boolean" +>typeof x === "boolean" ? x.toString() // boolean : x.toString() : string +>typeof x === "boolean" : boolean +>typeof x : string +>x : string | number | boolean + + ? x.toString() // boolean +>x.toString() : string +>x.toString : () => string +>x : boolean +>toString : () => string + + : x.toString(); // number | string +>x.toString() : string +>x.toString : () => string +>x : string | number +>toString : () => string + + } (x); // x here is narrowed to number | boolean +>x : number | boolean +} +function foo3(x: number | string | boolean) { +>foo3 : (x: string | number | boolean) => string +>x : string | number | boolean + + return typeof x === "string" +>typeof x === "string" ? x : (() => { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string })() : string +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + ? x +>x : string + + : (() => { +>(() => { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string })() : string +>(() => { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string }) : () => string +>() => { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string } : () => string + + var b = x; // new scope - number | boolean | string +>b : string | number | boolean +>x : string | number | boolean + + return typeof x === "boolean" +>typeof x === "boolean" ? x.toString() // boolean : x.toString() : string +>typeof x === "boolean" : boolean +>typeof x : string +>x : string | number | boolean + + ? x.toString() // boolean +>x.toString() : string +>x.toString : () => string +>x : boolean +>toString : () => string + + : x.toString(); // number | string +>x.toString() : string +>x.toString : () => string +>x : string | number +>toString : () => string + + })(); +} +function foo4(x: number | string | boolean) { +>foo4 : (x: string | number | boolean) => string +>x : string | number | boolean + + return typeof x === "string" +>typeof x === "string" ? x : ((a: number | boolean) => { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string })(x) : string +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + ? x +>x : string + + : ((a: number | boolean) => { +>((a: number | boolean) => { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string })(x) : string +>((a: number | boolean) => { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string }) : (a: number | boolean) => string +>(a: number | boolean) => { var b = x; // new scope - number | boolean | string return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number | string } : (a: number | boolean) => string +>a : number | boolean + + var b = x; // new scope - number | boolean | string +>b : string | number | boolean +>x : string | number | boolean + + return typeof x === "boolean" +>typeof x === "boolean" ? x.toString() // boolean : x.toString() : string +>typeof x === "boolean" : boolean +>typeof x : string +>x : string | number | boolean + + ? x.toString() // boolean +>x.toString() : string +>x.toString : () => string +>x : boolean +>toString : () => string + + : x.toString(); // number | string +>x.toString() : string +>x.toString : () => string +>x : string | number +>toString : () => string + + })(x); // x here is narrowed to number | boolean +>x : number | boolean +} +module m { +>m : typeof m + + var x: number | string | boolean; +>x : string | number | boolean + + module m2 { +>m2 : typeof m2 + + var b = x; // new scope - number | boolean | string +>b : string | number | boolean +>x : string | number | boolean + + var y: string; +>y : string + + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + y = x // string; +>y = x : string +>y : string +>x : string + + } else { + y = typeof x === "boolean" +>y = typeof x === "boolean" ? x.toString() // boolean : x.toString() : string +>y : string +>typeof x === "boolean" ? x.toString() // boolean : x.toString() : string +>typeof x === "boolean" : boolean +>typeof x : string +>x : number | boolean + + ? x.toString() // boolean +>x.toString() : string +>x.toString : () => string +>x : boolean +>toString : () => string + + : x.toString(); // number +>x.toString() : string +>x.toString : (radix?: number) => string +>x : number +>toString : (radix?: number) => string + } + } +} +module m1 { +>m1 : typeof m1 + + var x: number | string | boolean; +>x : string | number | boolean + + module m2.m3 { +>m2 : typeof m2 +>m3 : typeof m3 + + var b = x; // new scope - number | boolean | string +>b : string | number | boolean +>x : string | number | boolean + + var y: string; +>y : string + + if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + y = x // string; +>y = x : string +>y : string +>x : string + + } else { + y = typeof x === "boolean" +>y = typeof x === "boolean" ? x.toString() // boolean : x.toString() : string +>y : string +>typeof x === "boolean" ? x.toString() // boolean : x.toString() : string +>typeof x === "boolean" : boolean +>typeof x : string +>x : number | boolean + + ? x.toString() // boolean +>x.toString() : string +>x.toString : () => string +>x : boolean +>toString : () => string + + : x.toString(); // number +>x.toString() : string +>x.toString : (radix?: number) => string +>x : number +>toString : (radix?: number) => string + } + } +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts new file mode 100644 index 00000000000..244e9f8fa64 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts @@ -0,0 +1,70 @@ +// typeguards are scoped in function/module block + +function foo(x: number | string | boolean) { + return typeof x === "string" + ? x + : function f() { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number | string + } (); +} +function foo2(x: number | string | boolean) { + return typeof x === "string" + ? x + : function f(a: number | boolean) { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number | string + } (x); // x here is narrowed to number | boolean +} +function foo3(x: number | string | boolean) { + return typeof x === "string" + ? x + : (() => { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number | string + })(); +} +function foo4(x: number | string | boolean) { + return typeof x === "string" + ? x + : ((a: number | boolean) => { + var b = x; // new scope - number | boolean | string + return typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number | string + })(x); // x here is narrowed to number | boolean +} +module m { + var x: number | string | boolean; + module m2 { + var b = x; // new scope - number | boolean | string + var y: string; + if (typeof x === "string") { + y = x // string; + } else { + y = typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number + } + } +} +module m1 { + var x: number | string | boolean; + module m2.m3 { + var b = x; // new scope - number | boolean | string + var y: string; + if (typeof x === "string") { + y = x // string; + } else { + y = typeof x === "boolean" + ? x.toString() // boolean + : x.toString(); // number + } + } +} \ No newline at end of file From 55952af304cfcca3a0db16e6e9b7df6652213179 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 5 Nov 2014 14:47:05 -0800 Subject: [PATCH 043/154] =?UTF-8?q?Tests=20for=20conditional=20expression?= =?UTF-8?q?=20typeguards=20=E2=80=A2=09In=20the=20true=20expression=20of?= =?UTF-8?q?=20a=20conditional=20expression,=20the=20type=20of=20a=20variab?= =?UTF-8?q?le=20or=20parameter=20is=20narrowed=20by=20any=20type=20guard?= =?UTF-8?q?=20in=20the=20condition=20when=20true,=20provided=20the=20expre?= =?UTF-8?q?ssion=20contains=20no=20assignments=20to=20the=20variable=20or?= =?UTF-8?q?=20parameter.=20=E2=80=A2=09In=20the=20false=20expression=20of?= =?UTF-8?q?=20a=20conditional=20expression,=20the=20type=20of=20a=20variab?= =?UTF-8?q?le=20or=20parameter=20is=20narrowed=20by=20any=20type=20guard?= =?UTF-8?q?=20in=20the=20condition=20when=20false,=20provided=20the=20expr?= =?UTF-8?q?ession=20contains=20no=20assignments=20to=20the=20variable=20or?= =?UTF-8?q?=20parameter.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../typeGuardsInConditionalExpression.js | 160 ++++++++ .../typeGuardsInConditionalExpression.types | 356 ++++++++++++++++++ .../typeGuardsInConditionalExpression.ts | 97 +++++ 3 files changed, 613 insertions(+) create mode 100644 tests/baselines/reference/typeGuardsInConditionalExpression.js create mode 100644 tests/baselines/reference/typeGuardsInConditionalExpression.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInConditionalExpression.ts diff --git a/tests/baselines/reference/typeGuardsInConditionalExpression.js b/tests/baselines/reference/typeGuardsInConditionalExpression.js new file mode 100644 index 00000000000..303a27dc938 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInConditionalExpression.js @@ -0,0 +1,160 @@ +//// [typeGuardsInConditionalExpression.ts] +// In the true expression of a conditional expression, +// the type of a variable or parameter is narrowed by any type guard in the condition when true, +// provided the true expression contains no assignments to the variable or parameter. +// In the false expression of a conditional expression, +// the type of a variable or parameter is narrowed by any type guard in the condition when false, +// provided the false expression contains no assignments to the variable or parameter. + +function foo(x: number | string) { + return typeof x === "string" + ? x.length // string + : x++; // number +} +function foo2(x: number | string) { + // x is assigned in the if true branch, the type is not narrowed + return typeof x === "string" + ? (x = 10 && x)// string | number + : x; // string | number +} +function foo3(x: number | string) { + // x is assigned in the if false branch, the type is not narrowed + // even though assigned using same type as narrowed expression + return typeof x === "string" + ? (x = "Hello" && x) // string | number + : x; // string | number +} +function foo4(x: number | string) { + // false branch updates the variable - so here it is not number + // even though assigned using same type as narrowed expression + return typeof x === "string" + ? x // string | number + : (x = 10 && x); // string | number +} +function foo5(x: number | string) { + // false branch updates the variable - so here it is not number + return typeof x === "string" + ? x // string | number + : (x = "hello" && x); // string | number +} +function foo6(x: number | string) { + // Modify in both branches + return typeof x === "string" + ? (x = 10 && x) // string | number + : (x = "hello" && x); // string | number +} +function foo7(x: number | string | boolean) { + return typeof x === "string" + ? x === "hello" // string + : typeof x === "boolean" + ? x // boolean + : x == 10; // number +} +function foo8(x: number | string | boolean) { + var b: number | boolean; + return typeof x === "string" + ? x === "hello" + : ((b = x) && // number | boolean + (typeof x === "boolean" + ? x // boolean + : x == 10)); // number +} +function foo9(x: number | string) { + var y = 10; + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + return typeof x === "string" + ? ((y = x.length) && x === "hello") // string + : x === 10; // number +} +function foo10(x: number | string | boolean) { + // Mixing typeguards + var b: boolean | number; + return typeof x === "string" + ? x // string + : ((b = x) // x is number | boolean + && typeof x === "number" + && x.toString()); // x is number +} +function foo11(x: number | string | boolean) { + // Mixing typeguards + // Assigning value to x deep inside another guard stops narrowing of type too + var b: number | boolean | string; + return typeof x === "string" + ? x // number | boolean | string - changed in the false branch + : ((b = x) // x is number | boolean | string - because the assignment changed it + && typeof x === "number" + && (x = 10) // assignment to x + && x); // x is number | boolean | string +} +function foo12(x: number | string | boolean) { + // Mixing typeguards + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + var b: number | boolean | string; + return typeof x === "string" + ? (x = 10 && x.toString().length) // number | boolean | string - changed here + : ((b = x) // x is number | boolean | string - changed in true branch + && typeof x === "number" + && x); // x is number +} + +//// [typeGuardsInConditionalExpression.js] +// In the true expression of a conditional expression, +// the type of a variable or parameter is narrowed by any type guard in the condition when true, +// provided the true expression contains no assignments to the variable or parameter. +// In the false expression of a conditional expression, +// the type of a variable or parameter is narrowed by any type guard in the condition when false, +// provided the false expression contains no assignments to the variable or parameter. +function foo(x) { + return typeof x === "string" ? x.length : x++; // number +} +function foo2(x) { + // x is assigned in the if true branch, the type is not narrowed + return typeof x === "string" ? (x = 10 && x) : x; // string | number +} +function foo3(x) { + // x is assigned in the if false branch, the type is not narrowed + // even though assigned using same type as narrowed expression + return typeof x === "string" ? (x = "Hello" && x) : x; // string | number +} +function foo4(x) { + // false branch updates the variable - so here it is not number + // even though assigned using same type as narrowed expression + return typeof x === "string" ? x : (x = 10 && x); // string | number +} +function foo5(x) { + // false branch updates the variable - so here it is not number + return typeof x === "string" ? x : (x = "hello" && x); // string | number +} +function foo6(x) { + // Modify in both branches + return typeof x === "string" ? (x = 10 && x) : (x = "hello" && x); // string | number +} +function foo7(x) { + return typeof x === "string" ? x === "hello" : typeof x === "boolean" ? x : x == 10; // number +} +function foo8(x) { + var b; + return typeof x === "string" ? x === "hello" : ((b = x) && (typeof x === "boolean" ? x : x == 10)); // number +} +function foo9(x) { + var y = 10; + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + return typeof x === "string" ? ((y = x.length) && x === "hello") : x === 10; // number +} +function foo10(x) { + // Mixing typeguards + var b; + return typeof x === "string" ? x : ((b = x) && typeof x === "number" && x.toString()); // x is number +} +function foo11(x) { + // Mixing typeguards + // Assigning value to x deep inside another guard stops narrowing of type too + var b; + return typeof x === "string" ? x : ((b = x) && typeof x === "number" && (x = 10) && x); // x is number | boolean | string +} +function foo12(x) { + // Mixing typeguards + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + var b; + return typeof x === "string" ? (x = 10 && x.toString().length) : ((b = x) && typeof x === "number" && x); // x is number +} diff --git a/tests/baselines/reference/typeGuardsInConditionalExpression.types b/tests/baselines/reference/typeGuardsInConditionalExpression.types new file mode 100644 index 00000000000..14b35480cd8 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInConditionalExpression.types @@ -0,0 +1,356 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInConditionalExpression.ts === +// In the true expression of a conditional expression, +// the type of a variable or parameter is narrowed by any type guard in the condition when true, +// provided the true expression contains no assignments to the variable or parameter. +// In the false expression of a conditional expression, +// the type of a variable or parameter is narrowed by any type guard in the condition when false, +// provided the false expression contains no assignments to the variable or parameter. + +function foo(x: number | string) { +>foo : (x: string | number) => number +>x : string | number + + return typeof x === "string" +>typeof x === "string" ? x.length // string : x++ : number +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + ? x.length // string +>x.length : number +>x : string +>length : number + + : x++; // number +>x++ : number +>x : number +} +function foo2(x: number | string) { +>foo2 : (x: string | number) => string | number +>x : string | number + + // x is assigned in the if true branch, the type is not narrowed + return typeof x === "string" +>typeof x === "string" ? (x = 10 && x)// string | number : x : string | number +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + ? (x = 10 && x)// string | number +>(x = 10 && x) : string | number +>x = 10 && x : string | number +>x : string | number +>10 && x : string | number +>x : string | number + + : x; // string | number +>x : string | number +} +function foo3(x: number | string) { +>foo3 : (x: string | number) => string | number +>x : string | number + + // x is assigned in the if false branch, the type is not narrowed + // even though assigned using same type as narrowed expression + return typeof x === "string" +>typeof x === "string" ? (x = "Hello" && x) // string | number : x : string | number +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + ? (x = "Hello" && x) // string | number +>(x = "Hello" && x) : string | number +>x = "Hello" && x : string | number +>x : string | number +>"Hello" && x : string | number +>x : string | number + + : x; // string | number +>x : string | number +} +function foo4(x: number | string) { +>foo4 : (x: string | number) => string | number +>x : string | number + + // false branch updates the variable - so here it is not number + // even though assigned using same type as narrowed expression + return typeof x === "string" +>typeof x === "string" ? x // string | number : (x = 10 && x) : string | number +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + ? x // string | number +>x : string | number + + : (x = 10 && x); // string | number +>(x = 10 && x) : string | number +>x = 10 && x : string | number +>x : string | number +>10 && x : string | number +>x : string | number +} +function foo5(x: number | string) { +>foo5 : (x: string | number) => string | number +>x : string | number + + // false branch updates the variable - so here it is not number + return typeof x === "string" +>typeof x === "string" ? x // string | number : (x = "hello" && x) : string | number +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + ? x // string | number +>x : string | number + + : (x = "hello" && x); // string | number +>(x = "hello" && x) : string | number +>x = "hello" && x : string | number +>x : string | number +>"hello" && x : string | number +>x : string | number +} +function foo6(x: number | string) { +>foo6 : (x: string | number) => string | number +>x : string | number + + // Modify in both branches + return typeof x === "string" +>typeof x === "string" ? (x = 10 && x) // string | number : (x = "hello" && x) : string | number +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + ? (x = 10 && x) // string | number +>(x = 10 && x) : string | number +>x = 10 && x : string | number +>x : string | number +>10 && x : string | number +>x : string | number + + : (x = "hello" && x); // string | number +>(x = "hello" && x) : string | number +>x = "hello" && x : string | number +>x : string | number +>"hello" && x : string | number +>x : string | number +} +function foo7(x: number | string | boolean) { +>foo7 : (x: string | number | boolean) => boolean +>x : string | number | boolean + + return typeof x === "string" +>typeof x === "string" ? x === "hello" // string : typeof x === "boolean" ? x // boolean : x == 10 : boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + ? x === "hello" // string +>x === "hello" : boolean +>x : string + + : typeof x === "boolean" +>typeof x === "boolean" ? x // boolean : x == 10 : boolean +>typeof x === "boolean" : boolean +>typeof x : string +>x : number | boolean + + ? x // boolean +>x : boolean + + : x == 10; // number +>x == 10 : boolean +>x : number +} +function foo8(x: number | string | boolean) { +>foo8 : (x: string | number | boolean) => boolean +>x : string | number | boolean + + var b: number | boolean; +>b : number | boolean + + return typeof x === "string" +>typeof x === "string" ? x === "hello" : ((b = x) && // number | boolean (typeof x === "boolean" ? x // boolean : x == 10)) : boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + ? x === "hello" +>x === "hello" : boolean +>x : string + + : ((b = x) && // number | boolean +>((b = x) && // number | boolean (typeof x === "boolean" ? x // boolean : x == 10)) : boolean +>(b = x) && // number | boolean (typeof x === "boolean" ? x // boolean : x == 10) : boolean +>(b = x) : number | boolean +>b = x : number | boolean +>b : number | boolean +>x : number | boolean + + (typeof x === "boolean" +>(typeof x === "boolean" ? x // boolean : x == 10) : boolean +>typeof x === "boolean" ? x // boolean : x == 10 : boolean +>typeof x === "boolean" : boolean +>typeof x : string +>x : number | boolean + + ? x // boolean +>x : boolean + + : x == 10)); // number +>x == 10 : boolean +>x : number +} +function foo9(x: number | string) { +>foo9 : (x: string | number) => boolean +>x : string | number + + var y = 10; +>y : number + + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + return typeof x === "string" +>typeof x === "string" ? ((y = x.length) && x === "hello") // string : x === 10 : boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + ? ((y = x.length) && x === "hello") // string +>((y = x.length) && x === "hello") : boolean +>(y = x.length) && x === "hello" : boolean +>(y = x.length) : number +>y = x.length : number +>y : number +>x.length : number +>x : string +>length : number +>x === "hello" : boolean +>x : string + + : x === 10; // number +>x === 10 : boolean +>x : number +} +function foo10(x: number | string | boolean) { +>foo10 : (x: string | number | boolean) => string +>x : string | number | boolean + + // Mixing typeguards + var b: boolean | number; +>b : number | boolean + + return typeof x === "string" +>typeof x === "string" ? x // string : ((b = x) // x is number | boolean && typeof x === "number" && x.toString()) : string +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + ? x // string +>x : string + + : ((b = x) // x is number | boolean +>((b = x) // x is number | boolean && typeof x === "number" && x.toString()) : string +>(b = x) // x is number | boolean && typeof x === "number" && x.toString() : string +>(b = x) // x is number | boolean && typeof x === "number" : boolean +>(b = x) : number | boolean +>b = x : number | boolean +>b : number | boolean +>x : number | boolean + + && typeof x === "number" +>typeof x === "number" : boolean +>typeof x : string +>x : number | boolean + + && x.toString()); // x is number +>x.toString() : string +>x.toString : (radix?: number) => string +>x : number +>toString : (radix?: number) => string +} +function foo11(x: number | string | boolean) { +>foo11 : (x: string | number | boolean) => string | number | boolean +>x : string | number | boolean + + // Mixing typeguards + // Assigning value to x deep inside another guard stops narrowing of type too + var b: number | boolean | string; +>b : string | number | boolean + + return typeof x === "string" +>typeof x === "string" ? x // number | boolean | string - changed in the false branch : ((b = x) // x is number | boolean | string - because the assignment changed it && typeof x === "number" && (x = 10) // assignment to x && x) : string | number | boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + ? x // number | boolean | string - changed in the false branch +>x : string | number | boolean + + : ((b = x) // x is number | boolean | string - because the assignment changed it +>((b = x) // x is number | boolean | string - because the assignment changed it && typeof x === "number" && (x = 10) // assignment to x && x) : string | number | boolean +>(b = x) // x is number | boolean | string - because the assignment changed it && typeof x === "number" && (x = 10) // assignment to x && x : string | number | boolean +>(b = x) // x is number | boolean | string - because the assignment changed it && typeof x === "number" && (x = 10) : number +>(b = x) // x is number | boolean | string - because the assignment changed it && typeof x === "number" : boolean +>(b = x) : string | number | boolean +>b = x : string | number | boolean +>b : string | number | boolean +>x : string | number | boolean + + && typeof x === "number" +>typeof x === "number" : boolean +>typeof x : string +>x : string | number | boolean + + && (x = 10) // assignment to x +>(x = 10) : number +>x = 10 : number +>x : string | number | boolean + + && x); // x is number | boolean | string +>x : string | number | boolean +} +function foo12(x: number | string | boolean) { +>foo12 : (x: string | number | boolean) => number +>x : string | number | boolean + + // Mixing typeguards + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + var b: number | boolean | string; +>b : string | number | boolean + + return typeof x === "string" +>typeof x === "string" ? (x = 10 && x.toString().length) // number | boolean | string - changed here : ((b = x) // x is number | boolean | string - changed in true branch && typeof x === "number" && x) : number +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + ? (x = 10 && x.toString().length) // number | boolean | string - changed here +>(x = 10 && x.toString().length) : number +>x = 10 && x.toString().length : number +>x : string | number | boolean +>10 && x.toString().length : number +>x.toString().length : number +>x.toString() : string +>x.toString : () => string +>x : string | number | boolean +>toString : () => string +>length : number + + : ((b = x) // x is number | boolean | string - changed in true branch +>((b = x) // x is number | boolean | string - changed in true branch && typeof x === "number" && x) : number +>(b = x) // x is number | boolean | string - changed in true branch && typeof x === "number" && x : number +>(b = x) // x is number | boolean | string - changed in true branch && typeof x === "number" : boolean +>(b = x) : string | number | boolean +>b = x : string | number | boolean +>b : string | number | boolean +>x : string | number | boolean + + && typeof x === "number" +>typeof x === "number" : boolean +>typeof x : string +>x : string | number | boolean + + && x); // x is number +>x : number +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInConditionalExpression.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInConditionalExpression.ts new file mode 100644 index 00000000000..1633c80ab67 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInConditionalExpression.ts @@ -0,0 +1,97 @@ +// In the true expression of a conditional expression, +// the type of a variable or parameter is narrowed by any type guard in the condition when true, +// provided the true expression contains no assignments to the variable or parameter. +// In the false expression of a conditional expression, +// the type of a variable or parameter is narrowed by any type guard in the condition when false, +// provided the false expression contains no assignments to the variable or parameter. + +function foo(x: number | string) { + return typeof x === "string" + ? x.length // string + : x++; // number +} +function foo2(x: number | string) { + // x is assigned in the if true branch, the type is not narrowed + return typeof x === "string" + ? (x = 10 && x)// string | number + : x; // string | number +} +function foo3(x: number | string) { + // x is assigned in the if false branch, the type is not narrowed + // even though assigned using same type as narrowed expression + return typeof x === "string" + ? (x = "Hello" && x) // string | number + : x; // string | number +} +function foo4(x: number | string) { + // false branch updates the variable - so here it is not number + // even though assigned using same type as narrowed expression + return typeof x === "string" + ? x // string | number + : (x = 10 && x); // string | number +} +function foo5(x: number | string) { + // false branch updates the variable - so here it is not number + return typeof x === "string" + ? x // string | number + : (x = "hello" && x); // string | number +} +function foo6(x: number | string) { + // Modify in both branches + return typeof x === "string" + ? (x = 10 && x) // string | number + : (x = "hello" && x); // string | number +} +function foo7(x: number | string | boolean) { + return typeof x === "string" + ? x === "hello" // string + : typeof x === "boolean" + ? x // boolean + : x == 10; // number +} +function foo8(x: number | string | boolean) { + var b: number | boolean; + return typeof x === "string" + ? x === "hello" + : ((b = x) && // number | boolean + (typeof x === "boolean" + ? x // boolean + : x == 10)); // number +} +function foo9(x: number | string) { + var y = 10; + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + return typeof x === "string" + ? ((y = x.length) && x === "hello") // string + : x === 10; // number +} +function foo10(x: number | string | boolean) { + // Mixing typeguards + var b: boolean | number; + return typeof x === "string" + ? x // string + : ((b = x) // x is number | boolean + && typeof x === "number" + && x.toString()); // x is number +} +function foo11(x: number | string | boolean) { + // Mixing typeguards + // Assigning value to x deep inside another guard stops narrowing of type too + var b: number | boolean | string; + return typeof x === "string" + ? x // number | boolean | string - changed in the false branch + : ((b = x) // x is number | boolean | string - because the assignment changed it + && typeof x === "number" + && (x = 10) // assignment to x + && x); // x is number | boolean | string +} +function foo12(x: number | string | boolean) { + // Mixing typeguards + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + var b: number | boolean | string; + return typeof x === "string" + ? (x = 10 && x.toString().length) // number | boolean | string - changed here + : ((b = x) // x is number | boolean | string - changed in true branch + && typeof x === "number" + && x); // x is number +} \ No newline at end of file From 11912e8fde36b5581864e280ad7176b8f86d9bbc Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 5 Nov 2014 15:55:30 -0800 Subject: [PATCH 044/154] =?UTF-8?q?TypeGuards=20in=20right=20operand=20of?= =?UTF-8?q?=20&&=20operation=20=E2=80=A2=09In=20the=20right=20operand=20of?= =?UTF-8?q?=20a=20&&=20operation,=20the=20type=20of=20a=20variable=20or=20?= =?UTF-8?q?parameter=20is=20narrowed=20by=20any=20type=20guard=20in=20the?= =?UTF-8?q?=20left=20operand=20when=20true,=20provided=20the=20right=20ope?= =?UTF-8?q?rand=20contains=20no=20assignments=20to=20the=20variable=20or?= =?UTF-8?q?=20parameter.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ypeGuardsInRightOperandOfAndAndOperator.js | 96 ++++++++ ...GuardsInRightOperandOfAndAndOperator.types | 215 ++++++++++++++++++ ...ypeGuardsInRightOperandOfAndAndOperator.ts | 55 +++++ 3 files changed, 366 insertions(+) create mode 100644 tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.js create mode 100644 tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfAndAndOperator.ts diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.js b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.js new file mode 100644 index 00000000000..501c5d8a9f9 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.js @@ -0,0 +1,96 @@ +//// [typeGuardsInRightOperandOfAndAndOperator.ts] +// In the right operand of a && operation, +// the type of a variable or parameter is narrowed by any type guard in the left operand when true, +// provided the right operand contains no assignments to the variable or parameter. +function foo(x: number | string) { + return typeof x === "string" && x.length === 10; // string +} +function foo2(x: number | string) { + // modify x in right hand operand + return typeof x === "string" && ((x = 10) && x); // string | number +} +function foo3(x: number | string) { + // modify x in right hand operand with string type itself + return typeof x === "string" && ((x = "hello") && x); // string | number +} +function foo4(x: number | string | boolean) { + return typeof x !== "string" // string | number | boolean + && typeof x !== "number" // number | boolean + && x; // boolean +} +function foo5(x: number | string | boolean) { + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + var b: number | boolean; + return typeof x !== "string" // string | number | boolean + && ((b = x) && (typeof x !== "number" // number | boolean + && x)); // boolean +} +function foo6(x: number | string | boolean) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + return typeof x !== "string" // string | number | boolean + && (typeof x !== "number" // number | boolean + ? x // boolean + : x === 10) // number +} +function foo7(x: number | string | boolean) { + var y: number| boolean | string; + var z: number| boolean | string; + // Mixing typeguard narrowing + // Assigning value to x deep inside another guard stops narrowing of type too + return typeof x !== "string" + && ((z = x) // string | number | boolean - x changed deeper in conditional expression + && (typeof x === "number" + // change value of x + ? (x = 10 && x.toString()) // number | boolean | string + // do not change value + : (y = x && x.toString()))); // number | boolean | string +} +function foo8(x: number | string) { + // Mixing typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + return typeof x !== "string" + && (x = 10) // change x - number| string + && (typeof x === "number" + ? x // number + : x.length); // string +} + +//// [typeGuardsInRightOperandOfAndAndOperator.js] +// In the right operand of a && operation, +// the type of a variable or parameter is narrowed by any type guard in the left operand when true, +// provided the right operand contains no assignments to the variable or parameter. +function foo(x) { + return typeof x === "string" && x.length === 10; // string +} +function foo2(x) { + // modify x in right hand operand + return typeof x === "string" && ((x = 10) && x); // string | number +} +function foo3(x) { + // modify x in right hand operand with string type itself + return typeof x === "string" && ((x = "hello") && x); // string | number +} +function foo4(x) { + return typeof x !== "string" && typeof x !== "number" && x; // boolean +} +function foo5(x) { + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + var b; + return typeof x !== "string" && ((b = x) && (typeof x !== "number" && x)); // boolean +} +function foo6(x) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + return typeof x !== "string" && (typeof x !== "number" ? x : x === 10); // number +} +function foo7(x) { + var y; + var z; + // Mixing typeguard narrowing + // Assigning value to x deep inside another guard stops narrowing of type too + return typeof x !== "string" && ((z = x) && (typeof x === "number" ? (x = 10 && x.toString()) : (y = x && x.toString()))); // number | boolean | string +} +function foo8(x) { + // Mixing typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + return typeof x !== "string" && (x = 10) && (typeof x === "number" ? x : x.length); // string +} diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types new file mode 100644 index 00000000000..884c1cc1f5e --- /dev/null +++ b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types @@ -0,0 +1,215 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfAndAndOperator.ts === +// In the right operand of a && operation, +// the type of a variable or parameter is narrowed by any type guard in the left operand when true, +// provided the right operand contains no assignments to the variable or parameter. +function foo(x: number | string) { +>foo : (x: string | number) => boolean +>x : string | number + + return typeof x === "string" && x.length === 10; // string +>typeof x === "string" && x.length === 10 : boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number +>x.length === 10 : boolean +>x.length : number +>x : string +>length : number +} +function foo2(x: number | string) { +>foo2 : (x: string | number) => string | number +>x : string | number + + // modify x in right hand operand + return typeof x === "string" && ((x = 10) && x); // string | number +>typeof x === "string" && ((x = 10) && x) : string | number +>typeof x === "string" : boolean +>typeof x : string +>x : string | number +>((x = 10) && x) : string | number +>(x = 10) && x : string | number +>(x = 10) : number +>x = 10 : number +>x : string | number +>x : string | number +} +function foo3(x: number | string) { +>foo3 : (x: string | number) => string | number +>x : string | number + + // modify x in right hand operand with string type itself + return typeof x === "string" && ((x = "hello") && x); // string | number +>typeof x === "string" && ((x = "hello") && x) : string | number +>typeof x === "string" : boolean +>typeof x : string +>x : string | number +>((x = "hello") && x) : string | number +>(x = "hello") && x : string | number +>(x = "hello") : string +>x = "hello" : string +>x : string | number +>x : string | number +} +function foo4(x: number | string | boolean) { +>foo4 : (x: string | number | boolean) => boolean +>x : string | number | boolean + + return typeof x !== "string" // string | number | boolean +>typeof x !== "string" // string | number | boolean && typeof x !== "number" // number | boolean && x : boolean +>typeof x !== "string" // string | number | boolean && typeof x !== "number" : boolean +>typeof x !== "string" : boolean +>typeof x : string +>x : string | number | boolean + + && typeof x !== "number" // number | boolean +>typeof x !== "number" : boolean +>typeof x : string +>x : number | boolean + + && x; // boolean +>x : boolean +} +function foo5(x: number | string | boolean) { +>foo5 : (x: string | number | boolean) => boolean +>x : string | number | boolean + + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + var b: number | boolean; +>b : number | boolean + + return typeof x !== "string" // string | number | boolean +>typeof x !== "string" // string | number | boolean && ((b = x) && (typeof x !== "number" // number | boolean && x)) : boolean +>typeof x !== "string" : boolean +>typeof x : string +>x : string | number | boolean + + && ((b = x) && (typeof x !== "number" // number | boolean +>((b = x) && (typeof x !== "number" // number | boolean && x)) : boolean +>(b = x) && (typeof x !== "number" // number | boolean && x) : boolean +>(b = x) : number | boolean +>b = x : number | boolean +>b : number | boolean +>x : number | boolean +>(typeof x !== "number" // number | boolean && x) : boolean +>typeof x !== "number" // number | boolean && x : boolean +>typeof x !== "number" : boolean +>typeof x : string +>x : number | boolean + + && x)); // boolean +>x : boolean +} +function foo6(x: number | string | boolean) { +>foo6 : (x: string | number | boolean) => boolean +>x : string | number | boolean + + // Mixing typeguard narrowing in if statement with conditional expression typeguard + return typeof x !== "string" // string | number | boolean +>typeof x !== "string" // string | number | boolean && (typeof x !== "number" // number | boolean ? x // boolean : x === 10) : boolean +>typeof x !== "string" : boolean +>typeof x : string +>x : string | number | boolean + + && (typeof x !== "number" // number | boolean +>(typeof x !== "number" // number | boolean ? x // boolean : x === 10) : boolean +>typeof x !== "number" // number | boolean ? x // boolean : x === 10 : boolean +>typeof x !== "number" : boolean +>typeof x : string +>x : number | boolean + + ? x // boolean +>x : boolean + + : x === 10) // number +>x === 10 : boolean +>x : number +} +function foo7(x: number | string | boolean) { +>foo7 : (x: string | number | boolean) => string +>x : string | number | boolean + + var y: number| boolean | string; +>y : string | number | boolean + + var z: number| boolean | string; +>z : string | number | boolean + + // Mixing typeguard narrowing + // Assigning value to x deep inside another guard stops narrowing of type too + return typeof x !== "string" +>typeof x !== "string" && ((z = x) // string | number | boolean - x changed deeper in conditional expression && (typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString()))) : string +>typeof x !== "string" : boolean +>typeof x : string +>x : string | number | boolean + + && ((z = x) // string | number | boolean - x changed deeper in conditional expression +>((z = x) // string | number | boolean - x changed deeper in conditional expression && (typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString()))) : string +>(z = x) // string | number | boolean - x changed deeper in conditional expression && (typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString())) : string +>(z = x) : string | number | boolean +>z = x : string | number | boolean +>z : string | number | boolean +>x : string | number | boolean + + && (typeof x === "number" +>(typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString())) : string +>typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString()) : string +>typeof x === "number" : boolean +>typeof x : string +>x : string | number | boolean + + // change value of x + ? (x = 10 && x.toString()) // number | boolean | string +>(x = 10 && x.toString()) : string +>x = 10 && x.toString() : string +>x : string | number | boolean +>10 && x.toString() : string +>x.toString() : string +>x.toString : () => string +>x : string | number | boolean +>toString : () => string + + // do not change value + : (y = x && x.toString()))); // number | boolean | string +>(y = x && x.toString()) : string +>y = x && x.toString() : string +>y : string | number | boolean +>x && x.toString() : string +>x : string | number | boolean +>x.toString() : string +>x.toString : () => string +>x : string | number | boolean +>toString : () => string +} +function foo8(x: number | string) { +>foo8 : (x: string | number) => number +>x : string | number + + // Mixing typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + return typeof x !== "string" +>typeof x !== "string" && (x = 10) // change x - number| string && (typeof x === "number" ? x // number : x.length) : number +>typeof x !== "string" && (x = 10) : number +>typeof x !== "string" : boolean +>typeof x : string +>x : string | number + + && (x = 10) // change x - number| string +>(x = 10) : number +>x = 10 : number +>x : string | number + + && (typeof x === "number" +>(typeof x === "number" ? x // number : x.length) : number +>typeof x === "number" ? x // number : x.length : number +>typeof x === "number" : boolean +>typeof x : string +>x : string | number + + ? x // number +>x : number + + : x.length); // string +>x.length : number +>x : string +>length : number +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfAndAndOperator.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfAndAndOperator.ts new file mode 100644 index 00000000000..da0d8ce24b5 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfAndAndOperator.ts @@ -0,0 +1,55 @@ +// In the right operand of a && operation, +// the type of a variable or parameter is narrowed by any type guard in the left operand when true, +// provided the right operand contains no assignments to the variable or parameter. +function foo(x: number | string) { + return typeof x === "string" && x.length === 10; // string +} +function foo2(x: number | string) { + // modify x in right hand operand + return typeof x === "string" && ((x = 10) && x); // string | number +} +function foo3(x: number | string) { + // modify x in right hand operand with string type itself + return typeof x === "string" && ((x = "hello") && x); // string | number +} +function foo4(x: number | string | boolean) { + return typeof x !== "string" // string | number | boolean + && typeof x !== "number" // number | boolean + && x; // boolean +} +function foo5(x: number | string | boolean) { + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + var b: number | boolean; + return typeof x !== "string" // string | number | boolean + && ((b = x) && (typeof x !== "number" // number | boolean + && x)); // boolean +} +function foo6(x: number | string | boolean) { + // Mixing typeguard narrowing in if statement with conditional expression typeguard + return typeof x !== "string" // string | number | boolean + && (typeof x !== "number" // number | boolean + ? x // boolean + : x === 10) // number +} +function foo7(x: number | string | boolean) { + var y: number| boolean | string; + var z: number| boolean | string; + // Mixing typeguard narrowing + // Assigning value to x deep inside another guard stops narrowing of type too + return typeof x !== "string" + && ((z = x) // string | number | boolean - x changed deeper in conditional expression + && (typeof x === "number" + // change value of x + ? (x = 10 && x.toString()) // number | boolean | string + // do not change value + : (y = x && x.toString()))); // number | boolean | string +} +function foo8(x: number | string) { + // Mixing typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + return typeof x !== "string" + && (x = 10) // change x - number| string + && (typeof x === "number" + ? x // number + : x.length); // string +} \ No newline at end of file From 33cdc2f876d706e3e4a6826283af7fac05e3644c Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 5 Nov 2014 16:04:06 -0800 Subject: [PATCH 045/154] =?UTF-8?q?Type=20guards=20in=20||=20operator=20?= =?UTF-8?q?=E2=80=A2=09In=20the=20right=20operand=20of=20a=20||=20operatio?= =?UTF-8?q?n,=20the=20type=20of=20a=20variable=20or=20parameter=20is=20nar?= =?UTF-8?q?rowed=20by=20any=20type=20guard=20in=20the=20left=20operand=20w?= =?UTF-8?q?hen=20false,=20provided=20the=20right=20operand=20contains=20no?= =?UTF-8?q?=20assignments=20to=20the=20variable=20or=20parameter.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../typeGuardsInRightOperandOfOrOrOperator.js | 96 ++++++++ ...peGuardsInRightOperandOfOrOrOperator.types | 215 ++++++++++++++++++ .../typeGuardsInRightOperandOfOrOrOperator.ts | 55 +++++ 3 files changed, 366 insertions(+) create mode 100644 tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.js create mode 100644 tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfOrOrOperator.ts diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.js b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.js new file mode 100644 index 00000000000..d2b7938a9ca --- /dev/null +++ b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.js @@ -0,0 +1,96 @@ +//// [typeGuardsInRightOperandOfOrOrOperator.ts] +// In the right operand of a || operation, +// the type of a variable or parameter is narrowed by any type guard in the left operand when false, +// provided the right operand contains no assignments to the variable or parameter. +function foo(x: number | string) { + return typeof x !== "string" || x.length === 10; // string +} +function foo2(x: number | string) { + // modify x in right hand operand + return typeof x !== "string" || ((x = 10) || x); // string | number +} +function foo3(x: number | string) { + // modify x in right hand operand with string type itself + return typeof x !== "string" || ((x = "hello") || x); // string | number +} +function foo4(x: number | string | boolean) { + return typeof x === "string" // string | number | boolean + || typeof x === "number" // number | boolean + || x; // boolean +} +function foo5(x: number | string | boolean) { + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + var b: number | boolean; + return typeof x === "string" // string | number | boolean + || ((b = x) || (typeof x === "number" // number | boolean + || x)); // boolean +} +function foo6(x: number | string | boolean) { + // Mixing typeguard + return typeof x === "string" // string | number | boolean + || (typeof x !== "number" // number | boolean + ? x // boolean + : x === 10) // number +} +function foo7(x: number | string | boolean) { + var y: number| boolean | string; + var z: number| boolean | string; + // Mixing typeguard narrowing + // Assigning value to x deep inside another guard stops narrowing of type too + return typeof x === "string" + || ((z = x) // string | number | boolean - x changed deeper in conditional expression + || (typeof x === "number" + // change value of x + ? (x = 10 && x.toString()) // number | boolean | string + // do not change value + : (y = x && x.toString()))); // number | boolean | string +} +function foo8(x: number | string) { + // Mixing typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + return typeof x === "string" + || (x = 10) // change x - number| string + || (typeof x === "number" + ? x // number + : x.length); // string +} + +//// [typeGuardsInRightOperandOfOrOrOperator.js] +// In the right operand of a || operation, +// the type of a variable or parameter is narrowed by any type guard in the left operand when false, +// provided the right operand contains no assignments to the variable or parameter. +function foo(x) { + return typeof x !== "string" || x.length === 10; // string +} +function foo2(x) { + // modify x in right hand operand + return typeof x !== "string" || ((x = 10) || x); // string | number +} +function foo3(x) { + // modify x in right hand operand with string type itself + return typeof x !== "string" || ((x = "hello") || x); // string | number +} +function foo4(x) { + return typeof x === "string" || typeof x === "number" || x; // boolean +} +function foo5(x) { + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + var b; + return typeof x === "string" || ((b = x) || (typeof x === "number" || x)); // boolean +} +function foo6(x) { + // Mixing typeguard + return typeof x === "string" || (typeof x !== "number" ? x : x === 10); // number +} +function foo7(x) { + var y; + var z; + // Mixing typeguard narrowing + // Assigning value to x deep inside another guard stops narrowing of type too + return typeof x === "string" || ((z = x) || (typeof x === "number" ? (x = 10 && x.toString()) : (y = x && x.toString()))); // number | boolean | string +} +function foo8(x) { + // Mixing typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + return typeof x === "string" || (x = 10) || (typeof x === "number" ? x : x.length); // string +} diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types new file mode 100644 index 00000000000..8940d50c2d4 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types @@ -0,0 +1,215 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfOrOrOperator.ts === +// In the right operand of a || operation, +// the type of a variable or parameter is narrowed by any type guard in the left operand when false, +// provided the right operand contains no assignments to the variable or parameter. +function foo(x: number | string) { +>foo : (x: string | number) => boolean +>x : string | number + + return typeof x !== "string" || x.length === 10; // string +>typeof x !== "string" || x.length === 10 : boolean +>typeof x !== "string" : boolean +>typeof x : string +>x : string | number +>x.length === 10 : boolean +>x.length : number +>x : string +>length : number +} +function foo2(x: number | string) { +>foo2 : (x: string | number) => string | number | boolean +>x : string | number + + // modify x in right hand operand + return typeof x !== "string" || ((x = 10) || x); // string | number +>typeof x !== "string" || ((x = 10) || x) : string | number | boolean +>typeof x !== "string" : boolean +>typeof x : string +>x : string | number +>((x = 10) || x) : string | number +>(x = 10) || x : string | number +>(x = 10) : number +>x = 10 : number +>x : string | number +>x : string | number +} +function foo3(x: number | string) { +>foo3 : (x: string | number) => string | number | boolean +>x : string | number + + // modify x in right hand operand with string type itself + return typeof x !== "string" || ((x = "hello") || x); // string | number +>typeof x !== "string" || ((x = "hello") || x) : string | number | boolean +>typeof x !== "string" : boolean +>typeof x : string +>x : string | number +>((x = "hello") || x) : string | number +>(x = "hello") || x : string | number +>(x = "hello") : string +>x = "hello" : string +>x : string | number +>x : string | number +} +function foo4(x: number | string | boolean) { +>foo4 : (x: string | number | boolean) => boolean +>x : string | number | boolean + + return typeof x === "string" // string | number | boolean +>typeof x === "string" // string | number | boolean || typeof x === "number" // number | boolean || x : boolean +>typeof x === "string" // string | number | boolean || typeof x === "number" : boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + || typeof x === "number" // number | boolean +>typeof x === "number" : boolean +>typeof x : string +>x : number | boolean + + || x; // boolean +>x : boolean +} +function foo5(x: number | string | boolean) { +>foo5 : (x: string | number | boolean) => number | boolean +>x : string | number | boolean + + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + var b: number | boolean; +>b : number | boolean + + return typeof x === "string" // string | number | boolean +>typeof x === "string" // string | number | boolean || ((b = x) || (typeof x === "number" // number | boolean || x)) : number | boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + || ((b = x) || (typeof x === "number" // number | boolean +>((b = x) || (typeof x === "number" // number | boolean || x)) : number | boolean +>(b = x) || (typeof x === "number" // number | boolean || x) : number | boolean +>(b = x) : number | boolean +>b = x : number | boolean +>b : number | boolean +>x : number | boolean +>(typeof x === "number" // number | boolean || x) : boolean +>typeof x === "number" // number | boolean || x : boolean +>typeof x === "number" : boolean +>typeof x : string +>x : number | boolean + + || x)); // boolean +>x : boolean +} +function foo6(x: number | string | boolean) { +>foo6 : (x: string | number | boolean) => boolean +>x : string | number | boolean + + // Mixing typeguard + return typeof x === "string" // string | number | boolean +>typeof x === "string" // string | number | boolean || (typeof x !== "number" // number | boolean ? x // boolean : x === 10) : boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + || (typeof x !== "number" // number | boolean +>(typeof x !== "number" // number | boolean ? x // boolean : x === 10) : boolean +>typeof x !== "number" // number | boolean ? x // boolean : x === 10 : boolean +>typeof x !== "number" : boolean +>typeof x : string +>x : number | boolean + + ? x // boolean +>x : boolean + + : x === 10) // number +>x === 10 : boolean +>x : number +} +function foo7(x: number | string | boolean) { +>foo7 : (x: string | number | boolean) => string | number | boolean +>x : string | number | boolean + + var y: number| boolean | string; +>y : string | number | boolean + + var z: number| boolean | string; +>z : string | number | boolean + + // Mixing typeguard narrowing + // Assigning value to x deep inside another guard stops narrowing of type too + return typeof x === "string" +>typeof x === "string" || ((z = x) // string | number | boolean - x changed deeper in conditional expression || (typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString()))) : string | number | boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number | boolean + + || ((z = x) // string | number | boolean - x changed deeper in conditional expression +>((z = x) // string | number | boolean - x changed deeper in conditional expression || (typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString()))) : string | number | boolean +>(z = x) // string | number | boolean - x changed deeper in conditional expression || (typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString())) : string | number | boolean +>(z = x) : string | number | boolean +>z = x : string | number | boolean +>z : string | number | boolean +>x : string | number | boolean + + || (typeof x === "number" +>(typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString())) : string +>typeof x === "number" // change value of x ? (x = 10 && x.toString()) // number | boolean | string // do not change value : (y = x && x.toString()) : string +>typeof x === "number" : boolean +>typeof x : string +>x : string | number | boolean + + // change value of x + ? (x = 10 && x.toString()) // number | boolean | string +>(x = 10 && x.toString()) : string +>x = 10 && x.toString() : string +>x : string | number | boolean +>10 && x.toString() : string +>x.toString() : string +>x.toString : () => string +>x : string | number | boolean +>toString : () => string + + // do not change value + : (y = x && x.toString()))); // number | boolean | string +>(y = x && x.toString()) : string +>y = x && x.toString() : string +>y : string | number | boolean +>x && x.toString() : string +>x : string | number | boolean +>x.toString() : string +>x.toString : () => string +>x : string | number | boolean +>toString : () => string +} +function foo8(x: number | string) { +>foo8 : (x: string | number) => number | boolean +>x : string | number + + // Mixing typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + return typeof x === "string" +>typeof x === "string" || (x = 10) // change x - number| string || (typeof x === "number" ? x // number : x.length) : number | boolean +>typeof x === "string" || (x = 10) : number | boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number + + || (x = 10) // change x - number| string +>(x = 10) : number +>x = 10 : number +>x : string | number + + || (typeof x === "number" +>(typeof x === "number" ? x // number : x.length) : number +>typeof x === "number" ? x // number : x.length : number +>typeof x === "number" : boolean +>typeof x : string +>x : string | number + + ? x // number +>x : number + + : x.length); // string +>x.length : number +>x : string +>length : number +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfOrOrOperator.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfOrOrOperator.ts new file mode 100644 index 00000000000..867dc143a85 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfOrOrOperator.ts @@ -0,0 +1,55 @@ +// In the right operand of a || operation, +// the type of a variable or parameter is narrowed by any type guard in the left operand when false, +// provided the right operand contains no assignments to the variable or parameter. +function foo(x: number | string) { + return typeof x !== "string" || x.length === 10; // string +} +function foo2(x: number | string) { + // modify x in right hand operand + return typeof x !== "string" || ((x = 10) || x); // string | number +} +function foo3(x: number | string) { + // modify x in right hand operand with string type itself + return typeof x !== "string" || ((x = "hello") || x); // string | number +} +function foo4(x: number | string | boolean) { + return typeof x === "string" // string | number | boolean + || typeof x === "number" // number | boolean + || x; // boolean +} +function foo5(x: number | string | boolean) { + // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop + var b: number | boolean; + return typeof x === "string" // string | number | boolean + || ((b = x) || (typeof x === "number" // number | boolean + || x)); // boolean +} +function foo6(x: number | string | boolean) { + // Mixing typeguard + return typeof x === "string" // string | number | boolean + || (typeof x !== "number" // number | boolean + ? x // boolean + : x === 10) // number +} +function foo7(x: number | string | boolean) { + var y: number| boolean | string; + var z: number| boolean | string; + // Mixing typeguard narrowing + // Assigning value to x deep inside another guard stops narrowing of type too + return typeof x === "string" + || ((z = x) // string | number | boolean - x changed deeper in conditional expression + || (typeof x === "number" + // change value of x + ? (x = 10 && x.toString()) // number | boolean | string + // do not change value + : (y = x && x.toString()))); // number | boolean | string +} +function foo8(x: number | string) { + // Mixing typeguard + // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression + return typeof x === "string" + || (x = 10) // change x - number| string + || (typeof x === "number" + ? x // number + : x.length); // string +} \ No newline at end of file From 2fecc132ab17ff84435a9f9089c95c4b6c1d966e Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 5 Nov 2014 17:16:44 -0800 Subject: [PATCH 046/154] Tests for typeguards allowed on variables and parameters only From spec: Note that type guards affect types of variables and parameters only and have no effect on members of objects such as properties --- .../reference/typeGuardsInClassAccessors.js | 209 +++++++++++ .../typeGuardsInClassAccessors.types | 332 ++++++++++++++++++ .../reference/typeGuardsInClassMethods.js | 128 +++++++ .../reference/typeGuardsInClassMethods.types | 234 ++++++++++++ .../reference/typeGuardsInExternalModule.js | 47 +++ .../typeGuardsInExternalModule.types | 54 +++ .../reference/typeGuardsInFunction.js | 165 +++++++++ .../reference/typeGuardsInFunction.types | 319 +++++++++++++++++ .../baselines/reference/typeGuardsInGlobal.js | 27 ++ .../reference/typeGuardsInGlobal.types | 30 ++ .../baselines/reference/typeGuardsInModule.js | 174 +++++++++ .../reference/typeGuardsInModule.types | 228 ++++++++++++ .../reference/typeGuardsInProperties.js | 56 +++ .../reference/typeGuardsInProperties.types | 120 +++++++ .../reference/typeGuardsObjectMethods.js | 93 +++++ .../reference/typeGuardsObjectMethods.types | 178 ++++++++++ .../typeGuards/typeGuardsInClassAccessors.ts | 103 ++++++ .../typeGuards/typeGuardsInClassMethods.ts | 67 ++++ .../typeGuards/typeGuardsInExternalModule.ts | 24 ++ .../typeGuards/typeGuardsInFunction.ts | 87 +++++ .../typeGuards/typeGuardsInGlobal.ts | 12 + .../typeGuards/typeGuardsInModule.ts | 86 +++++ .../typeGuards/typeGuardsInProperties.ts | 27 ++ .../typeGuards/typeGuardsObjectMethods.ts | 51 +++ 24 files changed, 2851 insertions(+) create mode 100644 tests/baselines/reference/typeGuardsInClassAccessors.js create mode 100644 tests/baselines/reference/typeGuardsInClassAccessors.types create mode 100644 tests/baselines/reference/typeGuardsInClassMethods.js create mode 100644 tests/baselines/reference/typeGuardsInClassMethods.types create mode 100644 tests/baselines/reference/typeGuardsInExternalModule.js create mode 100644 tests/baselines/reference/typeGuardsInExternalModule.types create mode 100644 tests/baselines/reference/typeGuardsInFunction.js create mode 100644 tests/baselines/reference/typeGuardsInFunction.types create mode 100644 tests/baselines/reference/typeGuardsInGlobal.js create mode 100644 tests/baselines/reference/typeGuardsInGlobal.types create mode 100644 tests/baselines/reference/typeGuardsInModule.js create mode 100644 tests/baselines/reference/typeGuardsInModule.types create mode 100644 tests/baselines/reference/typeGuardsInProperties.js create mode 100644 tests/baselines/reference/typeGuardsInProperties.types create mode 100644 tests/baselines/reference/typeGuardsObjectMethods.js create mode 100644 tests/baselines/reference/typeGuardsObjectMethods.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInClassAccessors.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInClassMethods.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInExternalModule.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInFunction.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInGlobal.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInModule.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsInProperties.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsObjectMethods.ts diff --git a/tests/baselines/reference/typeGuardsInClassAccessors.js b/tests/baselines/reference/typeGuardsInClassAccessors.js new file mode 100644 index 00000000000..8f487b72535 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInClassAccessors.js @@ -0,0 +1,209 @@ +//// [typeGuardsInClassAccessors.ts] + +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var strOrNum: string | number; +var var1: string | number; +class ClassWithAccessors { + // Inside public accessor getter + get p1() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + return strOrNum; + } + // Inside public accessor setter + set p1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // parameter of function declaration + num = typeof param === "string" && param.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + } + // Inside private accessor getter + private get pp1() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + return strOrNum; + } + // Inside private accessor setter + private set pp1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // parameter of function declaration + num = typeof param === "string" && param.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + } + // Inside static accessor getter + static get s1() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + return strOrNum; + } + // Inside static accessor setter + static set s1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // parameter of function declaration + num = typeof param === "string" && param.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + } + // Inside private static accessor getter + private static get ss1() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + return strOrNum; + } + // Inside private static accessor setter + private static set ss1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // parameter of function declaration + num = typeof param === "string" && param.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + } +} + + +//// [typeGuardsInClassAccessors.js] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. +// variables in global +var num; +var strOrNum; +var var1; +var ClassWithAccessors = (function () { + function ClassWithAccessors() { + } + Object.defineProperty(ClassWithAccessors.prototype, "p1", { + // Inside public accessor getter + get: function () { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + return strOrNum; + }, + // Inside public accessor setter + set: function (param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // parameter of function declaration + num = typeof param === "string" && param.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClassWithAccessors.prototype, "pp1", { + // Inside private accessor getter + get: function () { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + return strOrNum; + }, + // Inside private accessor setter + set: function (param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // parameter of function declaration + num = typeof param === "string" && param.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClassWithAccessors, "s1", { + // Inside static accessor getter + get: function () { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + return strOrNum; + }, + // Inside static accessor setter + set: function (param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // parameter of function declaration + num = typeof param === "string" && param.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClassWithAccessors, "ss1", { + // Inside private static accessor getter + get: function () { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + return strOrNum; + }, + // Inside private static accessor setter + set: function (param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // parameter of function declaration + num = typeof param === "string" && param.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + }, + enumerable: true, + configurable: true + }); + return ClassWithAccessors; +})(); diff --git a/tests/baselines/reference/typeGuardsInClassAccessors.types b/tests/baselines/reference/typeGuardsInClassAccessors.types new file mode 100644 index 00000000000..48ea732f3d7 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInClassAccessors.types @@ -0,0 +1,332 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInClassAccessors.ts === + +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var var1: string | number; +>var1 : string | number + +class ClassWithAccessors { +>ClassWithAccessors : ClassWithAccessors + + // Inside public accessor getter + get p1() { +>p1 : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + return strOrNum; +>strOrNum : string | number + } + // Inside public accessor setter + set p1(param: string | number) { +>p1 : string | number +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // parameter of function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + } + // Inside private accessor getter + private get pp1() { +>pp1 : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + return strOrNum; +>strOrNum : string | number + } + // Inside private accessor setter + private set pp1(param: string | number) { +>pp1 : string | number +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // parameter of function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + } + // Inside static accessor getter + static get s1() { +>s1 : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + return strOrNum; +>strOrNum : string | number + } + // Inside static accessor setter + static set s1(param: string | number) { +>s1 : string | number +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // parameter of function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + } + // Inside private static accessor getter + private static get ss1() { +>ss1 : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + return strOrNum; +>strOrNum : string | number + } + // Inside private static accessor setter + private static set ss1(param: string | number) { +>ss1 : string | number +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // parameter of function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + } +} + diff --git a/tests/baselines/reference/typeGuardsInClassMethods.js b/tests/baselines/reference/typeGuardsInClassMethods.js new file mode 100644 index 00000000000..cbe6dfe161a --- /dev/null +++ b/tests/baselines/reference/typeGuardsInClassMethods.js @@ -0,0 +1,128 @@ +//// [typeGuardsInClassMethods.ts] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var var1: string | number; +class C1 { + constructor(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } + // Inside function declaration + private p1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } + // Inside function declaration + p2(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } + // Inside function declaration + private static s1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } + // Inside function declaration + static s2(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } +} + + +//// [typeGuardsInClassMethods.js] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. +// variables in global +var num; +var var1; +var C1 = (function () { + function C1(param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } + // Inside function declaration + C1.prototype.p1 = function (param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + // parameters in function declaration + num = typeof param === "string" && param.length; // string + }; + // Inside function declaration + C1.prototype.p2 = function (param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + // parameters in function declaration + num = typeof param === "string" && param.length; // string + }; + // Inside function declaration + C1.s1 = function (param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + // parameters in function declaration + num = typeof param === "string" && param.length; // string + }; + // Inside function declaration + C1.s2 = function (param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + // parameters in function declaration + num = typeof param === "string" && param.length; // string + }; + return C1; +})(); diff --git a/tests/baselines/reference/typeGuardsInClassMethods.types b/tests/baselines/reference/typeGuardsInClassMethods.types new file mode 100644 index 00000000000..fa44347cd5c --- /dev/null +++ b/tests/baselines/reference/typeGuardsInClassMethods.types @@ -0,0 +1,234 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInClassMethods.ts === +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +>num : number + +var var1: string | number; +>var1 : string | number + +class C1 { +>C1 : C1 + + constructor(param: string | number) { +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + } + // Inside function declaration + private p1(param: string | number) { +>p1 : (param: string | number) => void +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + } + // Inside function declaration + p2(param: string | number) { +>p2 : (param: string | number) => void +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + } + // Inside function declaration + private static s1(param: string | number) { +>s1 : (param: string | number) => void +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + } + // Inside function declaration + static s2(param: string | number) { +>s2 : (param: string | number) => void +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + } +} + diff --git a/tests/baselines/reference/typeGuardsInExternalModule.js b/tests/baselines/reference/typeGuardsInExternalModule.js new file mode 100644 index 00000000000..29950ece95a --- /dev/null +++ b/tests/baselines/reference/typeGuardsInExternalModule.js @@ -0,0 +1,47 @@ +//// [typeGuardsInExternalModule.ts] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// local variable in external module +var num: number; +var var1: string | number; +if (typeof var1 === "string") { + num = var1.length; // string +} +else { + num = var1; // number +} + +// exported variable in external module +var strOrNum: string | number; +export var var2: string | number; +if (typeof var2 === "string") { + // export makes the var property and not variable + strOrNum = var2; // string | number +} +else { + strOrNum = var2; // number | string +} + +//// [typeGuardsInExternalModule.js] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. +// local variable in external module +var num; +var var1; +if (typeof var1 === "string") { + num = var1.length; // string +} +else { + num = var1; // number +} +// exported variable in external module +var strOrNum; +exports.var2; +if (typeof exports.var2 === "string") { + // export makes the var property and not variable + strOrNum = exports.var2; // string | number +} +else { + strOrNum = exports.var2; // number | string +} diff --git a/tests/baselines/reference/typeGuardsInExternalModule.types b/tests/baselines/reference/typeGuardsInExternalModule.types new file mode 100644 index 00000000000..09038ef1c1a --- /dev/null +++ b/tests/baselines/reference/typeGuardsInExternalModule.types @@ -0,0 +1,54 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInExternalModule.ts === +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// local variable in external module +var num: number; +>num : number + +var var1: string | number; +>var1 : string | number + +if (typeof var1 === "string") { +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number + + num = var1.length; // string +>num = var1.length : number +>num : number +>var1.length : number +>var1 : string +>length : number +} +else { + num = var1; // number +>num = var1 : number +>num : number +>var1 : number +} + +// exported variable in external module +var strOrNum: string | number; +>strOrNum : string | number + +export var var2: string | number; +>var2 : string | number + +if (typeof var2 === "string") { +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number + + // export makes the var property and not variable + strOrNum = var2; // string | number +>strOrNum = var2 : string | number +>strOrNum : string | number +>var2 : string | number +} +else { + strOrNum = var2; // number | string +>strOrNum = var2 : string | number +>strOrNum : string | number +>var2 : string | number +} diff --git a/tests/baselines/reference/typeGuardsInFunction.js b/tests/baselines/reference/typeGuardsInFunction.js new file mode 100644 index 00000000000..53bfb5fa6bb --- /dev/null +++ b/tests/baselines/reference/typeGuardsInFunction.js @@ -0,0 +1,165 @@ +//// [typeGuardsInFunction.ts] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var var1: string | number; +// Inside function declaration +function f(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string +} +// local function declaration +function f1(param: string | number) { + var var2: string | number; + function f2(param1: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string + + // parameters in outer declaration + num = typeof param === "string" && param.length; // string + + // local + var var3: string | number; + num = typeof var3 === "string" && var3.length; // string + num = typeof param1 === "string" && param1.length; // string + } +} +// Function expression +function f2(param: string | number) { + // variables in function declaration + var var2: string | number; + // variables in function expressions + var r = function (param1: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string + + // parameters in outer declaration + num = typeof param === "string" && param.length; // string + + // local + var var3: string | number; + num = typeof var3 === "string" && var3.length; // string + num = typeof param1 === "string" && param1.length; // string + } (param); +} +// Arrow expression +function f3(param: string | number) { + // variables in function declaration + var var2: string | number; + // variables in function expressions + var r = ((param1: string | number) => { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string + + // parameters in outer declaration + num = typeof param === "string" && param.length; // string + + // local + var var3: string | number; + num = typeof var3 === "string" && var3.length; // string + num = typeof param1 === "string" && param1.length; // string + })(param); +} +// Return type of function +// Inside function declaration +var strOrNum: string | number; +function f4() { + var var2: string | number = strOrNum; + return var2; +} +strOrNum = typeof f4() === "string" && f4(); // string | number + +//// [typeGuardsInFunction.js] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. +// variables in global +var num; +var var1; +// Inside function declaration +function f(param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + // parameters in function declaration + num = typeof param === "string" && param.length; // string +} +// local function declaration +function f1(param) { + var var2; + function f2(param1) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string + // parameters in outer declaration + num = typeof param === "string" && param.length; // string + // local + var var3; + num = typeof var3 === "string" && var3.length; // string + num = typeof param1 === "string" && param1.length; // string + } +} +// Function expression +function f2(param) { + // variables in function declaration + var var2; + // variables in function expressions + var r = function (param1) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string + // parameters in outer declaration + num = typeof param === "string" && param.length; // string + // local + var var3; + num = typeof var3 === "string" && var3.length; // string + num = typeof param1 === "string" && param1.length; // string + }(param); +} +// Arrow expression +function f3(param) { + // variables in function declaration + var var2; + // variables in function expressions + var r = (function (param1) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string + // parameters in outer declaration + num = typeof param === "string" && param.length; // string + // local + var var3; + num = typeof var3 === "string" && var3.length; // string + num = typeof param1 === "string" && param1.length; // string + })(param); +} +// Return type of function +// Inside function declaration +var strOrNum; +function f4() { + var var2 = strOrNum; + return var2; +} +strOrNum = typeof f4() === "string" && f4(); // string | number diff --git a/tests/baselines/reference/typeGuardsInFunction.types b/tests/baselines/reference/typeGuardsInFunction.types new file mode 100644 index 00000000000..a7b25f486aa --- /dev/null +++ b/tests/baselines/reference/typeGuardsInFunction.types @@ -0,0 +1,319 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInFunction.ts === +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +>num : number + +var var1: string | number; +>var1 : string | number + +// Inside function declaration +function f(param: string | number) { +>f : (param: string | number) => void +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number +} +// local function declaration +function f1(param: string | number) { +>f1 : (param: string | number) => void +>param : string | number + + var var2: string | number; +>var2 : string | number + + function f2(param1: string | number) { +>f2 : (param1: string | number) => void +>param1 : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in outer declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + + // local + var var3: string | number; +>var3 : string | number + + num = typeof var3 === "string" && var3.length; // string +>num = typeof var3 === "string" && var3.length : number +>num : number +>typeof var3 === "string" && var3.length : number +>typeof var3 === "string" : boolean +>typeof var3 : string +>var3 : string | number +>var3.length : number +>var3 : string +>length : number + + num = typeof param1 === "string" && param1.length; // string +>num = typeof param1 === "string" && param1.length : number +>num : number +>typeof param1 === "string" && param1.length : number +>typeof param1 === "string" : boolean +>typeof param1 : string +>param1 : string | number +>param1.length : number +>param1 : string +>length : number + } +} +// Function expression +function f2(param: string | number) { +>f2 : (param: string | number) => void +>param : string | number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + // variables in function expressions + var r = function (param1: string | number) { +>r : void +>function (param1: string | number) { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables from outer function declaration num = typeof var2 === "string" && var2.length; // string // parameters in outer declaration num = typeof param === "string" && param.length; // string // local var var3: string | number; num = typeof var3 === "string" && var3.length; // string num = typeof param1 === "string" && param1.length; // string } (param) : void +>function (param1: string | number) { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables from outer function declaration num = typeof var2 === "string" && var2.length; // string // parameters in outer declaration num = typeof param === "string" && param.length; // string // local var var3: string | number; num = typeof var3 === "string" && var3.length; // string num = typeof param1 === "string" && param1.length; // string } : (param1: string | number) => void +>param1 : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in outer declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + + // local + var var3: string | number; +>var3 : string | number + + num = typeof var3 === "string" && var3.length; // string +>num = typeof var3 === "string" && var3.length : number +>num : number +>typeof var3 === "string" && var3.length : number +>typeof var3 === "string" : boolean +>typeof var3 : string +>var3 : string | number +>var3.length : number +>var3 : string +>length : number + + num = typeof param1 === "string" && param1.length; // string +>num = typeof param1 === "string" && param1.length : number +>num : number +>typeof param1 === "string" && param1.length : number +>typeof param1 === "string" : boolean +>typeof param1 : string +>param1 : string | number +>param1.length : number +>param1 : string +>length : number + + } (param); +>param : string | number +} +// Arrow expression +function f3(param: string | number) { +>f3 : (param: string | number) => void +>param : string | number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + // variables in function expressions + var r = ((param1: string | number) => { +>r : void +>((param1: string | number) => { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables from outer function declaration num = typeof var2 === "string" && var2.length; // string // parameters in outer declaration num = typeof param === "string" && param.length; // string // local var var3: string | number; num = typeof var3 === "string" && var3.length; // string num = typeof param1 === "string" && param1.length; // string })(param) : void +>((param1: string | number) => { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables from outer function declaration num = typeof var2 === "string" && var2.length; // string // parameters in outer declaration num = typeof param === "string" && param.length; // string // local var var3: string | number; num = typeof var3 === "string" && var3.length; // string num = typeof param1 === "string" && param1.length; // string }) : (param1: string | number) => void +>(param1: string | number) => { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables from outer function declaration num = typeof var2 === "string" && var2.length; // string // parameters in outer declaration num = typeof param === "string" && param.length; // string // local var var3: string | number; num = typeof var3 === "string" && var3.length; // string num = typeof param1 === "string" && param1.length; // string } : (param1: string | number) => void +>param1 : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in outer declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + + // local + var var3: string | number; +>var3 : string | number + + num = typeof var3 === "string" && var3.length; // string +>num = typeof var3 === "string" && var3.length : number +>num : number +>typeof var3 === "string" && var3.length : number +>typeof var3 === "string" : boolean +>typeof var3 : string +>var3 : string | number +>var3.length : number +>var3 : string +>length : number + + num = typeof param1 === "string" && param1.length; // string +>num = typeof param1 === "string" && param1.length : number +>num : number +>typeof param1 === "string" && param1.length : number +>typeof param1 === "string" : boolean +>typeof param1 : string +>param1 : string | number +>param1.length : number +>param1 : string +>length : number + + })(param); +>param : string | number +} +// Return type of function +// Inside function declaration +var strOrNum: string | number; +>strOrNum : string | number + +function f4() { +>f4 : () => string | number + + var var2: string | number = strOrNum; +>var2 : string | number +>strOrNum : string | number + + return var2; +>var2 : string | number +} +strOrNum = typeof f4() === "string" && f4(); // string | number +>strOrNum = typeof f4() === "string" && f4() : string | number +>strOrNum : string | number +>typeof f4() === "string" && f4() : string | number +>typeof f4() === "string" : boolean +>typeof f4() : string +>f4() : string | number +>f4 : () => string | number +>f4() : string | number +>f4 : () => string | number + diff --git a/tests/baselines/reference/typeGuardsInGlobal.js b/tests/baselines/reference/typeGuardsInGlobal.js new file mode 100644 index 00000000000..6e1b1c3dd82 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInGlobal.js @@ -0,0 +1,27 @@ +//// [typeGuardsInGlobal.ts] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var var1: string | number; +if (typeof var1 === "string") { + num = var1.length; // string +} +else { + num = var1; // number +} + + +//// [typeGuardsInGlobal.js] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. +// variables in global +var num; +var var1; +if (typeof var1 === "string") { + num = var1.length; // string +} +else { + num = var1; // number +} diff --git a/tests/baselines/reference/typeGuardsInGlobal.types b/tests/baselines/reference/typeGuardsInGlobal.types new file mode 100644 index 00000000000..08b681dbb05 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInGlobal.types @@ -0,0 +1,30 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInGlobal.ts === +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +>num : number + +var var1: string | number; +>var1 : string | number + +if (typeof var1 === "string") { +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number + + num = var1.length; // string +>num = var1.length : number +>num : number +>var1.length : number +>var1 : string +>length : number +} +else { + num = var1; // number +>num = var1 : number +>num : number +>var1 : number +} + diff --git a/tests/baselines/reference/typeGuardsInModule.js b/tests/baselines/reference/typeGuardsInModule.js new file mode 100644 index 00000000000..c72b9e58aa2 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInModule.js @@ -0,0 +1,174 @@ +//// [typeGuardsInModule.ts] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var strOrNum: string | number; +var var1: string | number; +// Inside module +module m1 { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in module declaration + var var2: string | number; + if (typeof var2 === "string") { + num = var2.length; // string + } + else { + num = var2; // number + } + + // exported variable in the module + export var var3: string | number; + if (typeof var3 === "string") { + strOrNum = var3; // string | number + } + else { + strOrNum = var3; // string | number + } +} +// local module +module m2 { + var var2: string | number; + export var var3: string | number; + module m3 { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // local variables from outer module declaration + num = typeof var2 === "string" && var2.length; // string + + // exported variable from outer the module + strOrNum = typeof var3 === "string" && var3; // string | number + + // variables in module declaration + var var4: string | number; + if (typeof var4 === "string") { + num = var4.length; // string + } + else { + num = var4; // number + } + + // exported variable in the module + export var var5: string | number; + if (typeof var5 === "string") { + strOrNum = var5; // string | number + } + else { + strOrNum = var5; // string | number + } + } +} +// Dotted module +module m3.m4 { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in module declaration + var var2: string | number; + if (typeof var2 === "string") { + num = var2.length; // string + } + else { + num = var2; // number + } + + // exported variable in the module + export var var3: string | number; + if (typeof var3 === "string") { + strOrNum = var3; // string | number + } + else { + strOrNum = var3; // string | number + } +} + + +//// [typeGuardsInModule.js] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. +// variables in global +var num; +var strOrNum; +var var1; +// Inside module +var m1; +(function (m1) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in module declaration + var var2; + if (typeof var2 === "string") { + num = var2.length; // string + } + else { + num = var2; // number + } + // exported variable in the module + m1.var3; + if (typeof m1.var3 === "string") { + strOrNum = m1.var3; // string | number + } + else { + strOrNum = m1.var3; // string | number + } +})(m1 || (m1 = {})); +// local module +var m2; +(function (m2) { + var var2; + m2.var3; + var m3; + (function (m3) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // local variables from outer module declaration + num = typeof var2 === "string" && var2.length; // string + // exported variable from outer the module + strOrNum = typeof m2.var3 === "string" && m2.var3; // string | number + // variables in module declaration + var var4; + if (typeof var4 === "string") { + num = var4.length; // string + } + else { + num = var4; // number + } + // exported variable in the module + m3.var5; + if (typeof m3.var5 === "string") { + strOrNum = m3.var5; // string | number + } + else { + strOrNum = m3.var5; // string | number + } + })(m3 || (m3 = {})); +})(m2 || (m2 = {})); +// Dotted module +var m3; +(function (m3) { + var m4; + (function (m4) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in module declaration + var var2; + if (typeof var2 === "string") { + num = var2.length; // string + } + else { + num = var2; // number + } + // exported variable in the module + m4.var3; + if (typeof m4.var3 === "string") { + strOrNum = m4.var3; // string | number + } + else { + strOrNum = m4.var3; // string | number + } + })(m4 = m3.m4 || (m3.m4 = {})); +})(m3 || (m3 = {})); diff --git a/tests/baselines/reference/typeGuardsInModule.types b/tests/baselines/reference/typeGuardsInModule.types new file mode 100644 index 00000000000..82a0345b170 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInModule.types @@ -0,0 +1,228 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInModule.ts === +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var var1: string | number; +>var1 : string | number + +// Inside module +module m1 { +>m1 : typeof m1 + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in module declaration + var var2: string | number; +>var2 : string | number + + if (typeof var2 === "string") { +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number + + num = var2.length; // string +>num = var2.length : number +>num : number +>var2.length : number +>var2 : string +>length : number + } + else { + num = var2; // number +>num = var2 : number +>num : number +>var2 : number + } + + // exported variable in the module + export var var3: string | number; +>var3 : string | number + + if (typeof var3 === "string") { +>typeof var3 === "string" : boolean +>typeof var3 : string +>var3 : string | number + + strOrNum = var3; // string | number +>strOrNum = var3 : string | number +>strOrNum : string | number +>var3 : string | number + } + else { + strOrNum = var3; // string | number +>strOrNum = var3 : string | number +>strOrNum : string | number +>var3 : string | number + } +} +// local module +module m2 { +>m2 : typeof m2 + + var var2: string | number; +>var2 : string | number + + export var var3: string | number; +>var3 : string | number + + module m3 { +>m3 : typeof m3 + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // local variables from outer module declaration + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // exported variable from outer the module + strOrNum = typeof var3 === "string" && var3; // string | number +>strOrNum = typeof var3 === "string" && var3 : string | number +>strOrNum : string | number +>typeof var3 === "string" && var3 : string | number +>typeof var3 === "string" : boolean +>typeof var3 : string +>var3 : string | number +>var3 : string | number + + // variables in module declaration + var var4: string | number; +>var4 : string | number + + if (typeof var4 === "string") { +>typeof var4 === "string" : boolean +>typeof var4 : string +>var4 : string | number + + num = var4.length; // string +>num = var4.length : number +>num : number +>var4.length : number +>var4 : string +>length : number + } + else { + num = var4; // number +>num = var4 : number +>num : number +>var4 : number + } + + // exported variable in the module + export var var5: string | number; +>var5 : string | number + + if (typeof var5 === "string") { +>typeof var5 === "string" : boolean +>typeof var5 : string +>var5 : string | number + + strOrNum = var5; // string | number +>strOrNum = var5 : string | number +>strOrNum : string | number +>var5 : string | number + } + else { + strOrNum = var5; // string | number +>strOrNum = var5 : string | number +>strOrNum : string | number +>var5 : string | number + } + } +} +// Dotted module +module m3.m4 { +>m3 : typeof m3 +>m4 : typeof m4 + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in module declaration + var var2: string | number; +>var2 : string | number + + if (typeof var2 === "string") { +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number + + num = var2.length; // string +>num = var2.length : number +>num : number +>var2.length : number +>var2 : string +>length : number + } + else { + num = var2; // number +>num = var2 : number +>num : number +>var2 : number + } + + // exported variable in the module + export var var3: string | number; +>var3 : string | number + + if (typeof var3 === "string") { +>typeof var3 === "string" : boolean +>typeof var3 : string +>var3 : string | number + + strOrNum = var3; // string | number +>strOrNum = var3 : string | number +>strOrNum : string | number +>var3 : string | number + } + else { + strOrNum = var3; // string | number +>strOrNum = var3 : string | number +>strOrNum : string | number +>var3 : string | number + } +} + diff --git a/tests/baselines/reference/typeGuardsInProperties.js b/tests/baselines/reference/typeGuardsInProperties.js new file mode 100644 index 00000000000..78ad29a28b0 --- /dev/null +++ b/tests/baselines/reference/typeGuardsInProperties.js @@ -0,0 +1,56 @@ +//// [typeGuardsInProperties.ts] + +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +var num: number; +var strOrNum: string | number; +class C1 { + private pp1: string | number; + pp2: string | number; + // Inside public accessor getter + get pp3() { + return strOrNum; + } + method() { + strOrNum = typeof this.pp1 === "string" && this.pp1; // string | number + strOrNum = typeof this.pp2 === "string" && this.pp2; // string | number + strOrNum = typeof this.pp3 === "string" && this.pp3; // string | number + } +} +var c1: C1; +strOrNum = typeof c1.pp2 === "string" && c1.pp2; // string | number +strOrNum = typeof c1.pp3 === "string" && c1.pp3; // string | number +var obj1: { + x: string | number; +}; +strOrNum = typeof obj1.x === "string" && obj1.x; // string | number + +//// [typeGuardsInProperties.js] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. +var num; +var strOrNum; +var C1 = (function () { + function C1() { + } + Object.defineProperty(C1.prototype, "pp3", { + // Inside public accessor getter + get: function () { + return strOrNum; + }, + enumerable: true, + configurable: true + }); + C1.prototype.method = function () { + strOrNum = typeof this.pp1 === "string" && this.pp1; // string | number + strOrNum = typeof this.pp2 === "string" && this.pp2; // string | number + strOrNum = typeof this.pp3 === "string" && this.pp3; // string | number + }; + return C1; +})(); +var c1; +strOrNum = typeof c1.pp2 === "string" && c1.pp2; // string | number +strOrNum = typeof c1.pp3 === "string" && c1.pp3; // string | number +var obj1; +strOrNum = typeof obj1.x === "string" && obj1.x; // string | number diff --git a/tests/baselines/reference/typeGuardsInProperties.types b/tests/baselines/reference/typeGuardsInProperties.types new file mode 100644 index 00000000000..46e9ec0d42c --- /dev/null +++ b/tests/baselines/reference/typeGuardsInProperties.types @@ -0,0 +1,120 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsInProperties.ts === + +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +class C1 { +>C1 : C1 + + private pp1: string | number; +>pp1 : string | number + + pp2: string | number; +>pp2 : string | number + + // Inside public accessor getter + get pp3() { +>pp3 : string | number + + return strOrNum; +>strOrNum : string | number + } + method() { +>method : () => void + + strOrNum = typeof this.pp1 === "string" && this.pp1; // string | number +>strOrNum = typeof this.pp1 === "string" && this.pp1 : string | number +>strOrNum : string | number +>typeof this.pp1 === "string" && this.pp1 : string | number +>typeof this.pp1 === "string" : boolean +>typeof this.pp1 : string +>this.pp1 : string | number +>this : C1 +>pp1 : string | number +>this.pp1 : string | number +>this : C1 +>pp1 : string | number + + strOrNum = typeof this.pp2 === "string" && this.pp2; // string | number +>strOrNum = typeof this.pp2 === "string" && this.pp2 : string | number +>strOrNum : string | number +>typeof this.pp2 === "string" && this.pp2 : string | number +>typeof this.pp2 === "string" : boolean +>typeof this.pp2 : string +>this.pp2 : string | number +>this : C1 +>pp2 : string | number +>this.pp2 : string | number +>this : C1 +>pp2 : string | number + + strOrNum = typeof this.pp3 === "string" && this.pp3; // string | number +>strOrNum = typeof this.pp3 === "string" && this.pp3 : string | number +>strOrNum : string | number +>typeof this.pp3 === "string" && this.pp3 : string | number +>typeof this.pp3 === "string" : boolean +>typeof this.pp3 : string +>this.pp3 : string | number +>this : C1 +>pp3 : string | number +>this.pp3 : string | number +>this : C1 +>pp3 : string | number + } +} +var c1: C1; +>c1 : C1 +>C1 : C1 + +strOrNum = typeof c1.pp2 === "string" && c1.pp2; // string | number +>strOrNum = typeof c1.pp2 === "string" && c1.pp2 : string | number +>strOrNum : string | number +>typeof c1.pp2 === "string" && c1.pp2 : string | number +>typeof c1.pp2 === "string" : boolean +>typeof c1.pp2 : string +>c1.pp2 : string | number +>c1 : C1 +>pp2 : string | number +>c1.pp2 : string | number +>c1 : C1 +>pp2 : string | number + +strOrNum = typeof c1.pp3 === "string" && c1.pp3; // string | number +>strOrNum = typeof c1.pp3 === "string" && c1.pp3 : string | number +>strOrNum : string | number +>typeof c1.pp3 === "string" && c1.pp3 : string | number +>typeof c1.pp3 === "string" : boolean +>typeof c1.pp3 : string +>c1.pp3 : string | number +>c1 : C1 +>pp3 : string | number +>c1.pp3 : string | number +>c1 : C1 +>pp3 : string | number + +var obj1: { +>obj1 : { x: string | number; } + + x: string | number; +>x : string | number + +}; +strOrNum = typeof obj1.x === "string" && obj1.x; // string | number +>strOrNum = typeof obj1.x === "string" && obj1.x : string | number +>strOrNum : string | number +>typeof obj1.x === "string" && obj1.x : string | number +>typeof obj1.x === "string" : boolean +>typeof obj1.x : string +>obj1.x : string | number +>obj1 : { x: string | number; } +>x : string | number +>obj1.x : string | number +>obj1 : { x: string | number; } +>x : string | number + diff --git a/tests/baselines/reference/typeGuardsObjectMethods.js b/tests/baselines/reference/typeGuardsObjectMethods.js new file mode 100644 index 00000000000..3bdea2348ab --- /dev/null +++ b/tests/baselines/reference/typeGuardsObjectMethods.js @@ -0,0 +1,93 @@ +//// [typeGuardsObjectMethods.ts] + +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var strOrNum: string | number; +var var1: string | number; +var obj1 = { + // Inside method + method(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + + return strOrNum; + }, + get prop() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + return strOrNum; + }, + set prop(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } +}; +// return expression of the method +strOrNum = typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum); + +// accessing getter property +strOrNum = typeof obj1.prop === "string" && obj1.prop; + +//// [typeGuardsObjectMethods.js] +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. +// variables in global +var num; +var strOrNum; +var var1; +var obj1 = { + // Inside method + method: function (param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + // parameters in function declaration + num = typeof param === "string" && param.length; // string + return strOrNum; + }, + get prop() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + return strOrNum; + }, + set prop(param) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + // variables in function declaration + var var2; + num = typeof var2 === "string" && var2.length; // string + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } +}; +// return expression of the method +strOrNum = typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum); +// accessing getter property +strOrNum = typeof obj1.prop === "string" && obj1.prop; diff --git a/tests/baselines/reference/typeGuardsObjectMethods.types b/tests/baselines/reference/typeGuardsObjectMethods.types new file mode 100644 index 00000000000..a063145ce24 --- /dev/null +++ b/tests/baselines/reference/typeGuardsObjectMethods.types @@ -0,0 +1,178 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsObjectMethods.ts === + +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var var1: string | number; +>var1 : string | number + +var obj1 = { +>obj1 : { method: (param: string | number) => string | number; prop: string | number; } +>{ // Inside method method(param: string | number) { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables in function declaration var var2: string | number; num = typeof var2 === "string" && var2.length; // string // parameters in function declaration num = typeof param === "string" && param.length; // string return strOrNum; }, get prop() { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables in function declaration var var2: string | number; num = typeof var2 === "string" && var2.length; // string return strOrNum; }, set prop(param: string | number) { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables in function declaration var var2: string | number; num = typeof var2 === "string" && var2.length; // string // parameters in function declaration num = typeof param === "string" && param.length; // string }} : { method: (param: string | number) => string | number; prop: string | number; } + + // Inside method + method(param: string | number) { +>method : (param: string | number) => string | number +>method(param: string | number) { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables in function declaration var var2: string | number; num = typeof var2 === "string" && var2.length; // string // parameters in function declaration num = typeof param === "string" && param.length; // string return strOrNum; } : (param: string | number) => string | number +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + + return strOrNum; +>strOrNum : string | number + + }, + get prop() { +>prop : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + return strOrNum; +>strOrNum : string | number + + }, + set prop(param: string | number) { +>prop : string | number +>param : string | number + + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string +>num = typeof var1 === "string" && var1.length : number +>num : number +>typeof var1 === "string" && var1.length : number +>typeof var1 === "string" : boolean +>typeof var1 : string +>var1 : string | number +>var1.length : number +>var1 : string +>length : number + + // variables in function declaration + var var2: string | number; +>var2 : string | number + + num = typeof var2 === "string" && var2.length; // string +>num = typeof var2 === "string" && var2.length : number +>num : number +>typeof var2 === "string" && var2.length : number +>typeof var2 === "string" : boolean +>typeof var2 : string +>var2 : string | number +>var2.length : number +>var2 : string +>length : number + + // parameters in function declaration + num = typeof param === "string" && param.length; // string +>num = typeof param === "string" && param.length : number +>num : number +>typeof param === "string" && param.length : number +>typeof param === "string" : boolean +>typeof param : string +>param : string | number +>param.length : number +>param : string +>length : number + } +}; +// return expression of the method +strOrNum = typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum); +>strOrNum = typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum) : string | number +>strOrNum : string | number +>typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum) : string | number +>typeof obj1.method(strOrNum) === "string" : boolean +>typeof obj1.method(strOrNum) : string +>obj1.method(strOrNum) : string | number +>obj1.method : (param: string | number) => string | number +>obj1 : { method: (param: string | number) => string | number; prop: string | number; } +>method : (param: string | number) => string | number +>strOrNum : string | number +>obj1.method(strOrNum) : string | number +>obj1.method : (param: string | number) => string | number +>obj1 : { method: (param: string | number) => string | number; prop: string | number; } +>method : (param: string | number) => string | number +>strOrNum : string | number + +// accessing getter property +strOrNum = typeof obj1.prop === "string" && obj1.prop; +>strOrNum = typeof obj1.prop === "string" && obj1.prop : string | number +>strOrNum : string | number +>typeof obj1.prop === "string" && obj1.prop : string | number +>typeof obj1.prop === "string" : boolean +>typeof obj1.prop : string +>obj1.prop : string | number +>obj1 : { method: (param: string | number) => string | number; prop: string | number; } +>prop : string | number +>obj1.prop : string | number +>obj1 : { method: (param: string | number) => string | number; prop: string | number; } +>prop : string | number + diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassAccessors.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassAccessors.ts new file mode 100644 index 00000000000..04b9a6a394e --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassAccessors.ts @@ -0,0 +1,103 @@ +//@target: es5 + +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var strOrNum: string | number; +var var1: string | number; +class ClassWithAccessors { + // Inside public accessor getter + get p1() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + return strOrNum; + } + // Inside public accessor setter + set p1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // parameter of function declaration + num = typeof param === "string" && param.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + } + // Inside private accessor getter + private get pp1() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + return strOrNum; + } + // Inside private accessor setter + private set pp1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // parameter of function declaration + num = typeof param === "string" && param.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + } + // Inside static accessor getter + static get s1() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + return strOrNum; + } + // Inside static accessor setter + static set s1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // parameter of function declaration + num = typeof param === "string" && param.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + } + // Inside private static accessor getter + private static get ss1() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + return strOrNum; + } + // Inside private static accessor setter + private static set ss1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // parameter of function declaration + num = typeof param === "string" && param.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + } +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassMethods.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassMethods.ts new file mode 100644 index 00000000000..cb1327027c5 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassMethods.ts @@ -0,0 +1,67 @@ +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var var1: string | number; +class C1 { + constructor(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } + // Inside function declaration + private p1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } + // Inside function declaration + p2(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } + // Inside function declaration + private static s1(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } + // Inside function declaration + static s2(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInExternalModule.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInExternalModule.ts new file mode 100644 index 00000000000..aa41a93f4ed --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInExternalModule.ts @@ -0,0 +1,24 @@ +//@module: commonjs +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// local variable in external module +var num: number; +var var1: string | number; +if (typeof var1 === "string") { + num = var1.length; // string +} +else { + num = var1; // number +} + +// exported variable in external module +var strOrNum: string | number; +export var var2: string | number; +if (typeof var2 === "string") { + // export makes the var property and not variable + strOrNum = var2; // string | number +} +else { + strOrNum = var2; // number | string +} \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunction.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunction.ts new file mode 100644 index 00000000000..a374a248071 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunction.ts @@ -0,0 +1,87 @@ +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var var1: string | number; +// Inside function declaration +function f(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string +} +// local function declaration +function f1(param: string | number) { + var var2: string | number; + function f2(param1: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string + + // parameters in outer declaration + num = typeof param === "string" && param.length; // string + + // local + var var3: string | number; + num = typeof var3 === "string" && var3.length; // string + num = typeof param1 === "string" && param1.length; // string + } +} +// Function expression +function f2(param: string | number) { + // variables in function declaration + var var2: string | number; + // variables in function expressions + var r = function (param1: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string + + // parameters in outer declaration + num = typeof param === "string" && param.length; // string + + // local + var var3: string | number; + num = typeof var3 === "string" && var3.length; // string + num = typeof param1 === "string" && param1.length; // string + } (param); +} +// Arrow expression +function f3(param: string | number) { + // variables in function declaration + var var2: string | number; + // variables in function expressions + var r = ((param1: string | number) => { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables from outer function declaration + num = typeof var2 === "string" && var2.length; // string + + // parameters in outer declaration + num = typeof param === "string" && param.length; // string + + // local + var var3: string | number; + num = typeof var3 === "string" && var3.length; // string + num = typeof param1 === "string" && param1.length; // string + })(param); +} +// Return type of function +// Inside function declaration +var strOrNum: string | number; +function f4() { + var var2: string | number = strOrNum; + return var2; +} +strOrNum = typeof f4() === "string" && f4(); // string | number \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInGlobal.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInGlobal.ts new file mode 100644 index 00000000000..329442751df --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInGlobal.ts @@ -0,0 +1,12 @@ +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var var1: string | number; +if (typeof var1 === "string") { + num = var1.length; // string +} +else { + num = var1; // number +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInModule.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInModule.ts new file mode 100644 index 00000000000..fd5f432ebdb --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInModule.ts @@ -0,0 +1,86 @@ +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var strOrNum: string | number; +var var1: string | number; +// Inside module +module m1 { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in module declaration + var var2: string | number; + if (typeof var2 === "string") { + num = var2.length; // string + } + else { + num = var2; // number + } + + // exported variable in the module + export var var3: string | number; + if (typeof var3 === "string") { + strOrNum = var3; // string | number + } + else { + strOrNum = var3; // string | number + } +} +// local module +module m2 { + var var2: string | number; + export var var3: string | number; + module m3 { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // local variables from outer module declaration + num = typeof var2 === "string" && var2.length; // string + + // exported variable from outer the module + strOrNum = typeof var3 === "string" && var3; // string | number + + // variables in module declaration + var var4: string | number; + if (typeof var4 === "string") { + num = var4.length; // string + } + else { + num = var4; // number + } + + // exported variable in the module + export var var5: string | number; + if (typeof var5 === "string") { + strOrNum = var5; // string | number + } + else { + strOrNum = var5; // string | number + } + } +} +// Dotted module +module m3.m4 { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in module declaration + var var2: string | number; + if (typeof var2 === "string") { + num = var2.length; // string + } + else { + num = var2; // number + } + + // exported variable in the module + export var var3: string | number; + if (typeof var3 === "string") { + strOrNum = var3; // string | number + } + else { + strOrNum = var3; // string | number + } +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInProperties.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInProperties.ts new file mode 100644 index 00000000000..bffe8d3d1b8 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInProperties.ts @@ -0,0 +1,27 @@ +//@target: es5 + +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +var num: number; +var strOrNum: string | number; +class C1 { + private pp1: string | number; + pp2: string | number; + // Inside public accessor getter + get pp3() { + return strOrNum; + } + method() { + strOrNum = typeof this.pp1 === "string" && this.pp1; // string | number + strOrNum = typeof this.pp2 === "string" && this.pp2; // string | number + strOrNum = typeof this.pp3 === "string" && this.pp3; // string | number + } +} +var c1: C1; +strOrNum = typeof c1.pp2 === "string" && c1.pp2; // string | number +strOrNum = typeof c1.pp3 === "string" && c1.pp3; // string | number +var obj1: { + x: string | number; +}; +strOrNum = typeof obj1.x === "string" && obj1.x; // string | number \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsObjectMethods.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsObjectMethods.ts new file mode 100644 index 00000000000..bbf68189058 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsObjectMethods.ts @@ -0,0 +1,51 @@ +//@target: es5 + +// Note that type guards affect types of variables and parameters only and +// have no effect on members of objects such as properties. + +// variables in global +var num: number; +var strOrNum: string | number; +var var1: string | number; +var obj1 = { + // Inside method + method(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + + return strOrNum; + }, + get prop() { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + return strOrNum; + }, + set prop(param: string | number) { + // global vars in function declaration + num = typeof var1 === "string" && var1.length; // string + + // variables in function declaration + var var2: string | number; + num = typeof var2 === "string" && var2.length; // string + + // parameters in function declaration + num = typeof param === "string" && param.length; // string + } +}; +// return expression of the method +strOrNum = typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum); + +// accessing getter property +strOrNum = typeof obj1.prop === "string" && obj1.prop; \ No newline at end of file From 5961ed7154f692694c793ffececc6ee7b6696565 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 5 Nov 2014 18:50:43 -0800 Subject: [PATCH 047/154] =?UTF-8?q?Test=20typeguard=20of=20form=20instance?= =?UTF-8?q?=20of=20=E2=80=A2=09A=20type=20guard=20of=20the=20form=20x=20in?= =?UTF-8?q?stanceof=20C,=20where=20C=20is=20of=20a=20subtype=20of=20the=20?= =?UTF-8?q?global=20type=20=E2=80=98Function=E2=80=99=20and=20C=20has=20a?= =?UTF-8?q?=20property=20named=20=E2=80=98prototype=E2=80=99=20o=09when=20?= =?UTF-8?q?true,=20narrows=20the=20type=20of=20x=20to=20the=20type=20of=20?= =?UTF-8?q?the=20=E2=80=98prototype=E2=80=99=20property=20in=20C=20provide?= =?UTF-8?q?d=20it=20is=20a=20subtype=20of=20the=20type=20of=20x,=20or=20o?= =?UTF-8?q?=09when=20false,=20has=20no=20effect=20on=20the=20type=20of=20x?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reference/typeGuardOfFormInstanceOf.js | 74 ++++++++++ .../reference/typeGuardOfFormInstanceOf.types | 132 ++++++++++++++++++ .../typeGuards/typeGuardOfFormInstanceOf.ts | 30 ++++ 3 files changed, 236 insertions(+) create mode 100644 tests/baselines/reference/typeGuardOfFormInstanceOf.js create mode 100644 tests/baselines/reference/typeGuardOfFormInstanceOf.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOf.ts diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js new file mode 100644 index 00000000000..093e80cbb74 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -0,0 +1,74 @@ +//// [typeGuardOfFormInstanceOf.ts] +// A type guard of the form x instanceof C, where C is of a subtype of the global type 'Function' +// and C has a property named 'prototype' +// - when true, narrows the type of x to the type of the 'prototype' property in C provided +// it is a subtype of the type of x, or +// - when false, has no effect on the type of x. + +class C1 { + p1: string; +} +class C2 { + p2: number; +} +class D1 extends C1 { + p3: number; +} +var str: string; +var num: number; +var strOrNum: string | number; + +var c1Orc2: C1 | C2; +str = c1Orc2 instanceof C1 && c1Orc2.p1; // C1 +num = c1Orc2 instanceof C2 && c1Orc2.p2; // C2 +str = c1Orc2 instanceof D1 && c1Orc2.p1; // D1 +num = c1Orc2 instanceof D1 && c1Orc2.p3; // D1 + +var c2Ord1: C2 | D1; +num = c2Ord1 instanceof C2 && c2Ord1.p2; // C2 +num = c2Ord1 instanceof D1 && c2Ord1.p3; // D1 +str = c2Ord1 instanceof D1 && c2Ord1.p1; // D1 +var r2: D1 | C2 = c2Ord1 instanceof C1 && c2Ord1; // C2 | D1 + +//// [typeGuardOfFormInstanceOf.js] +// A type guard of the form x instanceof C, where C is of a subtype of the global type 'Function' +// and C has a property named 'prototype' +// - when true, narrows the type of x to the type of the 'prototype' property in C provided +// it is a subtype of the type of x, or +// - when false, has no effect on the type of x. +var __extends = this.__extends || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + __.prototype = b.prototype; + d.prototype = new __(); +}; +var C1 = (function () { + function C1() { + } + return C1; +})(); +var C2 = (function () { + function C2() { + } + return C2; +})(); +var D1 = (function (_super) { + __extends(D1, _super); + function D1() { + _super.apply(this, arguments); + } + return D1; +})(C1); +var str; +var num; +var strOrNum; +var c1Orc2; +str = c1Orc2 instanceof C1 && c1Orc2.p1; // C1 +num = c1Orc2 instanceof C2 && c1Orc2.p2; // C2 +str = c1Orc2 instanceof D1 && c1Orc2.p1; // D1 +num = c1Orc2 instanceof D1 && c1Orc2.p3; // D1 +var c2Ord1; +num = c2Ord1 instanceof C2 && c2Ord1.p2; // C2 +num = c2Ord1 instanceof D1 && c2Ord1.p3; // D1 +str = c2Ord1 instanceof D1 && c2Ord1.p1; // D1 +var r2 = c2Ord1 instanceof C1 && c2Ord1; // C2 | D1 diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.types b/tests/baselines/reference/typeGuardOfFormInstanceOf.types new file mode 100644 index 00000000000..fb44482c86e --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.types @@ -0,0 +1,132 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOf.ts === +// A type guard of the form x instanceof C, where C is of a subtype of the global type 'Function' +// and C has a property named 'prototype' +// - when true, narrows the type of x to the type of the 'prototype' property in C provided +// it is a subtype of the type of x, or +// - when false, has no effect on the type of x. + +class C1 { +>C1 : C1 + + p1: string; +>p1 : string +} +class C2 { +>C2 : C2 + + p2: number; +>p2 : number +} +class D1 extends C1 { +>D1 : D1 +>C1 : C1 + + p3: number; +>p3 : number +} +var str: string; +>str : string + +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var c1Orc2: C1 | C2; +>c1Orc2 : C1 | C2 +>C1 : C1 +>C2 : C2 + +str = c1Orc2 instanceof C1 && c1Orc2.p1; // C1 +>str = c1Orc2 instanceof C1 && c1Orc2.p1 : string +>str : string +>c1Orc2 instanceof C1 && c1Orc2.p1 : string +>c1Orc2 instanceof C1 : boolean +>c1Orc2 : C1 | C2 +>C1 : typeof C1 +>c1Orc2.p1 : string +>c1Orc2 : C1 +>p1 : string + +num = c1Orc2 instanceof C2 && c1Orc2.p2; // C2 +>num = c1Orc2 instanceof C2 && c1Orc2.p2 : number +>num : number +>c1Orc2 instanceof C2 && c1Orc2.p2 : number +>c1Orc2 instanceof C2 : boolean +>c1Orc2 : C1 | C2 +>C2 : typeof C2 +>c1Orc2.p2 : number +>c1Orc2 : C2 +>p2 : number + +str = c1Orc2 instanceof D1 && c1Orc2.p1; // D1 +>str = c1Orc2 instanceof D1 && c1Orc2.p1 : string +>str : string +>c1Orc2 instanceof D1 && c1Orc2.p1 : string +>c1Orc2 instanceof D1 : boolean +>c1Orc2 : C1 | C2 +>D1 : typeof D1 +>c1Orc2.p1 : string +>c1Orc2 : D1 +>p1 : string + +num = c1Orc2 instanceof D1 && c1Orc2.p3; // D1 +>num = c1Orc2 instanceof D1 && c1Orc2.p3 : number +>num : number +>c1Orc2 instanceof D1 && c1Orc2.p3 : number +>c1Orc2 instanceof D1 : boolean +>c1Orc2 : C1 | C2 +>D1 : typeof D1 +>c1Orc2.p3 : number +>c1Orc2 : D1 +>p3 : number + +var c2Ord1: C2 | D1; +>c2Ord1 : C2 | D1 +>C2 : C2 +>D1 : D1 + +num = c2Ord1 instanceof C2 && c2Ord1.p2; // C2 +>num = c2Ord1 instanceof C2 && c2Ord1.p2 : number +>num : number +>c2Ord1 instanceof C2 && c2Ord1.p2 : number +>c2Ord1 instanceof C2 : boolean +>c2Ord1 : C2 | D1 +>C2 : typeof C2 +>c2Ord1.p2 : number +>c2Ord1 : C2 +>p2 : number + +num = c2Ord1 instanceof D1 && c2Ord1.p3; // D1 +>num = c2Ord1 instanceof D1 && c2Ord1.p3 : number +>num : number +>c2Ord1 instanceof D1 && c2Ord1.p3 : number +>c2Ord1 instanceof D1 : boolean +>c2Ord1 : C2 | D1 +>D1 : typeof D1 +>c2Ord1.p3 : number +>c2Ord1 : D1 +>p3 : number + +str = c2Ord1 instanceof D1 && c2Ord1.p1; // D1 +>str = c2Ord1 instanceof D1 && c2Ord1.p1 : string +>str : string +>c2Ord1 instanceof D1 && c2Ord1.p1 : string +>c2Ord1 instanceof D1 : boolean +>c2Ord1 : C2 | D1 +>D1 : typeof D1 +>c2Ord1.p1 : string +>c2Ord1 : D1 +>p1 : string + +var r2: D1 | C2 = c2Ord1 instanceof C1 && c2Ord1; // C2 | D1 +>r2 : C2 | D1 +>D1 : D1 +>C2 : C2 +>c2Ord1 instanceof C1 && c2Ord1 : C2 | D1 +>c2Ord1 instanceof C1 : boolean +>c2Ord1 : C2 | D1 +>C1 : typeof C1 +>c2Ord1 : C2 | D1 + diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOf.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOf.ts new file mode 100644 index 00000000000..233909f44aa --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOf.ts @@ -0,0 +1,30 @@ +// A type guard of the form x instanceof C, where C is of a subtype of the global type 'Function' +// and C has a property named 'prototype' +// - when true, narrows the type of x to the type of the 'prototype' property in C provided +// it is a subtype of the type of x, or +// - when false, has no effect on the type of x. + +class C1 { + p1: string; +} +class C2 { + p2: number; +} +class D1 extends C1 { + p3: number; +} +var str: string; +var num: number; +var strOrNum: string | number; + +var c1Orc2: C1 | C2; +str = c1Orc2 instanceof C1 && c1Orc2.p1; // C1 +num = c1Orc2 instanceof C2 && c1Orc2.p2; // C2 +str = c1Orc2 instanceof D1 && c1Orc2.p1; // D1 +num = c1Orc2 instanceof D1 && c1Orc2.p3; // D1 + +var c2Ord1: C2 | D1; +num = c2Ord1 instanceof C2 && c2Ord1.p2; // C2 +num = c2Ord1 instanceof D1 && c2Ord1.p3; // D1 +str = c2Ord1 instanceof D1 && c2Ord1.p1; // D1 +var r2: D1 | C2 = c2Ord1 instanceof C1 && c2Ord1; // C2 | D1 \ No newline at end of file From 7ebf5371a5de0c9ff5419cb7d78a182bd120e324 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 5 Nov 2014 18:31:38 -0800 Subject: [PATCH 048/154] =?UTF-8?q?Test=20cases=20for=20typeguards=20of=20?= =?UTF-8?q?form=20typeof=20x=20=3D=3D=3D=20s=20and=20typeof=20x=20!=3D=3D?= =?UTF-8?q?=20s=20=E2=80=A2=09A=20type=20guard=20of=20the=20form=20typeof?= =?UTF-8?q?=20x=20=3D=3D=3D=20s,=20where=20s=20is=20a=20string=20literal?= =?UTF-8?q?=20with=20the=20value=20=E2=80=98string=E2=80=99,=20=E2=80=98nu?= =?UTF-8?q?mber=E2=80=99,=20or=20=E2=80=98boolean=E2=80=99,=20o=09when=20t?= =?UTF-8?q?rue,=20narrows=20the=20type=20of=20x=20to=20the=20given=20primi?= =?UTF-8?q?tive=20type,=20or=20o=09when=20false,=20removes=20the=20primiti?= =?UTF-8?q?ve=20type=20from=20the=20type=20of=20x.=20=E2=80=A2=09A=20type?= =?UTF-8?q?=20guard=20of=20the=20form=20typeof=20x=20=3D=3D=3D=20s,=20wher?= =?UTF-8?q?e=20s=20is=20a=20string=20literal=20with=20any=20value=20but=20?= =?UTF-8?q?=E2=80=98string=E2=80=99,=20=E2=80=98number=E2=80=99,=20or=20?= =?UTF-8?q?=E2=80=98boolean=E2=80=99,=20o=09when=20true,=20removes=20the?= =?UTF-8?q?=20primitive=20types=20string,=20number,=20and=20boolean=20from?= =?UTF-8?q?=20the=20type=20of=20x,=20or=20o=09when=20false,=20has=20no=20e?= =?UTF-8?q?ffect=20on=20the=20type=20of=20x.=20=E2=80=A2=09A=20type=20guar?= =?UTF-8?q?d=20of=20the=20form=20typeof=20x=20!=3D=3D=20s,=20where=20s=20i?= =?UTF-8?q?s=20a=20string=20literal,=20o=09when=20true,=20narrows=20the=20?= =?UTF-8?q?type=20of=20x=20by=20typeof=20x=20=3D=3D=3D=20s=20when=20false,?= =?UTF-8?q?=20or=20o=09when=20false,=20narrows=20the=20type=20of=20x=20by?= =?UTF-8?q?=20typeof=20x=20=3D=3D=3D=20s=20when=20true.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reference/typeGuardOfFormTypeOfBoolean.js | 169 ++++++++++++++ .../typeGuardOfFormTypeOfBoolean.types | 208 ++++++++++++++++++ .../reference/typeGuardOfFormTypeOfNumber.js | 169 ++++++++++++++ .../typeGuardOfFormTypeOfNumber.types | 206 +++++++++++++++++ .../reference/typeGuardOfFormTypeOfOther.js | 148 +++++++++++++ .../typeGuardOfFormTypeOfOther.types | 180 +++++++++++++++ .../reference/typeGuardOfFormTypeOfString.js | 169 ++++++++++++++ .../typeGuardOfFormTypeOfString.types | 208 ++++++++++++++++++ .../typeGuardOfFormTypeOfBoolean.ts | 82 +++++++ .../typeGuards/typeGuardOfFormTypeOfNumber.ts | 82 +++++++ .../typeGuards/typeGuardOfFormTypeOfOther.ts | 72 ++++++ .../typeGuards/typeGuardOfFormTypeOfString.ts | 82 +++++++ 12 files changed, 1775 insertions(+) create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfBoolean.js create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfNumber.js create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfNumber.types create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfOther.js create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfOther.types create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfString.js create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfString.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfBoolean.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNumber.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfString.ts diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.js b/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.js new file mode 100644 index 00000000000..4b675ffd65a --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.js @@ -0,0 +1,169 @@ +//// [typeGuardOfFormTypeOfBoolean.ts] +class C { private p: string }; + +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrNumOrBool: string | number | boolean; +var strOrC: string | C; +var numOrC: number | C; +var boolOrC: boolean | C; +var c: C; + +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "boolean") { + bool = strOrNum; // boolean +} +else { + var z: string | number = strOrNum; // string | number +} +if (typeof strOrBool === "boolean") { + bool = strOrBool; // boolean +} +else { + str = strOrBool; // string +} +if (typeof numOrBool === "boolean") { + bool = numOrBool; // boolean +} +else { + num = numOrBool; // number +} +if (typeof strOrNumOrBool === "boolean") { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +if (typeof boolOrC === "boolean") { + bool = boolOrC; // boolean +} +else { + c = boolOrC; // C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "boolean") { + var z: string | number = strOrNum; // string | number +} +else { + bool = strOrNum; // boolean +} +if (typeof strOrBool !== "boolean") { + str = strOrBool; // string +} +else { + bool = strOrBool; // boolean +} +if (typeof numOrBool !== "boolean") { + num = numOrBool; // number +} +else { + bool = numOrBool; // boolean +} +if (typeof strOrNumOrBool !== "boolean") { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +if (typeof boolOrC !== "boolean") { + c = boolOrC; // C +} +else { + bool = boolOrC; // boolean +} + +//// [typeGuardOfFormTypeOfBoolean.js] +var C = (function () { + function C() { + } + return C; +})(); +; +var str; +var bool; +var num; +var strOrNum; +var strOrBool; +var numOrBool; +var strOrNumOrBool; +var strOrC; +var numOrC; +var boolOrC; +var c; +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "boolean") { + bool = strOrNum; // boolean +} +else { + var z = strOrNum; // string | number +} +if (typeof strOrBool === "boolean") { + bool = strOrBool; // boolean +} +else { + str = strOrBool; // string +} +if (typeof numOrBool === "boolean") { + bool = numOrBool; // boolean +} +else { + num = numOrBool; // number +} +if (typeof strOrNumOrBool === "boolean") { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +if (typeof boolOrC === "boolean") { + bool = boolOrC; // boolean +} +else { + c = boolOrC; // C +} +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "boolean") { + var z = strOrNum; // string | number +} +else { + bool = strOrNum; // boolean +} +if (typeof strOrBool !== "boolean") { + str = strOrBool; // string +} +else { + bool = strOrBool; // boolean +} +if (typeof numOrBool !== "boolean") { + num = numOrBool; // number +} +else { + bool = numOrBool; // boolean +} +if (typeof strOrNumOrBool !== "boolean") { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +if (typeof boolOrC !== "boolean") { + c = boolOrC; // C +} +else { + bool = boolOrC; // boolean +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types b/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types new file mode 100644 index 00000000000..6dc9792768c --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types @@ -0,0 +1,208 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfBoolean.ts === +class C { private p: string }; +>C : C +>p : string + +var str: string; +>str : string + +var bool: boolean; +>bool : boolean + +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var strOrBool: string | boolean; +>strOrBool : string | boolean + +var numOrBool: number | boolean +>numOrBool : number | boolean + +var strOrNumOrBool: string | number | boolean; +>strOrNumOrBool : string | number | boolean + +var strOrC: string | C; +>strOrC : string | C +>C : C + +var numOrC: number | C; +>numOrC : number | C +>C : C + +var boolOrC: boolean | C; +>boolOrC : boolean | C +>C : C + +var c: C; +>c : C +>C : C + +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "boolean") { +>typeof strOrNum === "boolean" : boolean +>typeof strOrNum : string +>strOrNum : string | number + + bool = strOrNum; // boolean +>bool = strOrNum : boolean +>bool : boolean +>strOrNum : boolean +} +else { + var z: string | number = strOrNum; // string | number +>z : string | number +>strOrNum : string | number +} +if (typeof strOrBool === "boolean") { +>typeof strOrBool === "boolean" : boolean +>typeof strOrBool : string +>strOrBool : string | boolean + + bool = strOrBool; // boolean +>bool = strOrBool : boolean +>bool : boolean +>strOrBool : boolean +} +else { + str = strOrBool; // string +>str = strOrBool : string +>str : string +>strOrBool : string +} +if (typeof numOrBool === "boolean") { +>typeof numOrBool === "boolean" : boolean +>typeof numOrBool : string +>numOrBool : number | boolean + + bool = numOrBool; // boolean +>bool = numOrBool : boolean +>bool : boolean +>numOrBool : boolean +} +else { + num = numOrBool; // number +>num = numOrBool : number +>num : number +>numOrBool : number +} +if (typeof strOrNumOrBool === "boolean") { +>typeof strOrNumOrBool === "boolean" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean + + bool = strOrNumOrBool; // boolean +>bool = strOrNumOrBool : boolean +>bool : boolean +>strOrNumOrBool : boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +>strOrNum = strOrNumOrBool : string | number +>strOrNum : string | number +>strOrNumOrBool : string | number +} +if (typeof boolOrC === "boolean") { +>typeof boolOrC === "boolean" : boolean +>typeof boolOrC : string +>boolOrC : boolean | C + + bool = boolOrC; // boolean +>bool = boolOrC : boolean +>bool : boolean +>boolOrC : boolean +} +else { + c = boolOrC; // C +>c = boolOrC : C +>c : C +>boolOrC : C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "boolean") { +>typeof strOrNum !== "boolean" : boolean +>typeof strOrNum : string +>strOrNum : string | number + + var z: string | number = strOrNum; // string | number +>z : string | number +>strOrNum : string | number +} +else { + bool = strOrNum; // boolean +>bool = strOrNum : boolean +>bool : boolean +>strOrNum : boolean +} +if (typeof strOrBool !== "boolean") { +>typeof strOrBool !== "boolean" : boolean +>typeof strOrBool : string +>strOrBool : string | boolean + + str = strOrBool; // string +>str = strOrBool : string +>str : string +>strOrBool : string +} +else { + bool = strOrBool; // boolean +>bool = strOrBool : boolean +>bool : boolean +>strOrBool : boolean +} +if (typeof numOrBool !== "boolean") { +>typeof numOrBool !== "boolean" : boolean +>typeof numOrBool : string +>numOrBool : number | boolean + + num = numOrBool; // number +>num = numOrBool : number +>num : number +>numOrBool : number +} +else { + bool = numOrBool; // boolean +>bool = numOrBool : boolean +>bool : boolean +>numOrBool : boolean +} +if (typeof strOrNumOrBool !== "boolean") { +>typeof strOrNumOrBool !== "boolean" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean + + strOrNum = strOrNumOrBool; // string | number +>strOrNum = strOrNumOrBool : string | number +>strOrNum : string | number +>strOrNumOrBool : string | number +} +else { + bool = strOrNumOrBool; // boolean +>bool = strOrNumOrBool : boolean +>bool : boolean +>strOrNumOrBool : boolean +} +if (typeof boolOrC !== "boolean") { +>typeof boolOrC !== "boolean" : boolean +>typeof boolOrC : string +>boolOrC : boolean | C + + c = boolOrC; // C +>c = boolOrC : C +>c : C +>boolOrC : C +} +else { + bool = boolOrC; // boolean +>bool = boolOrC : boolean +>bool : boolean +>boolOrC : boolean +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNumber.js b/tests/baselines/reference/typeGuardOfFormTypeOfNumber.js new file mode 100644 index 00000000000..ff3a43430ba --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNumber.js @@ -0,0 +1,169 @@ +//// [typeGuardOfFormTypeOfNumber.ts] +class C { private p: string }; + +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrNumOrBool: string | number | boolean; +var strOrC: string | C; +var numOrC: number | C; +var boolOrC: boolean | C; +var c: C; + +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "number") { + num = strOrNum; // number +} +else { + str === strOrNum; // string +} +if (typeof strOrBool === "number") { + num = strOrBool; // number +} +else { + var y: string | boolean = strOrBool; // string | boolean +} +if (typeof numOrBool === "number") { + num = numOrBool; // number +} +else { + var x: number | boolean = numOrBool; // number | boolean +} +if (typeof strOrNumOrBool === "number") { + num = strOrNumOrBool; // number +} +else { + strOrBool = strOrNumOrBool; // string | boolean +} +if (typeof numOrC === "number") { + num = numOrC; // number +} +else { + c = numOrC; // C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "number") { + str === strOrNum; // string +} +else { + num = strOrNum; // number +} +if (typeof strOrBool !== "number") { + var y: string | boolean = strOrBool; // string | boolean +} +else { + num = strOrBool; // number +} +if (typeof numOrBool !== "number") { + var x: number | boolean = numOrBool; // number | boolean +} +else { + num = numOrBool; // number +} +if (typeof strOrNumOrBool !== "number") { + strOrBool = strOrNumOrBool; // string | boolean +} +else { + num = strOrNumOrBool; // number +} +if (typeof numOrC !== "number") { + c = numOrC; // C +} +else { + num = numOrC; // number +} + +//// [typeGuardOfFormTypeOfNumber.js] +var C = (function () { + function C() { + } + return C; +})(); +; +var str; +var bool; +var num; +var strOrNum; +var strOrBool; +var numOrBool; +var strOrNumOrBool; +var strOrC; +var numOrC; +var boolOrC; +var c; +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "number") { + num = strOrNum; // number +} +else { + str === strOrNum; // string +} +if (typeof strOrBool === "number") { + num = strOrBool; // number +} +else { + var y = strOrBool; // string | boolean +} +if (typeof numOrBool === "number") { + num = numOrBool; // number +} +else { + var x = numOrBool; // number | boolean +} +if (typeof strOrNumOrBool === "number") { + num = strOrNumOrBool; // number +} +else { + strOrBool = strOrNumOrBool; // string | boolean +} +if (typeof numOrC === "number") { + num = numOrC; // number +} +else { + c = numOrC; // C +} +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "number") { + str === strOrNum; // string +} +else { + num = strOrNum; // number +} +if (typeof strOrBool !== "number") { + var y = strOrBool; // string | boolean +} +else { + num = strOrBool; // number +} +if (typeof numOrBool !== "number") { + var x = numOrBool; // number | boolean +} +else { + num = numOrBool; // number +} +if (typeof strOrNumOrBool !== "number") { + strOrBool = strOrNumOrBool; // string | boolean +} +else { + num = strOrNumOrBool; // number +} +if (typeof numOrC !== "number") { + c = numOrC; // C +} +else { + num = numOrC; // number +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types b/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types new file mode 100644 index 00000000000..7fd8855ec92 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types @@ -0,0 +1,206 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNumber.ts === +class C { private p: string }; +>C : C +>p : string + +var str: string; +>str : string + +var bool: boolean; +>bool : boolean + +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var strOrBool: string | boolean; +>strOrBool : string | boolean + +var numOrBool: number | boolean +>numOrBool : number | boolean + +var strOrNumOrBool: string | number | boolean; +>strOrNumOrBool : string | number | boolean + +var strOrC: string | C; +>strOrC : string | C +>C : C + +var numOrC: number | C; +>numOrC : number | C +>C : C + +var boolOrC: boolean | C; +>boolOrC : boolean | C +>C : C + +var c: C; +>c : C +>C : C + +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "number") { +>typeof strOrNum === "number" : boolean +>typeof strOrNum : string +>strOrNum : string | number + + num = strOrNum; // number +>num = strOrNum : number +>num : number +>strOrNum : number +} +else { + str === strOrNum; // string +>str === strOrNum : boolean +>str : string +>strOrNum : string +} +if (typeof strOrBool === "number") { +>typeof strOrBool === "number" : boolean +>typeof strOrBool : string +>strOrBool : string | boolean + + num = strOrBool; // number +>num = strOrBool : number +>num : number +>strOrBool : number +} +else { + var y: string | boolean = strOrBool; // string | boolean +>y : string | boolean +>strOrBool : string | boolean +} +if (typeof numOrBool === "number") { +>typeof numOrBool === "number" : boolean +>typeof numOrBool : string +>numOrBool : number | boolean + + num = numOrBool; // number +>num = numOrBool : number +>num : number +>numOrBool : number +} +else { + var x: number | boolean = numOrBool; // number | boolean +>x : number | boolean +>numOrBool : boolean +} +if (typeof strOrNumOrBool === "number") { +>typeof strOrNumOrBool === "number" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean + + num = strOrNumOrBool; // number +>num = strOrNumOrBool : number +>num : number +>strOrNumOrBool : number +} +else { + strOrBool = strOrNumOrBool; // string | boolean +>strOrBool = strOrNumOrBool : string | boolean +>strOrBool : string | boolean +>strOrNumOrBool : string | boolean +} +if (typeof numOrC === "number") { +>typeof numOrC === "number" : boolean +>typeof numOrC : string +>numOrC : number | C + + num = numOrC; // number +>num = numOrC : number +>num : number +>numOrC : number +} +else { + c = numOrC; // C +>c = numOrC : C +>c : C +>numOrC : C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "number") { +>typeof strOrNum !== "number" : boolean +>typeof strOrNum : string +>strOrNum : string | number + + str === strOrNum; // string +>str === strOrNum : boolean +>str : string +>strOrNum : string +} +else { + num = strOrNum; // number +>num = strOrNum : number +>num : number +>strOrNum : number +} +if (typeof strOrBool !== "number") { +>typeof strOrBool !== "number" : boolean +>typeof strOrBool : string +>strOrBool : string | boolean + + var y: string | boolean = strOrBool; // string | boolean +>y : string | boolean +>strOrBool : string | boolean +} +else { + num = strOrBool; // number +>num = strOrBool : number +>num : number +>strOrBool : number +} +if (typeof numOrBool !== "number") { +>typeof numOrBool !== "number" : boolean +>typeof numOrBool : string +>numOrBool : number | boolean + + var x: number | boolean = numOrBool; // number | boolean +>x : number | boolean +>numOrBool : boolean +} +else { + num = numOrBool; // number +>num = numOrBool : number +>num : number +>numOrBool : number +} +if (typeof strOrNumOrBool !== "number") { +>typeof strOrNumOrBool !== "number" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean + + strOrBool = strOrNumOrBool; // string | boolean +>strOrBool = strOrNumOrBool : string | boolean +>strOrBool : string | boolean +>strOrNumOrBool : string | boolean +} +else { + num = strOrNumOrBool; // number +>num = strOrNumOrBool : number +>num : number +>strOrNumOrBool : number +} +if (typeof numOrC !== "number") { +>typeof numOrC !== "number" : boolean +>typeof numOrC : string +>numOrC : number | C + + c = numOrC; // C +>c = numOrC : C +>c : C +>numOrC : C +} +else { + num = numOrC; // number +>num = numOrC : number +>num : number +>numOrC : number +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.js b/tests/baselines/reference/typeGuardOfFormTypeOfOther.js new file mode 100644 index 00000000000..155b2b9ce57 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.js @@ -0,0 +1,148 @@ +//// [typeGuardOfFormTypeOfOther.ts] +class C { private p: string }; + +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrNumOrBool: string | number | boolean; +var strOrC: string | C; +var numOrC: number | C; +var boolOrC: boolean | C; +var emptyObj: {}; +var c: C; + +// A type guard of the form typeof x === s, +// where s is a string literal with any value but 'string', 'number' or 'boolean', +// - when true, removes the primitive types string, number, and boolean from the type of x, or +// - when false, has no effect on the type of x. + +if (typeof strOrNumOrBool === "Object") { + emptyObj = strOrNumOrBool; // {} +} +else { + var r1: string | number | boolean = strOrNumOrBool; // string | number | boolean +} +if (typeof strOrC === "Object") { + c = strOrC; // C +} +else { + var r2: string | C = strOrC; // string | C +} +if (typeof numOrC === "Object") { + c = numOrC; // C +} +else { + var r3: number | C = numOrC; // number | C +} +if (typeof boolOrC === "Object") { + c = boolOrC; // C +} +else { + var r4: boolean | C = boolOrC; // boolean | C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNumOrBool !== "Object") { + var r1: string | number | boolean = strOrNumOrBool; // string | number | boolean +} +else { + emptyObj = strOrNumOrBool; // {} +} +if (typeof strOrC !== "Object") { + var r2: string | C = strOrC; // string | C +} +else { + c = strOrC; // C +} +if (typeof numOrC !== "Object") { + var r3: number | C = numOrC; // number | C +} +else { + c = numOrC; // C +} +if (typeof boolOrC !== "Object") { + var r4: boolean | C = boolOrC; // boolean | C +} +else { + c = boolOrC; // C +} + +//// [typeGuardOfFormTypeOfOther.js] +var C = (function () { + function C() { + } + return C; +})(); +; +var str; +var bool; +var num; +var strOrNum; +var strOrBool; +var numOrBool; +var strOrNumOrBool; +var strOrC; +var numOrC; +var boolOrC; +var emptyObj; +var c; +// A type guard of the form typeof x === s, +// where s is a string literal with any value but 'string', 'number' or 'boolean', +// - when true, removes the primitive types string, number, and boolean from the type of x, or +// - when false, has no effect on the type of x. +if (typeof strOrNumOrBool === "Object") { + emptyObj = strOrNumOrBool; // {} +} +else { + var r1 = strOrNumOrBool; // string | number | boolean +} +if (typeof strOrC === "Object") { + c = strOrC; // C +} +else { + var r2 = strOrC; // string | C +} +if (typeof numOrC === "Object") { + c = numOrC; // C +} +else { + var r3 = numOrC; // number | C +} +if (typeof boolOrC === "Object") { + c = boolOrC; // C +} +else { + var r4 = boolOrC; // boolean | C +} +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNumOrBool !== "Object") { + var r1 = strOrNumOrBool; // string | number | boolean +} +else { + emptyObj = strOrNumOrBool; // {} +} +if (typeof strOrC !== "Object") { + var r2 = strOrC; // string | C +} +else { + c = strOrC; // C +} +if (typeof numOrC !== "Object") { + var r3 = numOrC; // number | C +} +else { + c = numOrC; // C +} +if (typeof boolOrC !== "Object") { + var r4 = boolOrC; // boolean | C +} +else { + c = boolOrC; // C +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.types b/tests/baselines/reference/typeGuardOfFormTypeOfOther.types new file mode 100644 index 00000000000..729c255b147 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.types @@ -0,0 +1,180 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts === +class C { private p: string }; +>C : C +>p : string + +var str: string; +>str : string + +var bool: boolean; +>bool : boolean + +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var strOrBool: string | boolean; +>strOrBool : string | boolean + +var numOrBool: number | boolean +>numOrBool : number | boolean + +var strOrNumOrBool: string | number | boolean; +>strOrNumOrBool : string | number | boolean + +var strOrC: string | C; +>strOrC : string | C +>C : C + +var numOrC: number | C; +>numOrC : number | C +>C : C + +var boolOrC: boolean | C; +>boolOrC : boolean | C +>C : C + +var emptyObj: {}; +>emptyObj : {} + +var c: C; +>c : C +>C : C + +// A type guard of the form typeof x === s, +// where s is a string literal with any value but 'string', 'number' or 'boolean', +// - when true, removes the primitive types string, number, and boolean from the type of x, or +// - when false, has no effect on the type of x. + +if (typeof strOrNumOrBool === "Object") { +>typeof strOrNumOrBool === "Object" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean + + emptyObj = strOrNumOrBool; // {} +>emptyObj = strOrNumOrBool : {} +>emptyObj : {} +>strOrNumOrBool : {} +} +else { + var r1: string | number | boolean = strOrNumOrBool; // string | number | boolean +>r1 : string | number | boolean +>strOrNumOrBool : string | number | boolean +} +if (typeof strOrC === "Object") { +>typeof strOrC === "Object" : boolean +>typeof strOrC : string +>strOrC : string | C + + c = strOrC; // C +>c = strOrC : C +>c : C +>strOrC : C +} +else { + var r2: string | C = strOrC; // string | C +>r2 : string | C +>C : C +>strOrC : string | C +} +if (typeof numOrC === "Object") { +>typeof numOrC === "Object" : boolean +>typeof numOrC : string +>numOrC : number | C + + c = numOrC; // C +>c = numOrC : C +>c : C +>numOrC : C +} +else { + var r3: number | C = numOrC; // number | C +>r3 : number | C +>C : C +>numOrC : number | C +} +if (typeof boolOrC === "Object") { +>typeof boolOrC === "Object" : boolean +>typeof boolOrC : string +>boolOrC : boolean | C + + c = boolOrC; // C +>c = boolOrC : C +>c : C +>boolOrC : C +} +else { + var r4: boolean | C = boolOrC; // boolean | C +>r4 : boolean | C +>C : C +>boolOrC : boolean | C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNumOrBool !== "Object") { +>typeof strOrNumOrBool !== "Object" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean + + var r1: string | number | boolean = strOrNumOrBool; // string | number | boolean +>r1 : string | number | boolean +>strOrNumOrBool : string | number | boolean +} +else { + emptyObj = strOrNumOrBool; // {} +>emptyObj = strOrNumOrBool : {} +>emptyObj : {} +>strOrNumOrBool : {} +} +if (typeof strOrC !== "Object") { +>typeof strOrC !== "Object" : boolean +>typeof strOrC : string +>strOrC : string | C + + var r2: string | C = strOrC; // string | C +>r2 : string | C +>C : C +>strOrC : string | C +} +else { + c = strOrC; // C +>c = strOrC : C +>c : C +>strOrC : C +} +if (typeof numOrC !== "Object") { +>typeof numOrC !== "Object" : boolean +>typeof numOrC : string +>numOrC : number | C + + var r3: number | C = numOrC; // number | C +>r3 : number | C +>C : C +>numOrC : number | C +} +else { + c = numOrC; // C +>c = numOrC : C +>c : C +>numOrC : C +} +if (typeof boolOrC !== "Object") { +>typeof boolOrC !== "Object" : boolean +>typeof boolOrC : string +>boolOrC : boolean | C + + var r4: boolean | C = boolOrC; // boolean | C +>r4 : boolean | C +>C : C +>boolOrC : boolean | C +} +else { + c = boolOrC; // C +>c = boolOrC : C +>c : C +>boolOrC : C +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfString.js b/tests/baselines/reference/typeGuardOfFormTypeOfString.js new file mode 100644 index 00000000000..311f499e171 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfString.js @@ -0,0 +1,169 @@ +//// [typeGuardOfFormTypeOfString.ts] +class C { private p: string }; + +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrNumOrBool: string | number | boolean; +var strOrC: string | C; +var numOrC: number | C; +var boolOrC: boolean | C; +var c: C; + +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "string") { + str = strOrNum; // string +} +else { + num === strOrNum; // number +} +if (typeof strOrBool === "string") { + str = strOrBool; // string +} +else { + bool = strOrBool; // boolean +} +if (typeof numOrBool === "string") { + str = numOrBool; // string +} +else { + var x : number | boolean = numOrBool; // number | boolean +} +if (typeof strOrNumOrBool === "string") { + str = strOrNumOrBool; // string +} +else { + numOrBool = strOrNumOrBool; // number | boolean +} +if (typeof strOrC === "string") { + str = strOrC; // string +} +else { + c = strOrC; // C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "string") { + num === strOrNum; // number +} +else { + str = strOrNum; // string +} +if (typeof strOrBool !== "string") { + bool = strOrBool; // boolean +} +else { + str = strOrBool; // string +} +if (typeof numOrBool !== "string") { + var x: number | boolean = numOrBool; // number | boolean +} +else { + str = numOrBool; // string +} +if (typeof strOrNumOrBool !== "string") { + numOrBool = strOrNumOrBool; // number | boolean +} +else { + str = strOrNumOrBool; // string +} +if (typeof strOrC !== "string") { + c = strOrC; // C +} +else { + str = strOrC; // string +} + +//// [typeGuardOfFormTypeOfString.js] +var C = (function () { + function C() { + } + return C; +})(); +; +var str; +var bool; +var num; +var strOrNum; +var strOrBool; +var numOrBool; +var strOrNumOrBool; +var strOrC; +var numOrC; +var boolOrC; +var c; +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "string") { + str = strOrNum; // string +} +else { + num === strOrNum; // number +} +if (typeof strOrBool === "string") { + str = strOrBool; // string +} +else { + bool = strOrBool; // boolean +} +if (typeof numOrBool === "string") { + str = numOrBool; // string +} +else { + var x = numOrBool; // number | boolean +} +if (typeof strOrNumOrBool === "string") { + str = strOrNumOrBool; // string +} +else { + numOrBool = strOrNumOrBool; // number | boolean +} +if (typeof strOrC === "string") { + str = strOrC; // string +} +else { + c = strOrC; // C +} +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "string") { + num === strOrNum; // number +} +else { + str = strOrNum; // string +} +if (typeof strOrBool !== "string") { + bool = strOrBool; // boolean +} +else { + str = strOrBool; // string +} +if (typeof numOrBool !== "string") { + var x = numOrBool; // number | boolean +} +else { + str = numOrBool; // string +} +if (typeof strOrNumOrBool !== "string") { + numOrBool = strOrNumOrBool; // number | boolean +} +else { + str = strOrNumOrBool; // string +} +if (typeof strOrC !== "string") { + c = strOrC; // C +} +else { + str = strOrC; // string +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfString.types b/tests/baselines/reference/typeGuardOfFormTypeOfString.types new file mode 100644 index 00000000000..e6d90b74c66 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfString.types @@ -0,0 +1,208 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfString.ts === +class C { private p: string }; +>C : C +>p : string + +var str: string; +>str : string + +var bool: boolean; +>bool : boolean + +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var strOrBool: string | boolean; +>strOrBool : string | boolean + +var numOrBool: number | boolean +>numOrBool : number | boolean + +var strOrNumOrBool: string | number | boolean; +>strOrNumOrBool : string | number | boolean + +var strOrC: string | C; +>strOrC : string | C +>C : C + +var numOrC: number | C; +>numOrC : number | C +>C : C + +var boolOrC: boolean | C; +>boolOrC : boolean | C +>C : C + +var c: C; +>c : C +>C : C + +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "string") { +>typeof strOrNum === "string" : boolean +>typeof strOrNum : string +>strOrNum : string | number + + str = strOrNum; // string +>str = strOrNum : string +>str : string +>strOrNum : string +} +else { + num === strOrNum; // number +>num === strOrNum : boolean +>num : number +>strOrNum : number +} +if (typeof strOrBool === "string") { +>typeof strOrBool === "string" : boolean +>typeof strOrBool : string +>strOrBool : string | boolean + + str = strOrBool; // string +>str = strOrBool : string +>str : string +>strOrBool : string +} +else { + bool = strOrBool; // boolean +>bool = strOrBool : boolean +>bool : boolean +>strOrBool : boolean +} +if (typeof numOrBool === "string") { +>typeof numOrBool === "string" : boolean +>typeof numOrBool : string +>numOrBool : number | boolean + + str = numOrBool; // string +>str = numOrBool : string +>str : string +>numOrBool : string +} +else { + var x : number | boolean = numOrBool; // number | boolean +>x : number | boolean +>numOrBool : number | boolean +} +if (typeof strOrNumOrBool === "string") { +>typeof strOrNumOrBool === "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean + + str = strOrNumOrBool; // string +>str = strOrNumOrBool : string +>str : string +>strOrNumOrBool : string +} +else { + numOrBool = strOrNumOrBool; // number | boolean +>numOrBool = strOrNumOrBool : number | boolean +>numOrBool : number | boolean +>strOrNumOrBool : number | boolean +} +if (typeof strOrC === "string") { +>typeof strOrC === "string" : boolean +>typeof strOrC : string +>strOrC : string | C + + str = strOrC; // string +>str = strOrC : string +>str : string +>strOrC : string +} +else { + c = strOrC; // C +>c = strOrC : C +>c : C +>strOrC : C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "string") { +>typeof strOrNum !== "string" : boolean +>typeof strOrNum : string +>strOrNum : string | number + + num === strOrNum; // number +>num === strOrNum : boolean +>num : number +>strOrNum : number +} +else { + str = strOrNum; // string +>str = strOrNum : string +>str : string +>strOrNum : string +} +if (typeof strOrBool !== "string") { +>typeof strOrBool !== "string" : boolean +>typeof strOrBool : string +>strOrBool : string | boolean + + bool = strOrBool; // boolean +>bool = strOrBool : boolean +>bool : boolean +>strOrBool : boolean +} +else { + str = strOrBool; // string +>str = strOrBool : string +>str : string +>strOrBool : string +} +if (typeof numOrBool !== "string") { +>typeof numOrBool !== "string" : boolean +>typeof numOrBool : string +>numOrBool : number | boolean + + var x: number | boolean = numOrBool; // number | boolean +>x : number | boolean +>numOrBool : number | boolean +} +else { + str = numOrBool; // string +>str = numOrBool : string +>str : string +>numOrBool : string +} +if (typeof strOrNumOrBool !== "string") { +>typeof strOrNumOrBool !== "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean + + numOrBool = strOrNumOrBool; // number | boolean +>numOrBool = strOrNumOrBool : number | boolean +>numOrBool : number | boolean +>strOrNumOrBool : number | boolean +} +else { + str = strOrNumOrBool; // string +>str = strOrNumOrBool : string +>str : string +>strOrNumOrBool : string +} +if (typeof strOrC !== "string") { +>typeof strOrC !== "string" : boolean +>typeof strOrC : string +>strOrC : string | C + + c = strOrC; // C +>c = strOrC : C +>c : C +>strOrC : C +} +else { + str = strOrC; // string +>str = strOrC : string +>str : string +>strOrC : string +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfBoolean.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfBoolean.ts new file mode 100644 index 00000000000..dc6166852ae --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfBoolean.ts @@ -0,0 +1,82 @@ +class C { private p: string }; + +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrNumOrBool: string | number | boolean; +var strOrC: string | C; +var numOrC: number | C; +var boolOrC: boolean | C; +var c: C; + +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "boolean") { + bool = strOrNum; // boolean +} +else { + var z: string | number = strOrNum; // string | number +} +if (typeof strOrBool === "boolean") { + bool = strOrBool; // boolean +} +else { + str = strOrBool; // string +} +if (typeof numOrBool === "boolean") { + bool = numOrBool; // boolean +} +else { + num = numOrBool; // number +} +if (typeof strOrNumOrBool === "boolean") { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +if (typeof boolOrC === "boolean") { + bool = boolOrC; // boolean +} +else { + c = boolOrC; // C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "boolean") { + var z: string | number = strOrNum; // string | number +} +else { + bool = strOrNum; // boolean +} +if (typeof strOrBool !== "boolean") { + str = strOrBool; // string +} +else { + bool = strOrBool; // boolean +} +if (typeof numOrBool !== "boolean") { + num = numOrBool; // number +} +else { + bool = numOrBool; // boolean +} +if (typeof strOrNumOrBool !== "boolean") { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +if (typeof boolOrC !== "boolean") { + c = boolOrC; // C +} +else { + bool = boolOrC; // boolean +} \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNumber.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNumber.ts new file mode 100644 index 00000000000..b05e5a3a002 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNumber.ts @@ -0,0 +1,82 @@ +class C { private p: string }; + +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrNumOrBool: string | number | boolean; +var strOrC: string | C; +var numOrC: number | C; +var boolOrC: boolean | C; +var c: C; + +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "number") { + num = strOrNum; // number +} +else { + str === strOrNum; // string +} +if (typeof strOrBool === "number") { + num = strOrBool; // number +} +else { + var y: string | boolean = strOrBool; // string | boolean +} +if (typeof numOrBool === "number") { + num = numOrBool; // number +} +else { + var x: number | boolean = numOrBool; // number | boolean +} +if (typeof strOrNumOrBool === "number") { + num = strOrNumOrBool; // number +} +else { + strOrBool = strOrNumOrBool; // string | boolean +} +if (typeof numOrC === "number") { + num = numOrC; // number +} +else { + c = numOrC; // C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "number") { + str === strOrNum; // string +} +else { + num = strOrNum; // number +} +if (typeof strOrBool !== "number") { + var y: string | boolean = strOrBool; // string | boolean +} +else { + num = strOrBool; // number +} +if (typeof numOrBool !== "number") { + var x: number | boolean = numOrBool; // number | boolean +} +else { + num = numOrBool; // number +} +if (typeof strOrNumOrBool !== "number") { + strOrBool = strOrNumOrBool; // string | boolean +} +else { + num = strOrNumOrBool; // number +} +if (typeof numOrC !== "number") { + c = numOrC; // C +} +else { + num = numOrC; // number +} \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts new file mode 100644 index 00000000000..18109890c27 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts @@ -0,0 +1,72 @@ +class C { private p: string }; + +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrNumOrBool: string | number | boolean; +var strOrC: string | C; +var numOrC: number | C; +var boolOrC: boolean | C; +var emptyObj: {}; +var c: C; + +// A type guard of the form typeof x === s, +// where s is a string literal with any value but 'string', 'number' or 'boolean', +// - when true, removes the primitive types string, number, and boolean from the type of x, or +// - when false, has no effect on the type of x. + +if (typeof strOrNumOrBool === "Object") { + emptyObj = strOrNumOrBool; // {} +} +else { + var r1: string | number | boolean = strOrNumOrBool; // string | number | boolean +} +if (typeof strOrC === "Object") { + c = strOrC; // C +} +else { + var r2: string | C = strOrC; // string | C +} +if (typeof numOrC === "Object") { + c = numOrC; // C +} +else { + var r3: number | C = numOrC; // number | C +} +if (typeof boolOrC === "Object") { + c = boolOrC; // C +} +else { + var r4: boolean | C = boolOrC; // boolean | C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNumOrBool !== "Object") { + var r1: string | number | boolean = strOrNumOrBool; // string | number | boolean +} +else { + emptyObj = strOrNumOrBool; // {} +} +if (typeof strOrC !== "Object") { + var r2: string | C = strOrC; // string | C +} +else { + c = strOrC; // C +} +if (typeof numOrC !== "Object") { + var r3: number | C = numOrC; // number | C +} +else { + c = numOrC; // C +} +if (typeof boolOrC !== "Object") { + var r4: boolean | C = boolOrC; // boolean | C +} +else { + c = boolOrC; // C +} \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfString.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfString.ts new file mode 100644 index 00000000000..8c6bbdaf907 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfString.ts @@ -0,0 +1,82 @@ +class C { private p: string }; + +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrNumOrBool: string | number | boolean; +var strOrC: string | C; +var numOrC: number | C; +var boolOrC: boolean | C; +var c: C; + +// A type guard of the form typeof x === s, +// where s is a string literal with the value 'string', 'number', or 'boolean', +// - when true, narrows the type of x to the given primitive type, or +// - when false, removes the primitive type from the type of x. +if (typeof strOrNum === "string") { + str = strOrNum; // string +} +else { + num === strOrNum; // number +} +if (typeof strOrBool === "string") { + str = strOrBool; // string +} +else { + bool = strOrBool; // boolean +} +if (typeof numOrBool === "string") { + str = numOrBool; // string +} +else { + var x : number | boolean = numOrBool; // number | boolean +} +if (typeof strOrNumOrBool === "string") { + str = strOrNumOrBool; // string +} +else { + numOrBool = strOrNumOrBool; // number | boolean +} +if (typeof strOrC === "string") { + str = strOrC; // string +} +else { + c = strOrC; // C +} + +// A type guard of the form typeof x !== s, where s is a string literal, +// - when true, narrows the type of x by typeof x === s when false, or +// - when false, narrows the type of x by typeof x === s when true. +if (typeof strOrNum !== "string") { + num === strOrNum; // number +} +else { + str = strOrNum; // string +} +if (typeof strOrBool !== "string") { + bool = strOrBool; // boolean +} +else { + str = strOrBool; // string +} +if (typeof numOrBool !== "string") { + var x: number | boolean = numOrBool; // number | boolean +} +else { + str = numOrBool; // string +} +if (typeof strOrNumOrBool !== "string") { + numOrBool = strOrNumOrBool; // number | boolean +} +else { + str = strOrNumOrBool; // string +} +if (typeof strOrC !== "string") { + c = strOrC; // C +} +else { + str = strOrC; // string +} \ No newline at end of file From 486d37ec901a9af14994785969f67ed2e28230d2 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 6 Nov 2014 12:59:42 -0800 Subject: [PATCH 049/154] =?UTF-8?q?TypeGuard=20of=20for=20expr1=20&&=20exp?= =?UTF-8?q?r2=20=E2=80=A2=09A=20type=20guard=20of=20the=20form=20expr1=20&?= =?UTF-8?q?&=20expr2=20o=09when=20true,=20narrows=20the=20type=20of=20x=20?= =?UTF-8?q?by=20expr1=20when=20true=20and=20then=20by=20expr2=20when=20tru?= =?UTF-8?q?e,=20or=20o=09when=20false,=20narrows=20the=20type=20of=20x=20t?= =?UTF-8?q?o=20T1=20|=20T2,=20where=20T1=20is=20the=20type=20of=20x=20narr?= =?UTF-8?q?owed=20by=20expr1=20when=20false,=20and=20T2=20is=20the=20type?= =?UTF-8?q?=20of=20x=20narrowed=20by=20expr1=20when=20true=20and=20then=20?= =?UTF-8?q?by=20expr2=20when=20false.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reference/typeGuardOfFormExpr1AndExpr2.js | 97 ++++++++++++ .../typeGuardOfFormExpr1AndExpr2.types | 140 ++++++++++++++++++ .../typeGuardOfFormExpr1AndExpr2.ts | 46 ++++++ 3 files changed, 283 insertions(+) create mode 100644 tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.js create mode 100644 tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1AndExpr2.ts diff --git a/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.js b/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.js new file mode 100644 index 00000000000..42bab3cdbe7 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.js @@ -0,0 +1,97 @@ +//// [typeGuardOfFormExpr1AndExpr2.ts] +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrNumOrBool: string | number | boolean; +var numOrBool: number | boolean; +class C { private p; } +var c: C; +var cOrBool: C| boolean; +var strOrNumOrBoolOrC: string | number | boolean | C; + +// A type guard of the form expr1 && expr2 +// - when true, narrows the type of x by expr1 when true and then by expr2 when true, or +// - when false, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when +// false, and T2 is the type of x narrowed by expr1 when true and then by expr2 when false. + +// (typeguard1 && typeguard2) +if (typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number") { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +// (typeguard1 && typeguard2 && typeguard3) +if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBoolOrC !== "boolean") { + c = strOrNumOrBoolOrC; // C +} +else { + strOrNumOrBool = strOrNumOrBoolOrC; // string | number | boolean +} +// (typeguard1 && typeguard2 && typeguard11(onAnotherType)) +if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBool === "boolean") { + cOrBool = strOrNumOrBoolOrC; // C | boolean + bool = strOrNumOrBool; // boolean +} +else { + var r1: string | number | boolean | C = strOrNumOrBoolOrC; // string | number | boolean | C + var r2: string | number | boolean = strOrNumOrBool; +} +// (typeguard1) && simpleExpr +if (typeof strOrNumOrBool !== "string" && numOrBool !== strOrNumOrBool) { + numOrBool = strOrNumOrBool; // number | boolean +} +else { + var r3: string | number | boolean = strOrNumOrBool; // string | number | boolean +} + +//// [typeGuardOfFormExpr1AndExpr2.js] +var str; +var bool; +var num; +var strOrNum; +var strOrNumOrBool; +var numOrBool; +var C = (function () { + function C() { + } + return C; +})(); +var c; +var cOrBool; +var strOrNumOrBoolOrC; +// A type guard of the form expr1 && expr2 +// - when true, narrows the type of x by expr1 when true and then by expr2 when true, or +// - when false, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when +// false, and T2 is the type of x narrowed by expr1 when true and then by expr2 when false. +// (typeguard1 && typeguard2) +if (typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number") { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +// (typeguard1 && typeguard2 && typeguard3) +if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBoolOrC !== "boolean") { + c = strOrNumOrBoolOrC; // C +} +else { + strOrNumOrBool = strOrNumOrBoolOrC; // string | number | boolean +} +// (typeguard1 && typeguard2 && typeguard11(onAnotherType)) +if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBool === "boolean") { + cOrBool = strOrNumOrBoolOrC; // C | boolean + bool = strOrNumOrBool; // boolean +} +else { + var r1 = strOrNumOrBoolOrC; // string | number | boolean | C + var r2 = strOrNumOrBool; +} +// (typeguard1) && simpleExpr +if (typeof strOrNumOrBool !== "string" && numOrBool !== strOrNumOrBool) { + numOrBool = strOrNumOrBool; // number | boolean +} +else { + var r3 = strOrNumOrBool; // string | number | boolean +} diff --git a/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types b/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types new file mode 100644 index 00000000000..f599f1f7ddf --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types @@ -0,0 +1,140 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1AndExpr2.ts === +var str: string; +>str : string + +var bool: boolean; +>bool : boolean + +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var strOrNumOrBool: string | number | boolean; +>strOrNumOrBool : string | number | boolean + +var numOrBool: number | boolean; +>numOrBool : number | boolean + +class C { private p; } +>C : C +>p : any + +var c: C; +>c : C +>C : C + +var cOrBool: C| boolean; +>cOrBool : boolean | C +>C : C + +var strOrNumOrBoolOrC: string | number | boolean | C; +>strOrNumOrBoolOrC : string | number | boolean | C +>C : C + +// A type guard of the form expr1 && expr2 +// - when true, narrows the type of x by expr1 when true and then by expr2 when true, or +// - when false, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when +// false, and T2 is the type of x narrowed by expr1 when true and then by expr2 when false. + +// (typeguard1 && typeguard2) +if (typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number") { +>typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number" : boolean +>typeof strOrNumOrBool !== "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean +>typeof strOrNumOrBool !== "number" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : number | boolean + + bool = strOrNumOrBool; // boolean +>bool = strOrNumOrBool : boolean +>bool : boolean +>strOrNumOrBool : boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +>strOrNum = strOrNumOrBool : string | number +>strOrNum : string | number +>strOrNumOrBool : string | number +} +// (typeguard1 && typeguard2 && typeguard3) +if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBoolOrC !== "boolean") { +>typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBoolOrC !== "boolean" : boolean +>typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" : boolean +>typeof strOrNumOrBoolOrC !== "string" : boolean +>typeof strOrNumOrBoolOrC : string +>strOrNumOrBoolOrC : string | number | boolean | C +>typeof strOrNumOrBoolOrC !== "number" : boolean +>typeof strOrNumOrBoolOrC : string +>strOrNumOrBoolOrC : number | boolean | C +>typeof strOrNumOrBoolOrC !== "boolean" : boolean +>typeof strOrNumOrBoolOrC : string +>strOrNumOrBoolOrC : boolean | C + + c = strOrNumOrBoolOrC; // C +>c = strOrNumOrBoolOrC : C +>c : C +>strOrNumOrBoolOrC : C +} +else { + strOrNumOrBool = strOrNumOrBoolOrC; // string | number | boolean +>strOrNumOrBool = strOrNumOrBoolOrC : string | number | boolean +>strOrNumOrBool : string | number | boolean +>strOrNumOrBoolOrC : string | number | boolean +} +// (typeguard1 && typeguard2 && typeguard11(onAnotherType)) +if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBool === "boolean") { +>typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBool === "boolean" : boolean +>typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" : boolean +>typeof strOrNumOrBoolOrC !== "string" : boolean +>typeof strOrNumOrBoolOrC : string +>strOrNumOrBoolOrC : string | number | boolean | C +>typeof strOrNumOrBoolOrC !== "number" : boolean +>typeof strOrNumOrBoolOrC : string +>strOrNumOrBoolOrC : number | boolean | C +>typeof strOrNumOrBool === "boolean" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean + + cOrBool = strOrNumOrBoolOrC; // C | boolean +>cOrBool = strOrNumOrBoolOrC : boolean | C +>cOrBool : boolean | C +>strOrNumOrBoolOrC : boolean | C + + bool = strOrNumOrBool; // boolean +>bool = strOrNumOrBool : boolean +>bool : boolean +>strOrNumOrBool : boolean +} +else { + var r1: string | number | boolean | C = strOrNumOrBoolOrC; // string | number | boolean | C +>r1 : string | number | boolean | C +>C : C +>strOrNumOrBoolOrC : string | number | boolean | C + + var r2: string | number | boolean = strOrNumOrBool; +>r2 : string | number | boolean +>strOrNumOrBool : string | number | boolean +} +// (typeguard1) && simpleExpr +if (typeof strOrNumOrBool !== "string" && numOrBool !== strOrNumOrBool) { +>typeof strOrNumOrBool !== "string" && numOrBool !== strOrNumOrBool : boolean +>typeof strOrNumOrBool !== "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean +>numOrBool !== strOrNumOrBool : boolean +>numOrBool : number | boolean +>strOrNumOrBool : number | boolean + + numOrBool = strOrNumOrBool; // number | boolean +>numOrBool = strOrNumOrBool : number | boolean +>numOrBool : number | boolean +>strOrNumOrBool : number | boolean +} +else { + var r3: string | number | boolean = strOrNumOrBool; // string | number | boolean +>r3 : string | number | boolean +>strOrNumOrBool : string | number | boolean +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1AndExpr2.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1AndExpr2.ts new file mode 100644 index 00000000000..1ed8e6ebb04 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1AndExpr2.ts @@ -0,0 +1,46 @@ +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrNumOrBool: string | number | boolean; +var numOrBool: number | boolean; +class C { private p; } +var c: C; +var cOrBool: C| boolean; +var strOrNumOrBoolOrC: string | number | boolean | C; + +// A type guard of the form expr1 && expr2 +// - when true, narrows the type of x by expr1 when true and then by expr2 when true, or +// - when false, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when +// false, and T2 is the type of x narrowed by expr1 when true and then by expr2 when false. + +// (typeguard1 && typeguard2) +if (typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number") { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +// (typeguard1 && typeguard2 && typeguard3) +if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBoolOrC !== "boolean") { + c = strOrNumOrBoolOrC; // C +} +else { + strOrNumOrBool = strOrNumOrBoolOrC; // string | number | boolean +} +// (typeguard1 && typeguard2 && typeguard11(onAnotherType)) +if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBool === "boolean") { + cOrBool = strOrNumOrBoolOrC; // C | boolean + bool = strOrNumOrBool; // boolean +} +else { + var r1: string | number | boolean | C = strOrNumOrBoolOrC; // string | number | boolean | C + var r2: string | number | boolean = strOrNumOrBool; +} +// (typeguard1) && simpleExpr +if (typeof strOrNumOrBool !== "string" && numOrBool !== strOrNumOrBool) { + numOrBool = strOrNumOrBool; // number | boolean +} +else { + var r3: string | number | boolean = strOrNumOrBool; // string | number | boolean +} \ No newline at end of file From c9a03dc65923eb57ae258096cc0d40922cbc0236 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 6 Nov 2014 13:00:20 -0800 Subject: [PATCH 050/154] =?UTF-8?q?Typeguards=20of=20form=20expr1=20||=20e?= =?UTF-8?q?xpr2=20=E2=80=A2=09A=20type=20guard=20of=20the=20form=20expr1?= =?UTF-8?q?=20||=20expr2=20o=09when=20true,=20narrows=20the=20type=20of=20?= =?UTF-8?q?x=20to=20T1=20|=20T2,=20where=20T1=20is=20the=20type=20of=20x?= =?UTF-8?q?=20narrowed=20by=20expr1=20when=20true,=20and=20T2=20is=20the?= =?UTF-8?q?=20type=20of=20x=20narrowed=20by=20expr1=20when=20false=20and?= =?UTF-8?q?=20then=20by=20expr2=20when=20true,=20or=20o=09when=20false,=20?= =?UTF-8?q?narrows=20the=20type=20of=20x=20by=20expr1=20when=20false=20and?= =?UTF-8?q?=20then=20by=20expr2=20when=20false.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reference/typeGuardOfFormExpr1OrExpr2.js | 97 ++++++++++++ .../typeGuardOfFormExpr1OrExpr2.types | 140 ++++++++++++++++++ .../typeGuards/typeGuardOfFormExpr1OrExpr2.ts | 46 ++++++ 3 files changed, 283 insertions(+) create mode 100644 tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.js create mode 100644 tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1OrExpr2.ts diff --git a/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.js b/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.js new file mode 100644 index 00000000000..7e38232a738 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.js @@ -0,0 +1,97 @@ +//// [typeGuardOfFormExpr1OrExpr2.ts] +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrNumOrBool: string | number | boolean; +var numOrBool: number | boolean; +class C { private p; } +var c: C; +var cOrBool: C| boolean; +var strOrNumOrBoolOrC: string | number | boolean | C; + +// A type guard of the form expr1 || expr2 +// - when true, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when true, +// and T2 is the type of x narrowed by expr1 when false and then by expr2 when true, or +// - when false, narrows the type of x by expr1 when false and then by expr2 when false. + +// (typeguard1 || typeguard2) +if (typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number") { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +// (typeguard1 || typeguard2 || typeguard3) +if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBoolOrC === "boolean") { + strOrNumOrBool = strOrNumOrBoolOrC; // string | number | boolean +} +else { + c = strOrNumOrBoolOrC; // C +} +// (typeguard1 || typeguard2 || typeguard11(onAnotherType)) +if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBool !== "boolean") { + var r1: string | number | boolean | C = strOrNumOrBoolOrC; // string | number | boolean | C + var r2: string | number | boolean = strOrNumOrBool; +} +else { + cOrBool = strOrNumOrBoolOrC; // C | boolean + bool = strOrNumOrBool; // boolean +} +// (typeguard1) || simpleExpr +if (typeof strOrNumOrBool === "string" || numOrBool !== strOrNumOrBool) { + var r3: string | number | boolean = strOrNumOrBool; // string | number | boolean +} +else { + numOrBool = strOrNumOrBool; // number | boolean +} + +//// [typeGuardOfFormExpr1OrExpr2.js] +var str; +var bool; +var num; +var strOrNum; +var strOrNumOrBool; +var numOrBool; +var C = (function () { + function C() { + } + return C; +})(); +var c; +var cOrBool; +var strOrNumOrBoolOrC; +// A type guard of the form expr1 || expr2 +// - when true, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when true, +// and T2 is the type of x narrowed by expr1 when false and then by expr2 when true, or +// - when false, narrows the type of x by expr1 when false and then by expr2 when false. +// (typeguard1 || typeguard2) +if (typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number") { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +// (typeguard1 || typeguard2 || typeguard3) +if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBoolOrC === "boolean") { + strOrNumOrBool = strOrNumOrBoolOrC; // string | number | boolean +} +else { + c = strOrNumOrBoolOrC; // C +} +// (typeguard1 || typeguard2 || typeguard11(onAnotherType)) +if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBool !== "boolean") { + var r1 = strOrNumOrBoolOrC; // string | number | boolean | C + var r2 = strOrNumOrBool; +} +else { + cOrBool = strOrNumOrBoolOrC; // C | boolean + bool = strOrNumOrBool; // boolean +} +// (typeguard1) || simpleExpr +if (typeof strOrNumOrBool === "string" || numOrBool !== strOrNumOrBool) { + var r3 = strOrNumOrBool; // string | number | boolean +} +else { + numOrBool = strOrNumOrBool; // number | boolean +} diff --git a/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types b/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types new file mode 100644 index 00000000000..95152a589e5 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types @@ -0,0 +1,140 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1OrExpr2.ts === +var str: string; +>str : string + +var bool: boolean; +>bool : boolean + +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var strOrNumOrBool: string | number | boolean; +>strOrNumOrBool : string | number | boolean + +var numOrBool: number | boolean; +>numOrBool : number | boolean + +class C { private p; } +>C : C +>p : any + +var c: C; +>c : C +>C : C + +var cOrBool: C| boolean; +>cOrBool : boolean | C +>C : C + +var strOrNumOrBoolOrC: string | number | boolean | C; +>strOrNumOrBoolOrC : string | number | boolean | C +>C : C + +// A type guard of the form expr1 || expr2 +// - when true, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when true, +// and T2 is the type of x narrowed by expr1 when false and then by expr2 when true, or +// - when false, narrows the type of x by expr1 when false and then by expr2 when false. + +// (typeguard1 || typeguard2) +if (typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number") { +>typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number" : boolean +>typeof strOrNumOrBool === "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean +>typeof strOrNumOrBool === "number" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : number | boolean + + strOrNum = strOrNumOrBool; // string | number +>strOrNum = strOrNumOrBool : string | number +>strOrNum : string | number +>strOrNumOrBool : string | number +} +else { + bool = strOrNumOrBool; // boolean +>bool = strOrNumOrBool : boolean +>bool : boolean +>strOrNumOrBool : boolean +} +// (typeguard1 || typeguard2 || typeguard3) +if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBoolOrC === "boolean") { +>typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBoolOrC === "boolean" : boolean +>typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" : boolean +>typeof strOrNumOrBoolOrC === "string" : boolean +>typeof strOrNumOrBoolOrC : string +>strOrNumOrBoolOrC : string | number | boolean | C +>typeof strOrNumOrBoolOrC === "number" : boolean +>typeof strOrNumOrBoolOrC : string +>strOrNumOrBoolOrC : number | boolean | C +>typeof strOrNumOrBoolOrC === "boolean" : boolean +>typeof strOrNumOrBoolOrC : string +>strOrNumOrBoolOrC : boolean | C + + strOrNumOrBool = strOrNumOrBoolOrC; // string | number | boolean +>strOrNumOrBool = strOrNumOrBoolOrC : string | number | boolean +>strOrNumOrBool : string | number | boolean +>strOrNumOrBoolOrC : string | number | boolean +} +else { + c = strOrNumOrBoolOrC; // C +>c = strOrNumOrBoolOrC : C +>c : C +>strOrNumOrBoolOrC : C +} +// (typeguard1 || typeguard2 || typeguard11(onAnotherType)) +if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBool !== "boolean") { +>typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBool !== "boolean" : boolean +>typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" : boolean +>typeof strOrNumOrBoolOrC === "string" : boolean +>typeof strOrNumOrBoolOrC : string +>strOrNumOrBoolOrC : string | number | boolean | C +>typeof strOrNumOrBoolOrC === "number" : boolean +>typeof strOrNumOrBoolOrC : string +>strOrNumOrBoolOrC : number | boolean | C +>typeof strOrNumOrBool !== "boolean" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean + + var r1: string | number | boolean | C = strOrNumOrBoolOrC; // string | number | boolean | C +>r1 : string | number | boolean | C +>C : C +>strOrNumOrBoolOrC : string | number | boolean | C + + var r2: string | number | boolean = strOrNumOrBool; +>r2 : string | number | boolean +>strOrNumOrBool : string | number | boolean +} +else { + cOrBool = strOrNumOrBoolOrC; // C | boolean +>cOrBool = strOrNumOrBoolOrC : boolean | C +>cOrBool : boolean | C +>strOrNumOrBoolOrC : boolean | C + + bool = strOrNumOrBool; // boolean +>bool = strOrNumOrBool : boolean +>bool : boolean +>strOrNumOrBool : boolean +} +// (typeguard1) || simpleExpr +if (typeof strOrNumOrBool === "string" || numOrBool !== strOrNumOrBool) { +>typeof strOrNumOrBool === "string" || numOrBool !== strOrNumOrBool : boolean +>typeof strOrNumOrBool === "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean +>numOrBool !== strOrNumOrBool : boolean +>numOrBool : number | boolean +>strOrNumOrBool : number | boolean + + var r3: string | number | boolean = strOrNumOrBool; // string | number | boolean +>r3 : string | number | boolean +>strOrNumOrBool : string | number | boolean +} +else { + numOrBool = strOrNumOrBool; // number | boolean +>numOrBool = strOrNumOrBool : number | boolean +>numOrBool : number | boolean +>strOrNumOrBool : number | boolean +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1OrExpr2.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1OrExpr2.ts new file mode 100644 index 00000000000..1d72f358284 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1OrExpr2.ts @@ -0,0 +1,46 @@ +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrNumOrBool: string | number | boolean; +var numOrBool: number | boolean; +class C { private p; } +var c: C; +var cOrBool: C| boolean; +var strOrNumOrBoolOrC: string | number | boolean | C; + +// A type guard of the form expr1 || expr2 +// - when true, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when true, +// and T2 is the type of x narrowed by expr1 when false and then by expr2 when true, or +// - when false, narrows the type of x by expr1 when false and then by expr2 when false. + +// (typeguard1 || typeguard2) +if (typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number") { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +// (typeguard1 || typeguard2 || typeguard3) +if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBoolOrC === "boolean") { + strOrNumOrBool = strOrNumOrBoolOrC; // string | number | boolean +} +else { + c = strOrNumOrBoolOrC; // C +} +// (typeguard1 || typeguard2 || typeguard11(onAnotherType)) +if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBool !== "boolean") { + var r1: string | number | boolean | C = strOrNumOrBoolOrC; // string | number | boolean | C + var r2: string | number | boolean = strOrNumOrBool; +} +else { + cOrBool = strOrNumOrBoolOrC; // C | boolean + bool = strOrNumOrBool; // boolean +} +// (typeguard1) || simpleExpr +if (typeof strOrNumOrBool === "string" || numOrBool !== strOrNumOrBool) { + var r3: string | number | boolean = strOrNumOrBool; // string | number | boolean +} +else { + numOrBool = strOrNumOrBool; // number | boolean +} \ No newline at end of file From 52a856029817b8bd2c812b7c7d50ae2afbc727a6 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 6 Nov 2014 13:00:44 -0800 Subject: [PATCH 051/154] =?UTF-8?q?Typeguards=20of=20form=20!expr=20?= =?UTF-8?q?=E2=80=A2=09A=20type=20guard=20of=20the=20form=20!expr=20o=09wh?= =?UTF-8?q?en=20true,=20narrows=20the=20type=20of=20x=20by=20expr=20when?= =?UTF-8?q?=20false,=20or=20o=09when=20false,=20narrows=20the=20type=20of?= =?UTF-8?q?=20x=20by=20expr=20when=20true.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reference/typeGuardOfFormNotExpr.js | 107 ++++++++++++ .../reference/typeGuardOfFormNotExpr.types | 160 ++++++++++++++++++ .../typeGuards/typeGuardOfFormNotExpr.ts | 53 ++++++ 3 files changed, 320 insertions(+) create mode 100644 tests/baselines/reference/typeGuardOfFormNotExpr.js create mode 100644 tests/baselines/reference/typeGuardOfFormNotExpr.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormNotExpr.ts diff --git a/tests/baselines/reference/typeGuardOfFormNotExpr.js b/tests/baselines/reference/typeGuardOfFormNotExpr.js new file mode 100644 index 00000000000..62a1b3ff940 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormNotExpr.js @@ -0,0 +1,107 @@ +//// [typeGuardOfFormNotExpr.ts] +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrNumOrBool: string | number | boolean; +var numOrBool: number | boolean; + +// A type guard of the form !expr +// - when true, narrows the type of x by expr when false, or +// - when false, narrows the type of x by expr when true. + +// !typeguard1 +if (!(typeof strOrNum === "string")) { + num === strOrNum; // number +} +else { + str = strOrNum; // string +} +// !(typeguard1 || typeguard2) +if (!(typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number")) { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +// !(typeguard1) || !(typeguard2) +if (!(typeof strOrNumOrBool !== "string") || !(typeof strOrNumOrBool !== "number")) { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +// !(typeguard1 && typeguard2) +if (!(typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number")) { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +// !(typeguard1) && !(typeguard2) +if (!(typeof strOrNumOrBool === "string") && !(typeof strOrNumOrBool === "number")) { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +// !(typeguard1) && simpleExpr +if (!(typeof strOrNumOrBool === "string") && numOrBool !== strOrNumOrBool) { + numOrBool = strOrNumOrBool; // number | boolean +} +else { + var r1: string | number | boolean = strOrNumOrBool; // string | number | boolean +} + +//// [typeGuardOfFormNotExpr.js] +var str; +var bool; +var num; +var strOrNum; +var strOrNumOrBool; +var numOrBool; +// A type guard of the form !expr +// - when true, narrows the type of x by expr when false, or +// - when false, narrows the type of x by expr when true. +// !typeguard1 +if (!(typeof strOrNum === "string")) { + num === strOrNum; // number +} +else { + str = strOrNum; // string +} +// !(typeguard1 || typeguard2) +if (!(typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number")) { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +// !(typeguard1) || !(typeguard2) +if (!(typeof strOrNumOrBool !== "string") || !(typeof strOrNumOrBool !== "number")) { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +// !(typeguard1 && typeguard2) +if (!(typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number")) { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +// !(typeguard1) && !(typeguard2) +if (!(typeof strOrNumOrBool === "string") && !(typeof strOrNumOrBool === "number")) { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +// !(typeguard1) && simpleExpr +if (!(typeof strOrNumOrBool === "string") && numOrBool !== strOrNumOrBool) { + numOrBool = strOrNumOrBool; // number | boolean +} +else { + var r1 = strOrNumOrBool; // string | number | boolean +} diff --git a/tests/baselines/reference/typeGuardOfFormNotExpr.types b/tests/baselines/reference/typeGuardOfFormNotExpr.types new file mode 100644 index 00000000000..22d1d71f412 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormNotExpr.types @@ -0,0 +1,160 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormNotExpr.ts === +var str: string; +>str : string + +var bool: boolean; +>bool : boolean + +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var strOrNumOrBool: string | number | boolean; +>strOrNumOrBool : string | number | boolean + +var numOrBool: number | boolean; +>numOrBool : number | boolean + +// A type guard of the form !expr +// - when true, narrows the type of x by expr when false, or +// - when false, narrows the type of x by expr when true. + +// !typeguard1 +if (!(typeof strOrNum === "string")) { +>!(typeof strOrNum === "string") : boolean +>(typeof strOrNum === "string") : boolean +>typeof strOrNum === "string" : boolean +>typeof strOrNum : string +>strOrNum : string | number + + num === strOrNum; // number +>num === strOrNum : boolean +>num : number +>strOrNum : number +} +else { + str = strOrNum; // string +>str = strOrNum : string +>str : string +>strOrNum : string +} +// !(typeguard1 || typeguard2) +if (!(typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number")) { +>!(typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number") : boolean +>(typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number") : boolean +>typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number" : boolean +>typeof strOrNumOrBool === "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean +>typeof strOrNumOrBool === "number" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : number | boolean + + bool = strOrNumOrBool; // boolean +>bool = strOrNumOrBool : boolean +>bool : boolean +>strOrNumOrBool : boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +>strOrNum = strOrNumOrBool : string | number +>strOrNum : string | number +>strOrNumOrBool : string | number +} +// !(typeguard1) || !(typeguard2) +if (!(typeof strOrNumOrBool !== "string") || !(typeof strOrNumOrBool !== "number")) { +>!(typeof strOrNumOrBool !== "string") || !(typeof strOrNumOrBool !== "number") : boolean +>!(typeof strOrNumOrBool !== "string") : boolean +>(typeof strOrNumOrBool !== "string") : boolean +>typeof strOrNumOrBool !== "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean +>!(typeof strOrNumOrBool !== "number") : boolean +>(typeof strOrNumOrBool !== "number") : boolean +>typeof strOrNumOrBool !== "number" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : number | boolean + + strOrNum = strOrNumOrBool; // string | number +>strOrNum = strOrNumOrBool : string | number +>strOrNum : string | number +>strOrNumOrBool : string | number +} +else { + bool = strOrNumOrBool; // boolean +>bool = strOrNumOrBool : boolean +>bool : boolean +>strOrNumOrBool : boolean +} +// !(typeguard1 && typeguard2) +if (!(typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number")) { +>!(typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number") : boolean +>(typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number") : boolean +>typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number" : boolean +>typeof strOrNumOrBool !== "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean +>typeof strOrNumOrBool !== "number" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : number | boolean + + strOrNum = strOrNumOrBool; // string | number +>strOrNum = strOrNumOrBool : string | number +>strOrNum : string | number +>strOrNumOrBool : string | number +} +else { + bool = strOrNumOrBool; // boolean +>bool = strOrNumOrBool : boolean +>bool : boolean +>strOrNumOrBool : boolean +} +// !(typeguard1) && !(typeguard2) +if (!(typeof strOrNumOrBool === "string") && !(typeof strOrNumOrBool === "number")) { +>!(typeof strOrNumOrBool === "string") && !(typeof strOrNumOrBool === "number") : boolean +>!(typeof strOrNumOrBool === "string") : boolean +>(typeof strOrNumOrBool === "string") : boolean +>typeof strOrNumOrBool === "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean +>!(typeof strOrNumOrBool === "number") : boolean +>(typeof strOrNumOrBool === "number") : boolean +>typeof strOrNumOrBool === "number" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : number | boolean + + bool = strOrNumOrBool; // boolean +>bool = strOrNumOrBool : boolean +>bool : boolean +>strOrNumOrBool : boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +>strOrNum = strOrNumOrBool : string | number +>strOrNum : string | number +>strOrNumOrBool : string | number +} +// !(typeguard1) && simpleExpr +if (!(typeof strOrNumOrBool === "string") && numOrBool !== strOrNumOrBool) { +>!(typeof strOrNumOrBool === "string") && numOrBool !== strOrNumOrBool : boolean +>!(typeof strOrNumOrBool === "string") : boolean +>(typeof strOrNumOrBool === "string") : boolean +>typeof strOrNumOrBool === "string" : boolean +>typeof strOrNumOrBool : string +>strOrNumOrBool : string | number | boolean +>numOrBool !== strOrNumOrBool : boolean +>numOrBool : number | boolean +>strOrNumOrBool : number | boolean + + numOrBool = strOrNumOrBool; // number | boolean +>numOrBool = strOrNumOrBool : number | boolean +>numOrBool : number | boolean +>strOrNumOrBool : number | boolean +} +else { + var r1: string | number | boolean = strOrNumOrBool; // string | number | boolean +>r1 : string | number | boolean +>strOrNumOrBool : string | number | boolean +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormNotExpr.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormNotExpr.ts new file mode 100644 index 00000000000..c9a2cb5fc0b --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormNotExpr.ts @@ -0,0 +1,53 @@ +var str: string; +var bool: boolean; +var num: number; +var strOrNum: string | number; +var strOrNumOrBool: string | number | boolean; +var numOrBool: number | boolean; + +// A type guard of the form !expr +// - when true, narrows the type of x by expr when false, or +// - when false, narrows the type of x by expr when true. + +// !typeguard1 +if (!(typeof strOrNum === "string")) { + num === strOrNum; // number +} +else { + str = strOrNum; // string +} +// !(typeguard1 || typeguard2) +if (!(typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number")) { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +// !(typeguard1) || !(typeguard2) +if (!(typeof strOrNumOrBool !== "string") || !(typeof strOrNumOrBool !== "number")) { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +// !(typeguard1 && typeguard2) +if (!(typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number")) { + strOrNum = strOrNumOrBool; // string | number +} +else { + bool = strOrNumOrBool; // boolean +} +// !(typeguard1) && !(typeguard2) +if (!(typeof strOrNumOrBool === "string") && !(typeof strOrNumOrBool === "number")) { + bool = strOrNumOrBool; // boolean +} +else { + strOrNum = strOrNumOrBool; // string | number +} +// !(typeguard1) && simpleExpr +if (!(typeof strOrNumOrBool === "string") && numOrBool !== strOrNumOrBool) { + numOrBool = strOrNumOrBool; // number | boolean +} +else { + var r1: string | number | boolean = strOrNumOrBool; // string | number | boolean +} \ No newline at end of file From 150e8d30d7de44ceef8228a4256c8a31c310c867 Mon Sep 17 00:00:00 2001 From: Yui T Date: Sun, 2 Nov 2014 19:52:08 -0800 Subject: [PATCH 052/154] Store scanner position before create PropertyDeclaration node --- src/compiler/parser.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 41243efa171..65fada8e134 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2668,9 +2668,11 @@ module ts { } function parsePropertyAssignment(): PropertyDeclaration { - var node = createNode(SyntaxKind.PropertyAssignment); - node.name = parsePropertyName(); + var nodePos = scanner.getStartPos(); + var propertyName = parsePropertyName(); if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { + var node = createNode(SyntaxKind.PropertyAssignment, nodePos); + node.name = propertyName; var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); var body = parseBody(/* ignoreMissingOpenBrace */ false); // do not propagate property name as name for function expression @@ -2679,8 +2681,11 @@ module ts { // var y = { x() { } } // otherwise this will bring y.x into the scope of x which is incorrect node.initializer = makeFunctionExpression(SyntaxKind.FunctionExpression, node.pos, undefined, sig, body); + return finishNode(node); } else { + var node = createNode(SyntaxKind.PropertyAssignment, nodePos); + node.name = propertyName; parseExpected(SyntaxKind.ColonToken); node.initializer = parseAssignmentExpression(false); } From 8a779e1e85f7867b7f1bd3086f11b97cf3b0a19d Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 4 Nov 2014 14:43:43 -0800 Subject: [PATCH 053/154] Basic typechecking and emitting for short hand property assignment Conflicts: src/compiler/diagnosticInformationMap.generated.ts src/compiler/emitter.ts --- src/compiler/binder.ts | 1 + src/compiler/checker.ts | 9 +++++++- .../diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 5 +++++ src/compiler/emitter.ts | 12 +++++++++++ src/compiler/parser.ts | 21 +++++++++++++++++-- src/compiler/types.ts | 5 +++++ .../objectLiteralShorthandProperties.ts | 19 +++++++++++++++++ .../objectLiteralShorthandProperties2.ts | 18 ++++++++++++++++ .../objectLiteralShorthandProperties3.ts | 13 ++++++++++++ .../objectLiteralShorthandProperties4.ts | 4 ++++ 11 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 tests/cases/compiler/objectLiteralShorthandProperties.ts create mode 100644 tests/cases/compiler/objectLiteralShorthandProperties2.ts create mode 100644 tests/cases/compiler/objectLiteralShorthandProperties3.ts create mode 100644 tests/cases/compiler/objectLiteralShorthandProperties4.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index fe3009da3aa..fe00830ae51 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -350,6 +350,7 @@ module ts { break; case SyntaxKind.Property: case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShortHandPropertyAssignment: bindDeclaration(node, SymbolFlags.Property, SymbolFlags.PropertyExcludes, /*isBlockScopeContainer*/ false); break; case SyntaxKind.EnumMember: diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2567b54de4a..5bd2e1f8ec8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4968,7 +4968,14 @@ module ts { if (hasProperty(members, id)) { var member = members[id]; if (member.flags & SymbolFlags.Property) { - var type = checkExpression((member.declarations[0]).initializer, contextualMapper); + var memberDecl = member.declarations[0]; + var type: Type; + if (memberDecl.kind === SyntaxKind.PropertyAssignment) { + type = checkExpression(memberDecl.initializer, contextualMapper); + } + else { + type = checkExpression(memberDecl.name, contextualMapper); + } var prop = createSymbol(SymbolFlags.Property | SymbolFlags.Transient | member.flags, member.name); prop.declarations = member.declarations; prop.parent = member.parent; diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 349601a6db8..19d5f0c5f6b 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -122,6 +122,7 @@ module ts { let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: DiagnosticCategory.Error, key: "'let' declarations can only be declared inside a block." }, Invalid_template_literal_expected: { code: 1158, category: DiagnosticCategory.Error, key: "Invalid template literal; expected '}'" }, Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: DiagnosticCategory.Error, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." }, + A_object_member_cannot_be_declared_optional: { code: 1159, category: DiagnosticCategory.Error, key: "A object member cannot be declared optional." }, Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7359abefb60..52235a0848e 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -480,6 +480,11 @@ "code": 1159 }, + "A object member cannot be declared optional.": { + "category": "Error", + "code": 1159 + }, + "Duplicate identifier '{0}'.": { "category": "Error", "code": 2300 diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index f61d4403eec..d23380b4fb1 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1033,6 +1033,16 @@ module ts { emitTrailingComments(node); } + function emitShortHandPropertyAssignment(node: ShortHandPropertyDeclaration) { + emitLeadingComments(node); + emit(node.name); + if (compilerOptions.target !== ScriptTarget.ES6) { + write(": "); + emit(node.name); + } + emitTrailingComments(node); + } + function tryEmitConstantValue(node: PropertyAccess | IndexedAccess): boolean { var constantValue = resolver.getConstantValue(node); if (constantValue !== undefined) { @@ -2250,6 +2260,8 @@ module ts { return emitObjectLiteral(node); case SyntaxKind.PropertyAssignment: return emitPropertyAssignment(node); + case SyntaxKind.ShortHandPropertyAssignment: + return emitShortHandPropertyAssignment(node); case SyntaxKind.PropertyAccess: return emitPropertyAccess(node); case SyntaxKind.IndexedAccess: diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 65fada8e134..75ff2993609 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -198,6 +198,7 @@ module ts { child((node).initializer); case SyntaxKind.Property: case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShortHandPropertyAssignment: return child((node).name) || child((node).type) || child((node).initializer); @@ -2669,9 +2670,11 @@ module ts { function parsePropertyAssignment(): PropertyDeclaration { var nodePos = scanner.getStartPos(); + var nameToken = token; var propertyName = parsePropertyName(); + var node: PropertyDeclaration; if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { - var node = createNode(SyntaxKind.PropertyAssignment, nodePos); + node = createNode(SyntaxKind.PropertyAssignment, nodePos); node.name = propertyName; var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); var body = parseBody(/* ignoreMissingOpenBrace */ false); @@ -2683,8 +2686,19 @@ module ts { node.initializer = makeFunctionExpression(SyntaxKind.FunctionExpression, node.pos, undefined, sig, body); return finishNode(node); } + if (token === SyntaxKind.QuestionToken) { + var questionStart = scanner.getTokenPos(); + errorAtPos(questionStart, scanner.getStartPos() - questionStart, Diagnostics.A_object_member_cannot_be_declared_optional); + nextToken(); + } + + // Parse to check if it is short-hand property assignment or normal property assignment + if (token !== SyntaxKind.ColonToken && nameToken === SyntaxKind.Identifier) { + node = createNode(SyntaxKind.ShortHandPropertyAssignment, nodePos); + node.name = propertyName; + } else { - var node = createNode(SyntaxKind.PropertyAssignment, nodePos); + node = createNode(SyntaxKind.PropertyAssignment, nodePos); node.name = propertyName; parseExpected(SyntaxKind.ColonToken); node.initializer = parseAssignmentExpression(false); @@ -2737,6 +2751,9 @@ module ts { if (p.kind === SyntaxKind.PropertyAssignment) { currentKind = Property; } + else if (p.kind === SyntaxKind.ShortHandPropertyAssignment) { + currentKind = Property; + } else if (p.kind === SyntaxKind.GetAccessor) { currentKind = GetAccessor; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 973c06d6e2d..51b93821d69 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -165,6 +165,7 @@ module ts { ArrayLiteral, ObjectLiteral, PropertyAssignment, + ShortHandPropertyAssignment, PropertyAccess, IndexedAccess, CallExpression, @@ -329,6 +330,10 @@ module ts { initializer?: Expression; } + export interface ShortHandPropertyDeclaration extends PropertyDeclaration { + name: Identifier; + } + export interface ParameterDeclaration extends VariableDeclaration { } /** diff --git a/tests/cases/compiler/objectLiteralShorthandProperties.ts b/tests/cases/compiler/objectLiteralShorthandProperties.ts new file mode 100644 index 00000000000..95b380308e9 --- /dev/null +++ b/tests/cases/compiler/objectLiteralShorthandProperties.ts @@ -0,0 +1,19 @@ +var a, b, c; + +var x1 = { + a +}; + +var x2 = { + a, +} + +var x3 = { + a: 0, + b, + c, + d() { }, + x3, + parent: x3 +}; + diff --git a/tests/cases/compiler/objectLiteralShorthandProperties2.ts b/tests/cases/compiler/objectLiteralShorthandProperties2.ts new file mode 100644 index 00000000000..38081e7d691 --- /dev/null +++ b/tests/cases/compiler/objectLiteralShorthandProperties2.ts @@ -0,0 +1,18 @@ +// errors +var y = { + "stringLiteral", + 42, + get e, + set f, + this, + super, + var, + class, + typeof +}; + +var x = { + a.b, + a["ss"], + a[1], +}; \ No newline at end of file diff --git a/tests/cases/compiler/objectLiteralShorthandProperties3.ts b/tests/cases/compiler/objectLiteralShorthandProperties3.ts new file mode 100644 index 00000000000..005885bb901 --- /dev/null +++ b/tests/cases/compiler/objectLiteralShorthandProperties3.ts @@ -0,0 +1,13 @@ +// module export + +module m { + export var x; +} + +module m { + var z = x; + var y = { + a: x, + x + }; +} diff --git a/tests/cases/compiler/objectLiteralShorthandProperties4.ts b/tests/cases/compiler/objectLiteralShorthandProperties4.ts new file mode 100644 index 00000000000..1f44dc18ae8 --- /dev/null +++ b/tests/cases/compiler/objectLiteralShorthandProperties4.ts @@ -0,0 +1,4 @@ +var x = { + x, // OK + undefinedVariable // Error +} From b7b3506c59de1497f5ae65ec556b9ffffa51eb7e Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 6 Nov 2014 15:31:42 -0800 Subject: [PATCH 054/154] change folder structure, move all new formatting related bits to 'format' folder --- src/services/{formatting => }/format.ts | 11 +- .../{formatting/new => format}/formatting.ts | 2 +- .../new => format}/formattingContext.ts | 0 .../new => format}/formattingRequestKind.ts | 0 .../formattingScanner.ts | 2 + .../indentation.ts} | 0 .../{formatting/new => format}/rule.ts | 0 .../{formatting/new => format}/ruleAction.ts | 0 .../new => format}/ruleDescriptor.ts | 0 .../{formatting/new => format}/ruleFlag.ts | 0 .../new => format}/ruleOperation.ts | 0 .../new => format}/ruleOperationContext.ts | 0 .../{formatting/new => format}/rules.ts | 0 .../{formatting/new => format}/rulesMap.ts | 0 .../new => format}/rulesProvider.ts | 0 .../{formatting/new => format}/tokenRange.ts | 0 .../{formatting/new => format}/tokenSpan.ts | 0 src/services/formatting/lineMapUtilities.ts | 41 -- src/services/formatting/new/smartIndenter.ts | 401 ------------------ src/services/services.ts | 4 +- .../{formatting => }/smartIndenter.ts | 2 +- src/services/utilities.ts | 37 ++ 22 files changed, 48 insertions(+), 452 deletions(-) rename src/services/{formatting => }/format.ts (97%) rename src/services/{formatting/new => format}/formatting.ts (94%) rename src/services/{formatting/new => format}/formattingContext.ts (100%) rename src/services/{formatting/new => format}/formattingRequestKind.ts (100%) rename src/services/{formatting => format}/formattingScanner.ts (96%) rename src/services/{formatting/stringUtilities.ts => format/indentation.ts} (100%) rename src/services/{formatting/new => format}/rule.ts (100%) rename src/services/{formatting/new => format}/ruleAction.ts (100%) rename src/services/{formatting/new => format}/ruleDescriptor.ts (100%) rename src/services/{formatting/new => format}/ruleFlag.ts (100%) rename src/services/{formatting/new => format}/ruleOperation.ts (100%) rename src/services/{formatting/new => format}/ruleOperationContext.ts (100%) rename src/services/{formatting/new => format}/rules.ts (100%) rename src/services/{formatting/new => format}/rulesMap.ts (100%) rename src/services/{formatting/new => format}/rulesProvider.ts (100%) rename src/services/{formatting/new => format}/tokenRange.ts (100%) rename src/services/{formatting/new => format}/tokenSpan.ts (100%) delete mode 100644 src/services/formatting/lineMapUtilities.ts delete mode 100644 src/services/formatting/new/smartIndenter.ts rename src/services/{formatting => }/smartIndenter.ts (97%) diff --git a/src/services/formatting/format.ts b/src/services/format.ts similarity index 97% rename from src/services/formatting/format.ts rename to src/services/format.ts index 0adc2cb00fb..6e53fa26541 100644 --- a/src/services/formatting/format.ts +++ b/src/services/format.ts @@ -1,8 +1,7 @@ -/// -/// -/// -/// -/// +/// +/// +/// +/// module ts.formatting { @@ -25,10 +24,10 @@ module ts.formatting { getEffectiveCommentIndentation(commentLine: number): number; getDelta(): number; getIndentation(): number; + setDelta(delta: number): number; getCommentIndentation(): number; increaseCommentIndentation(delta: number): void; recomputeIndentation(lineAddedByFormatting: boolean): void; - setDelta(delta: number): number; } export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { diff --git a/src/services/formatting/new/formatting.ts b/src/services/format/formatting.ts similarity index 94% rename from src/services/formatting/new/formatting.ts rename to src/services/format/formatting.ts index c61f1bce8af..3d19b33d821 100644 --- a/src/services/formatting/new/formatting.ts +++ b/src/services/format/formatting.ts @@ -13,7 +13,7 @@ // limitations under the License. // -/// +/// /// /// /// diff --git a/src/services/formatting/new/formattingContext.ts b/src/services/format/formattingContext.ts similarity index 100% rename from src/services/formatting/new/formattingContext.ts rename to src/services/format/formattingContext.ts diff --git a/src/services/formatting/new/formattingRequestKind.ts b/src/services/format/formattingRequestKind.ts similarity index 100% rename from src/services/formatting/new/formattingRequestKind.ts rename to src/services/format/formattingRequestKind.ts diff --git a/src/services/formatting/formattingScanner.ts b/src/services/format/formattingScanner.ts similarity index 96% rename from src/services/formatting/formattingScanner.ts rename to src/services/format/formattingScanner.ts index c9dc2949d17..e7f6b019057 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/format/formattingScanner.ts @@ -1,3 +1,5 @@ +/// + module ts.formatting { var scanner = createScanner(ScriptTarget.ES5, /*skipTrivia*/ false); diff --git a/src/services/formatting/stringUtilities.ts b/src/services/format/indentation.ts similarity index 100% rename from src/services/formatting/stringUtilities.ts rename to src/services/format/indentation.ts diff --git a/src/services/formatting/new/rule.ts b/src/services/format/rule.ts similarity index 100% rename from src/services/formatting/new/rule.ts rename to src/services/format/rule.ts diff --git a/src/services/formatting/new/ruleAction.ts b/src/services/format/ruleAction.ts similarity index 100% rename from src/services/formatting/new/ruleAction.ts rename to src/services/format/ruleAction.ts diff --git a/src/services/formatting/new/ruleDescriptor.ts b/src/services/format/ruleDescriptor.ts similarity index 100% rename from src/services/formatting/new/ruleDescriptor.ts rename to src/services/format/ruleDescriptor.ts diff --git a/src/services/formatting/new/ruleFlag.ts b/src/services/format/ruleFlag.ts similarity index 100% rename from src/services/formatting/new/ruleFlag.ts rename to src/services/format/ruleFlag.ts diff --git a/src/services/formatting/new/ruleOperation.ts b/src/services/format/ruleOperation.ts similarity index 100% rename from src/services/formatting/new/ruleOperation.ts rename to src/services/format/ruleOperation.ts diff --git a/src/services/formatting/new/ruleOperationContext.ts b/src/services/format/ruleOperationContext.ts similarity index 100% rename from src/services/formatting/new/ruleOperationContext.ts rename to src/services/format/ruleOperationContext.ts diff --git a/src/services/formatting/new/rules.ts b/src/services/format/rules.ts similarity index 100% rename from src/services/formatting/new/rules.ts rename to src/services/format/rules.ts diff --git a/src/services/formatting/new/rulesMap.ts b/src/services/format/rulesMap.ts similarity index 100% rename from src/services/formatting/new/rulesMap.ts rename to src/services/format/rulesMap.ts diff --git a/src/services/formatting/new/rulesProvider.ts b/src/services/format/rulesProvider.ts similarity index 100% rename from src/services/formatting/new/rulesProvider.ts rename to src/services/format/rulesProvider.ts diff --git a/src/services/formatting/new/tokenRange.ts b/src/services/format/tokenRange.ts similarity index 100% rename from src/services/formatting/new/tokenRange.ts rename to src/services/format/tokenRange.ts diff --git a/src/services/formatting/new/tokenSpan.ts b/src/services/format/tokenSpan.ts similarity index 100% rename from src/services/formatting/new/tokenSpan.ts rename to src/services/format/tokenSpan.ts diff --git a/src/services/formatting/lineMapUtilities.ts b/src/services/formatting/lineMapUtilities.ts deleted file mode 100644 index cd429019dba..00000000000 --- a/src/services/formatting/lineMapUtilities.ts +++ /dev/null @@ -1,41 +0,0 @@ -/// - -module ts.formatting { - - export function getEndLinePosition(line: number, sourceFile: SourceFile): number { - Debug.assert(line >= 1); - var lineStarts = sourceFile.getLineStarts(); - - line = line - 1; - if (line === lineStarts.length - 1) { - // last line - return EOF - return sourceFile.text.length - 1; - } - else { - // current line start - var start = lineStarts[line]; - // take the start position of the next line -1 = it should be some line break - var pos = lineStarts[line + 1] - 1; - Debug.assert(isLineBreak(sourceFile.text.charCodeAt(pos))); - // walk backwards skipping line breaks, stop the the beginning of current line. - // i.e: - // - // $ <- end of line for this position should match the start position - while (start <= pos && isLineBreak(sourceFile.text.charCodeAt(pos))) { - pos--; - } - return pos; - } - } - - export function getStartPositionOfLine(line: number, sourceFile: SourceFile): number { - Debug.assert(line >= 1); - return sourceFile.getLineStarts()[line - 1]; - } - - export function getStartLinePositionForPosition(position: number, sourceFile: SourceFile): number { - var lineStarts = sourceFile.getLineStarts(); - var line = sourceFile.getLineAndCharacterFromPosition(position).line; - return lineStarts[line - 1]; - } -} \ No newline at end of file diff --git a/src/services/formatting/new/smartIndenter.ts b/src/services/formatting/new/smartIndenter.ts deleted file mode 100644 index df57929dff3..00000000000 --- a/src/services/formatting/new/smartIndenter.ts +++ /dev/null @@ -1,401 +0,0 @@ -/// -/// - -module ts.formatting { - export module SmartIndenter { - export function getIndentation(position: number, sourceFile: SourceFile, options: EditorOptions): number { - if (position > sourceFile.text.length) { - return 0; // past EOF - } - - var precedingToken = ServicesSyntaxUtilities.findPrecedingToken(position, sourceFile); - if (!precedingToken) { - return 0; - } - - // no indentation in string \regex literals - if ((precedingToken.kind === SyntaxKind.StringLiteral || precedingToken.kind === SyntaxKind.RegularExpressionLiteral) && - precedingToken.getStart(sourceFile) <= position && - precedingToken.end > position) { - return 0; - } - - var lineAtPosition = sourceFile.getLineAndCharacterFromPosition(position).line; - - if (precedingToken.kind === SyntaxKind.CommaToken && precedingToken.parent.kind !== SyntaxKind.BinaryExpression) { - // previous token is comma that separates items in list - find the previous item and try to derive indentation from it - var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation; - } - } - - // try to find node that can contribute to indentation and includes 'position' starting from 'precedingToken' - // if such node is found - compute initial indentation for 'position' inside this node - var previous: Node; - var current = precedingToken; - var currentStart: LineAndCharacter; - var indentationDelta: number; - - while (current) { - if (positionBelongsToNode(current, position, sourceFile) && nodeContentIsIndented(current, previous)) { - currentStart = getStartLineAndCharacterForNode(current, sourceFile); - - if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) { - indentationDelta = 0; - } - else { - indentationDelta = lineAtPosition !== currentStart.line ? options.IndentSize : 0; - } - - break; - } - - // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation; - } - - previous = current; - current = current.parent; - } - - if (!current) { - // no parent was found - return 0 to be indented on the level of SourceFile - return 0; - } - - return getIndentationForNode(current, currentStart, indentationDelta, sourceFile, options); - } - - export function getIndentationForNode(current: Node, currentStart: LineAndCharacter, indentationDelta: number, sourceFile: SourceFile, options: EditorOptions): number { - var parent: Node = current.parent; - var parentStart: LineAndCharacter; - - // walk upwards and collect indentations for pairs of parent-child nodes - // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' - while (parent) { - // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; - } - - parentStart = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); - var parentAndChildShareLine = - parentStart.line === currentStart.line || - childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); - - // try to fetch actual indentation for current node from source text - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; - } - - // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line - if (nodeContentIsIndented(parent, current) && !parentAndChildShareLine) { - indentationDelta += options.IndentSize; - } - - current = parent; - currentStart = parentStart; - parent = current.parent; - } - - return indentationDelta; - } - - /* - * Function returns -1 if indentation cannot be determined - */ - function getActualIndentationForListItemBeforeComma(commaToken: Node, sourceFile: SourceFile, options: EditorOptions): number { - // previous token is comma that separates items in list - find the previous item and try to derive indentation from it - var commaItemInfo = ServicesSyntaxUtilities.findListItemInfo(commaToken); - Debug.assert(commaItemInfo.listItemIndex > 0); - // The item we're interested in is right before the comma - return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); - } - - /* - * Function returns -1 if actual indentation for node should not be used (i.e because node is nested expression) - */ - function getActualIndentationForNode(current: Node, - parent: Node, - currentLineAndChar: LineAndCharacter, - parentAndChildShareLine: boolean, - sourceFile: SourceFile, - options: EditorOptions): number { - - // actual indentation is used for statements\declarations if one of cases below is true: - // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually - // - parent and child are not on the same line - var useActualIndentation = - (isDeclaration(current) || isStatement(current)) && - (parent.kind === SyntaxKind.SourceFile || !parentAndChildShareLine); - - if (!useActualIndentation) { - return -1; - } - - return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options); - } - - function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken: Node, current: Node, lineAtPosition: number, sourceFile: SourceFile): boolean { - var nextToken = ServicesSyntaxUtilities.findNextToken(precedingToken, current); - if (!nextToken) { - return false; - } - - if (nextToken.kind === SyntaxKind.OpenBraceToken) { - // open braces are always indented at the parent level - return true; - } - else if (nextToken.kind === SyntaxKind.CloseBraceToken) { - // close braces are indented at the parent level if they are located on the same line with cursor - // this means that if new line will be added at $ position, this case will be indented - // class A { - // $ - // } - /// and this one - not - // class A { - // $} - - var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line; - return lineAtPosition === nextTokenStartLine; - } - - return false; - } - - function getStartLineAndCharacterForNode(n: Node, sourceFile: SourceFile): LineAndCharacter { - return sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)); - } - - function positionBelongsToNode(candidate: Node, position: number, sourceFile: SourceFile): boolean { - return candidate.end > position || !isCompletedNode(candidate, sourceFile); - } - - function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: Node, childStartLine: number, sourceFile: SourceFile): boolean { - if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { - var elseKeyword = forEach(parent.getChildren(), c => c.kind === SyntaxKind.ElseKeyword && c); - Debug.assert(elseKeyword); - - var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; - return elseKeywordStartLine === childStartLine; - } - } - - function getActualIndentationForListItem(node: Node, sourceFile: SourceFile, options: EditorOptions): number { - if (node.parent) { - switch (node.parent.kind) { - case SyntaxKind.TypeReference: - if ((node.parent).typeArguments) { - return getActualIndentationFromList((node.parent).typeArguments); - } - break; - case SyntaxKind.ObjectLiteral: - return getActualIndentationFromList((node.parent).properties); - case SyntaxKind.TypeLiteral: - return getActualIndentationFromList((node.parent).members); - case SyntaxKind.ArrayLiteral: - return getActualIndentationFromList((node.parent).elements); - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.ArrowFunction: - case SyntaxKind.Method: - case SyntaxKind.CallSignature: - case SyntaxKind.ConstructSignature: - if ((node.parent).typeParameters && node.end < (node.parent).typeParameters.end) { - return getActualIndentationFromList((node.parent).typeParameters); - } - - return getActualIndentationFromList((node.parent).parameters); - case SyntaxKind.NewExpression: - case SyntaxKind.CallExpression: - if ((node.parent).typeArguments && node.end < (node.parent).typeArguments.end) { - return getActualIndentationFromList((node.parent).typeArguments); - } - - return getActualIndentationFromList((node.parent).arguments); - } - } - - return -1; - - function getActualIndentationFromList(list: Node[]): number { - var index = indexOf(list, node); - return index !== -1 ? deriveActualIndentationFromList(list, index, sourceFile, options) : -1; - } - } - - - function deriveActualIndentationFromList(list: Node[], index: number, sourceFile: SourceFile, options: EditorOptions): number { - Debug.assert(index >= 0 && index < list.length); - var node = list[index]; - - // walk toward the start of the list starting from current node and check if the line is the same for all items. - // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] - var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); - for (var i = index - 1; i >= 0; --i) { - if (list[i].kind === SyntaxKind.CommaToken) { - continue; - } - // skip list items that ends on the same line with the current list element - var prevEndLine = sourceFile.getLineAndCharacterFromPosition(list[i].end).line; - if (prevEndLine !== lineAndCharacter.line) { - return findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options); - } - - lineAndCharacter = getStartLineAndCharacterForNode(list[i], sourceFile); - } - return -1; - } - - function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter: LineAndCharacter, sourceFile: SourceFile, options: EditorOptions): number { - var lineStart = sourceFile.getPositionFromLineAndCharacter(lineAndCharacter.line, 1); - var column = 0; - for (var i = 0; i < lineAndCharacter.character; ++i) { - var charCode = sourceFile.text.charCodeAt(lineStart + i); - if (!isWhiteSpace(charCode)) { - return column; - } - - if (charCode === CharacterCodes.tab) { - column += options.TabSize; - } - else { - column++; - } - } - - return column; - } - - function nodeContentIsIndented(parent: Node, child: Node): boolean { - switch (parent.kind) { - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.EnumDeclaration: - return true; - case SyntaxKind.ModuleDeclaration: - // ModuleBlock should take care of indentation - return false; - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.Method: - case SyntaxKind.FunctionExpression: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.Constructor: - // FunctionBlock should take care of indentation - return false; - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - return child && child.kind !== SyntaxKind.Block; - case SyntaxKind.IfStatement: - return child && child.kind !== SyntaxKind.Block; - case SyntaxKind.TryStatement: - // TryBlock\CatchBlock\FinallyBlock should take care of indentation - return false; - case SyntaxKind.ArrayLiteral: - case SyntaxKind.Block: - case SyntaxKind.FunctionBlock: - case SyntaxKind.TryBlock: - case SyntaxKind.CatchBlock: - case SyntaxKind.FinallyBlock: - case SyntaxKind.ModuleBlock: - case SyntaxKind.ObjectLiteral: - case SyntaxKind.TypeLiteral: - case SyntaxKind.SwitchStatement: - case SyntaxKind.DefaultClause: - case SyntaxKind.CaseClause: - case SyntaxKind.ParenExpression: - case SyntaxKind.CallExpression: - case SyntaxKind.NewExpression: - case SyntaxKind.VariableStatement: - case SyntaxKind.VariableDeclaration: - return true; - default: - return false; - } - } - - /* - * Checks if node ends with 'expectedLastToken'. - * If child at position 'length - 1' is 'SemicolonToken' it is skipped and 'expectedLastToken' is compared with child at position 'length - 2'. - */ - function nodeEndsWith(n: Node, expectedLastToken: SyntaxKind, sourceFile: SourceFile): boolean { - var children = n.getChildren(sourceFile); - if (children.length) { - var last = children[children.length - 1]; - if (last.kind === expectedLastToken) { - return true; - } - else if (last.kind === SyntaxKind.SemicolonToken && children.length !== 1) { - return children[children.length - 2].kind === expectedLastToken; - } - } - return false; - } - - /* - * This function is always called when position of the cursor is located after the node - */ - function isCompletedNode(n: Node, sourceFile: SourceFile): boolean { - switch (n.kind) { - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.ObjectLiteral: - case SyntaxKind.Block: - case SyntaxKind.CatchBlock: - case SyntaxKind.FinallyBlock: - case SyntaxKind.FunctionBlock: - case SyntaxKind.ModuleBlock: - case SyntaxKind.SwitchStatement: - return nodeEndsWith(n, SyntaxKind.CloseBraceToken, sourceFile); - case SyntaxKind.ParenExpression: - case SyntaxKind.CallSignature: - case SyntaxKind.CallExpression: - case SyntaxKind.ConstructSignature: - return nodeEndsWith(n, SyntaxKind.CloseParenToken, sourceFile); - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.Method: - case SyntaxKind.ArrowFunction: - return !(n).body || isCompletedNode((n).body, sourceFile); - case SyntaxKind.ModuleDeclaration: - return (n).body && isCompletedNode((n).body, sourceFile); - case SyntaxKind.IfStatement: - if ((n).elseStatement) { - return isCompletedNode((n).elseStatement, sourceFile); - } - return isCompletedNode((n).thenStatement, sourceFile); - case SyntaxKind.ExpressionStatement: - return isCompletedNode((n).expression, sourceFile); - case SyntaxKind.ArrayLiteral: - return nodeEndsWith(n, SyntaxKind.CloseBracketToken, sourceFile); - case SyntaxKind.Missing: - return false; - case SyntaxKind.CaseClause: - case SyntaxKind.DefaultClause: - // there is no such thing as terminator token for CaseClause\DefaultClause so for simplicitly always consider them non-completed - return false; - case SyntaxKind.WhileStatement: - return isCompletedNode((n).statement, sourceFile); - case SyntaxKind.DoStatement: - // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; - var hasWhileKeyword = forEach(n.getChildren(), c => c.kind === SyntaxKind.WhileKeyword && c); - if(hasWhileKeyword) { - return nodeEndsWith(n, SyntaxKind.CloseParenToken, sourceFile); - } - return isCompletedNode((n).statement, sourceFile); - default: - return true; - } - } - } -} - diff --git a/src/services/services.ts b/src/services/services.ts index 113e878efb4..33bec5ae8d8 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -12,8 +12,8 @@ /// /// /// -/// -/// +/// +/// /// /// diff --git a/src/services/formatting/smartIndenter.ts b/src/services/smartIndenter.ts similarity index 97% rename from src/services/formatting/smartIndenter.ts rename to src/services/smartIndenter.ts index 010dcf174c8..98971b1f14a 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/smartIndenter.ts @@ -1,4 +1,4 @@ -/// +/// module ts.formatting { export module SmartIndenter { diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 1fede7f3a1b..a4146c52e5e 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -5,6 +5,43 @@ module ts { list: Node; } + export function getEndLinePosition(line: number, sourceFile: SourceFile): number { + Debug.assert(line >= 1); + var lineStarts = sourceFile.getLineStarts(); + + line = line - 1; + if (line === lineStarts.length - 1) { + // last line - return EOF + return sourceFile.text.length - 1; + } + else { + // current line start + var start = lineStarts[line]; + // take the start position of the next line -1 = it should be some line break + var pos = lineStarts[line + 1] - 1; + Debug.assert(isLineBreak(sourceFile.text.charCodeAt(pos))); + // walk backwards skipping line breaks, stop the the beginning of current line. + // i.e: + // + // $ <- end of line for this position should match the start position + while (start <= pos && isLineBreak(sourceFile.text.charCodeAt(pos))) { + pos--; + } + return pos; + } + } + + export function getStartPositionOfLine(line: number, sourceFile: SourceFile): number { + Debug.assert(line >= 1); + return sourceFile.getLineStarts()[line - 1]; + } + + export function getStartLinePositionForPosition(position: number, sourceFile: SourceFile): number { + var lineStarts = sourceFile.getLineStarts(); + var line = sourceFile.getLineAndCharacterFromPosition(position).line; + return lineStarts[line - 1]; + } + export function rangeContainsRange(r1: TextRange, r2: TextRange): boolean { return startEndContainsRange(r1.pos, r1.end, r2); } From 364b63bd8242be2a1c05bd3e7227a586b1d85be0 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 6 Nov 2014 16:19:09 -0800 Subject: [PATCH 055/154] simplify formatting scanner --- src/services/format.ts | 2 +- src/services/format/formattingScanner.ts | 29 +++++++++++------------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/services/format.ts b/src/services/format.ts index 6e53fa26541..525fc3b6041 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -185,7 +185,7 @@ module ts.formatting { var enclosingNode = findEnclosingNode(originalRange, sourceFile); var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); - var formattingScanner = getFormattingScanner(sourceFile, enclosingNode, originalRange); + var formattingScanner = getFormattingScanner(sourceFile, enclosingNode.pos, originalRange.end); var previousRangeHasError: boolean; var previousRange: TextRangeWithKind; diff --git a/src/services/format/formattingScanner.ts b/src/services/format/formattingScanner.ts index e7f6b019057..eb6d7a7964f 100644 --- a/src/services/format/formattingScanner.ts +++ b/src/services/format/formattingScanner.ts @@ -17,16 +17,16 @@ module ts.formatting { RescanSlashToken } - export function getFormattingScanner(sourceFile: SourceFile, enclosingNode: Node, range: TextRange): FormattingScanner { + export function getFormattingScanner(sourceFile: SourceFile, startPos: number, endPos: number): FormattingScanner { scanner.setText(sourceFile.text); - scanner.setTextPos(enclosingNode.pos); + scanner.setTextPos(startPos); var wasNewLine: boolean = true; var leadingTrivia: TextRangeWithKind[]; var trailingTrivia: TextRangeWithKind[]; - var savedStartPos: number; + var savedPos: number; var lastScanAction: ScanAction; var lastTokenInfo: TokenInfo; @@ -43,7 +43,7 @@ module ts.formatting { function advance(): void { lastTokenInfo = undefined; - var isStarted = scanner.getStartPos() !== enclosingNode.pos; + var isStarted = scanner.getStartPos() !== startPos; if (isStarted) { if (trailingTrivia) { @@ -63,9 +63,9 @@ module ts.formatting { } var t: SyntaxKind; - var startPos = scanner.getStartPos(); + var pos = scanner.getStartPos(); - while (startPos < range.end) { + while (pos < endPos) { var t = scanner.getToken(); if (!isTrivia(t)) { break; @@ -74,12 +74,12 @@ module ts.formatting { // consume leading trivia scanner.scan(); var item = { - pos: startPos, + pos: pos, end: scanner.getStartPos(), kind: t } - startPos = scanner.getStartPos(); + pos = scanner.getStartPos(); if (!leadingTrivia) { leadingTrivia = []; @@ -87,7 +87,7 @@ module ts.formatting { leadingTrivia.push(item); } - savedStartPos = scanner.getStartPos(); + savedPos = scanner.getStartPos(); } function shouldRescanGreaterThanToken(container: Node): boolean { @@ -135,13 +135,12 @@ module ts.formatting { return lastTokenInfo; } - if (scanner.getStartPos() !== savedStartPos) { - scanner.setTextPos(savedStartPos); + if (scanner.getStartPos() !== savedPos) { + scanner.setTextPos(savedPos); scanner.scan(); } var currentToken = scanner.getToken(); - var endPos: number; if (expectedScanAction === ScanAction.RescanGreaterThanToken && currentToken === SyntaxKind.GreaterThanToken) { currentToken = scanner.reScanGreaterToken(); @@ -157,15 +156,13 @@ module ts.formatting { lastScanAction = ScanAction.Scan; } - endPos = scanner.getTextPos(); - var token: TextRangeWithKind = { pos: scanner.getStartPos(), end: scanner.getTextPos(), kind: currentToken } - while(scanner.getStartPos() < range.end) { + while(scanner.getStartPos() < endPos) { currentToken = scanner.scan(); if (!isTrivia(currentToken)) { break; @@ -199,7 +196,7 @@ module ts.formatting { function isOnToken(): boolean { var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); - return startPos < range.end && current !== SyntaxKind.EndOfFileToken && !isTrivia(current); + return startPos < endPos && current !== SyntaxKind.EndOfFileToken && !isTrivia(current); } } } \ No newline at end of file From 91065ec92cf9f00e13a7886f3e78644059ce79a5 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 6 Nov 2014 17:55:45 -0800 Subject: [PATCH 056/154] removed duplicate code --- src/services/format.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/services/format.ts b/src/services/format.ts index 525fc3b6041..eb0e7b9aa5b 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -431,24 +431,7 @@ module ts.formatting { } } - var increaseIndentation = SmartIndenter.nodeContentIsAlwaysIndented(child.kind); - if (!increaseIndentation) { - switch (child.kind) { - case SyntaxKind.IfStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.Method: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - increaseIndentation = true; - break; - } - } - if (increaseIndentation) { + if (shouldIndentChildNodes(child.kind)) { childDelta = options.IndentSize; } From 7e595f4701b2c2b845b51ebc5c72534dd90cb262 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 6 Nov 2014 18:00:15 -0800 Subject: [PATCH 057/154] code cleanup: inline functions --- src/services/format.ts | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/services/format.ts b/src/services/format.ts index eb0e7b9aa5b..bdcc2c82d9f 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -120,11 +120,8 @@ module ts.formatting { return find(sourceFile); function find(n: Node): Node { - if (!n) { - return undefined; - } var candidate = forEachChild(n, c => startEndContainsRange(c.getStart(sourceFile), c.end, range) && c); - return find(candidate) || n; + return (candidate && find(candidate)) || n; } } @@ -207,13 +204,8 @@ module ts.formatting { return edits; - function getIndentationDelta(node: Node, lineAdded: boolean): number { - if (node.parent && SmartIndenter.shouldIndentChildNode(node.parent, node)) { - return lineAdded ? options.IndentSize : - options.IndentSize; - } - return 0; - } - + // local functions + function getDynamicIndentation(node: Node, nodeStartLine: number, indentation: number, commentIndentation: number, delta: number): DynamicIndentation { return { getEffectiveCommentIndentation: (line) => { @@ -240,10 +232,15 @@ module ts.formatting { getCommentIndentation: () => commentIndentation, getDelta: () => delta, recomputeIndentation: (lineAdded) => { - var delta = getIndentationDelta(node, lineAdded); - if (delta) { - indentation += delta; - commentIndentation += delta; + if (node.parent && SmartIndenter.shouldIndentChildNode(node.parent, node)) { + if (lineAdded) { + indentation += options.IndentSize; + commentIndentation += options.IndentSize; + } + else { + indentation -= options.IndentSize; + commentIndentation -= options.IndentSize; + } } }, increaseCommentIndentation: (delta) => { From 62dd501a48fa5d25090bb4ffb3bfa629f259b285 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 6 Nov 2014 18:37:44 -0800 Subject: [PATCH 058/154] code cleanup: remove unused arguments --- src/services/format.ts | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/services/format.ts b/src/services/format.ts index bdcc2c82d9f..e927c7d82fc 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -254,9 +254,7 @@ module ts.formatting { } } - function getListItemIndentation(nodes: Node[], index: number, parentStartLine: number, options: EditorOptions): number { - Debug.assert(index >= 0 && index < nodes.length); - var node = nodes[index]; + function getListItemIndentation(node: Node, parentStartLine: number, options: EditorOptions): number { var start = node.getStart(sourceFile); var nodeStartLine = sourceFile.getLineAndCharacterFromPosition(start).line; var startLinePosition = getStartPositionOfLine(nodeStartLine, sourceFile); @@ -276,7 +274,7 @@ module ts.formatting { forEachChild( node, child => { - processChildNode(child, Indentation.Unknown, nodeStartLine, /*containingList*/ undefined, /*listElementIndex*/ -1) + processChildNode(child, Indentation.Unknown, nodeStartLine, /*isListElement*/ false) }, nodes => { var listStartToken = SyntaxKind.Unknown; @@ -314,14 +312,13 @@ module ts.formatting { if (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.kind === listStartToken) { + var tokenStartLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; // make sure that this token does not belong to the child var startTokenIndentation = nodeIndentation; var tokenStartLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; var oldDelta = -1; if (node.parent.kind !== SyntaxKind.SourceFile && tokenStartLine !== nodeStartLine) { oldDelta = nodeIndentation.setDelta(options.IndentSize); - //var indentation = nodeIndentation.getIndentation() + options.IndentSize; - //startTokenIndentation = getDynamicIndentation(node, indentation, indentation, nodeIndentation); } doConsumeTokenAndAdvanceScanner(tokenInfo, node, startTokenIndentation); if (oldDelta !== -1) { @@ -334,7 +331,7 @@ module ts.formatting { var inheritedIndentation: number = Indentation.Unknown; var effectiveStartLine = tokenStartLine || nodeStartLine; for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, effectiveStartLine, /*containingList*/ nodes, /*listElementIndex*/ i) + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, effectiveStartLine, /*isListElement*/ true) } if (listEndToken !== SyntaxKind.Unknown) { @@ -348,7 +345,6 @@ module ts.formatting { } } } - } ); @@ -365,9 +361,12 @@ module ts.formatting { doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); } - /// Local functions + function processChildNode( + child: Node, + inheritedIndentation: number, + childEffectiveStartLine: number, + isListElement: boolean): number { - function processChildNode(child: Node, inheritedIndentation: number, nodeEffectiveStartLine: number, containingList: Node[], listElementIndex: number): number { if (child.kind === SyntaxKind.Missing) { return inheritedIndentation; } @@ -388,26 +387,24 @@ module ts.formatting { var childStart = sourceFile.getLineAndCharacterFromPosition(start); var actualIndentation = inheritedIndentation; - var childIndentationAmount: number; - var childDelta: number = 0; + var childIndentationAmount = Indentation.Unknown; + var childDelta = 0; var isChildInRange = rangeOverlapsWithStartEnd(originalRange, start, child.getEnd()); - if (containingList) { + if (isListElement) { if (isChildInRange) { if (inheritedIndentation !== Indentation.Unknown) { childIndentationAmount = inheritedIndentation; - childDelta = 0; } } else { - var actualIndentation = getListItemIndentation(containingList, listElementIndex, nodeEffectiveStartLine, options); + var actualIndentation = getListItemIndentation(child, childEffectiveStartLine, options); if (actualIndentation !== Indentation.Unknown) { inheritedIndentation = childIndentationAmount = actualIndentation; - childDelta = 0; } } } - if (childIndentationAmount === undefined) { + if (childIndentationAmount === Indentation.Unknown) { if (isSomeBlock(child.kind)) { // child is indented childDelta = options.IndentSize; @@ -432,7 +429,7 @@ module ts.formatting { childDelta = options.IndentSize; } - if (nodeEffectiveStartLine === childStart.line) { + if (childEffectiveStartLine === childStart.line) { childIndentationAmount = nodeIndentation.getIndentation(); childDelta = Math.min(options.IndentSize, delta + childDelta); } @@ -441,7 +438,7 @@ module ts.formatting { if (isToken(child)) { var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); - var childIndentation = getDynamicIndentation(node, nodeEffectiveStartLine, childIndentationAmount, childIndentationAmount, childDelta); + var childIndentation = getDynamicIndentation(node, childEffectiveStartLine, childIndentationAmount, childIndentationAmount, childDelta); doConsumeTokenAndAdvanceScanner(tokenInfo, node, childIndentation); } else { From 4b19eb3e931ffef5df53e2f886fce6899754aac4 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 7 Nov 2014 00:31:49 -0800 Subject: [PATCH 059/154] adjust delta when recomputing parent indentation --- src/services/format.ts | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/services/format.ts b/src/services/format.ts index e927c7d82fc..79a32b22d4f 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -241,6 +241,12 @@ module ts.formatting { indentation -= options.IndentSize; commentIndentation -= options.IndentSize; } + if (shouldIndentChildNodes(node.kind)) { + delta = options.IndentSize; + } + else { + delta = 0; + } } }, increaseCommentIndentation: (delta) => { @@ -362,9 +368,9 @@ module ts.formatting { } function processChildNode( - child: Node, - inheritedIndentation: number, - childEffectiveStartLine: number, + child: Node, + inheritedIndentation: number, + childEffectiveStartLine: number, isListElement: boolean): number { if (child.kind === SyntaxKind.Missing) { @@ -404,6 +410,13 @@ module ts.formatting { } } + if (isToken(child)) { + var tokenInfo = formattingScanner.readTokenInfo(node); + Debug.assert(tokenInfo.token.end === child.end); + doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + return inheritedIndentation; + } + if (childIndentationAmount === Indentation.Unknown) { if (isSomeBlock(child.kind)) { // child is indented @@ -434,17 +447,8 @@ module ts.formatting { childDelta = Math.min(options.IndentSize, delta + childDelta); } - // ensure that current token is inside child node - if (isToken(child)) { - var tokenInfo = formattingScanner.readTokenInfo(node); - Debug.assert(tokenInfo.token.end === child.end); - var childIndentation = getDynamicIndentation(node, childEffectiveStartLine, childIndentationAmount, childIndentationAmount, childDelta); - doConsumeTokenAndAdvanceScanner(tokenInfo, node, childIndentation); - } - else { - processNode(child, childContextNode, childStart.line, childIndentationAmount, childDelta); - childContextNode = node; - } + processNode(child, childContextNode, childStart.line, childIndentationAmount, childDelta); + childContextNode = node; return inheritedIndentation; } From fc59045102d355edd3c5a7a123f3292c03dd0b47 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 7 Nov 2014 13:34:51 -0800 Subject: [PATCH 060/154] code cleanup: split function into three --- src/services/format.ts | 81 ++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/src/services/format.ts b/src/services/format.ts index 79a32b22d4f..353cf9c7a13 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -283,35 +283,8 @@ module ts.formatting { processChildNode(child, Indentation.Unknown, nodeStartLine, /*isListElement*/ false) }, nodes => { - var listStartToken = SyntaxKind.Unknown; - var listEndToken = SyntaxKind.Unknown; - switch (node.kind) { - case SyntaxKind.Constructor: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.Method: - case SyntaxKind.ArrowFunction: - if ((node).typeParameters === nodes) { - listStartToken = SyntaxKind.LessThanToken - listEndToken = SyntaxKind.GreaterThanToken; - } - else if ((node).parameters === nodes) { - listStartToken = SyntaxKind.OpenParenToken; - listEndToken = SyntaxKind.CloseParenToken; - } - break; - case SyntaxKind.CallExpression: - case SyntaxKind.NewExpression: - if ((node).typeArguments === nodes) { - listStartToken = SyntaxKind.LessThanToken - listEndToken = SyntaxKind.GreaterThanToken; - } - else if ((node).arguments === nodes) { - listStartToken = SyntaxKind.OpenParenToken; - listEndToken = SyntaxKind.CloseParenToken; - } - break; - } + var listStartToken = getOpenTokenForList(node, nodes); + var listEndToken = getCloseTokenForOpenToken(listStartToken); if (listStartToken !== SyntaxKind.Unknown) { // try to consume open token @@ -351,8 +324,7 @@ module ts.formatting { } } } - } - ); + }); // this eats up last tokens in the node while (formattingScanner.isOnToken()) { @@ -506,9 +478,6 @@ module ts.formatting { indentNextTokenOrTrivia = false; } break; - case SyntaxKind.WhitespaceTrivia: - // TODO - break; case SyntaxKind.NewLineTrivia: indentNextTokenOrTrivia = true; break; @@ -574,16 +543,14 @@ module ts.formatting { applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); if (rule.Operation.Action & (RuleAction.Space | RuleAction.Delete) && currentStartLine !== previousStartLine) { - // Old code: // Handle the case where the next line is moved to be the end of this line. - // In this case we don't indent the next line in the next pass. + // In this case we don't indent the next line in the next pass. lastTriviaWasNewLine = false; if (currentParent.getStart(sourceFile) === currentItem.pos) { lineAdded = false; } } else if (rule.Operation.Action & RuleAction.NewLine && currentStartLine === previousStartLine) { - // Old code: // Handle the case where token2 is moved to the new line. // In this case we indent token2 in the next pass but we set // sameLineIndent flag to notify the indenter that the indentation is within the line. @@ -799,8 +766,46 @@ module ts.formatting { case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: return true; - break; } + return false; } + + function getOpenTokenForList(node: Node, list: Node[]) { + switch (node.kind) { + case SyntaxKind.Constructor: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.Method: + case SyntaxKind.ArrowFunction: + if ((node).typeParameters === list) { + return SyntaxKind.LessThanToken; + } + else if ((node).parameters === list) { + return SyntaxKind.OpenParenToken; + } + break; + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + if ((node).typeArguments === list) { + return SyntaxKind.LessThanToken; + } + else if ((node).arguments === list) { + return SyntaxKind.OpenParenToken; + } + break; + } + return SyntaxKind.Unknown; + } + + function getCloseTokenForOpenToken(k: SyntaxKind) { + switch (k) { + case SyntaxKind.OpenParenToken: + return SyntaxKind.CloseParenToken; + case SyntaxKind.LessThanToken: + return SyntaxKind.GreaterThanToken; + default: + return SyntaxKind.Unknown; + } + } } \ No newline at end of file From 27c463e5f1697da87a24fd50731f5918883fff39 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 7 Nov 2014 13:43:30 -0800 Subject: [PATCH 061/154] code cleanup: inline functions --- src/services/format.ts | 142 +++++++++++++++++----------------- src/services/smartIndenter.ts | 3 +- 2 files changed, 74 insertions(+), 71 deletions(-) diff --git a/src/services/format.ts b/src/services/format.ts index 353cf9c7a13..8b369b3006e 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -299,7 +299,7 @@ module ts.formatting { if (node.parent.kind !== SyntaxKind.SourceFile && tokenStartLine !== nodeStartLine) { oldDelta = nodeIndentation.setDelta(options.IndentSize); } - doConsumeTokenAndAdvanceScanner(tokenInfo, node, startTokenIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, startTokenIndentation); if (oldDelta !== -1) { nodeIndentation.setDelta(oldDelta); } @@ -319,7 +319,7 @@ module ts.formatting { if (tokenInfo.token.kind === listEndToken && formattingScanner.lastTrailingTriviaWasNewLine()) { var old = nodeIndentation.setDelta(options.IndentSize); //var endTokenIndentation = nodeIndentation.getIndentation() + options.IndentSize; - doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); nodeIndentation.setDelta(old); } } @@ -336,7 +336,7 @@ module ts.formatting { if (SmartIndenter.nodeContentIsAlwaysIndented(node.kind) && node.end === tokenInfo.token.end) { nodeIndentation.increaseCommentIndentation(options.IndentSize); } - doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); } function processChildNode( @@ -356,7 +356,7 @@ module ts.formatting { break; } - doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); } if (!formattingScanner.isOnToken()) { @@ -385,7 +385,7 @@ module ts.formatting { if (isToken(child)) { var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); - doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); return inheritedIndentation; } @@ -421,76 +421,74 @@ module ts.formatting { processNode(child, childContextNode, childStart.line, childIndentationAmount, childDelta); childContextNode = node; + return inheritedIndentation; } - function doConsumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, indentation: DynamicIndentation): void { - consumeTokenAndAdvanceScanner(currentTokenInfo, parent, childContextNode, indentation); - childContextNode = parent; - } - } + function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, indentation: DynamicIndentation): void { + Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); - function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, contextNode: Node, indentation: DynamicIndentation): void { - Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); + lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); - lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); - - if (currentTokenInfo.leadingTrivia) { - processTrivia(currentTokenInfo.leadingTrivia, parent, contextNode, indentation); - } - - var lineAdded: boolean; - var isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); - var indentToken: boolean = true; - - var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); - if (isTokenInRange) { - var prevStartLine = previousRangeStartLine; - lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, contextNode, indentation); - if (lineAdded !== undefined) { - indentToken = lineAdded; - } - else { - indentToken = tokenStart.line !== prevStartLine; - } - } - - if (currentTokenInfo.trailingTrivia) { - processTrivia(currentTokenInfo.trailingTrivia, parent, contextNode, indentation); - } - - - if (lastTriviaWasNewLine && indentToken) { - var indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { - for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { - var triviaItem = currentTokenInfo.leadingTrivia[i]; - var triviaStartLine = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos).line; - if (rangeContainsRange(originalRange, triviaItem)) { - switch (triviaItem.kind) { - case SyntaxKind.MultiLineCommentTrivia: - indentMultilineComment(triviaItem, indentation.getCommentIndentation(), /*firstLineIsIndented*/ !indentNextTokenOrTrivia); - indentNextTokenOrTrivia = false; - break; - case SyntaxKind.SingleLineCommentTrivia: - if (indentNextTokenOrTrivia) { - insertIndentation(triviaItem.pos, indentation.getCommentIndentation(), /*lineAdded*/ false); + processTrivia(currentTokenInfo.leadingTrivia, parent, childContextNode, indentation); + } + + var lineAdded: boolean; + var isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); + var indentToken: boolean = true; + + var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); + if (isTokenInRange) { + var prevStartLine = previousRangeStartLine; + lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, childContextNode, indentation); + if (lineAdded !== undefined) { + indentToken = lineAdded; + } + else { + indentToken = tokenStart.line !== prevStartLine; + } + } + + if (currentTokenInfo.trailingTrivia) { + processTrivia(currentTokenInfo.trailingTrivia, parent, childContextNode, indentation); + } + + + if (lastTriviaWasNewLine && indentToken) { + var indentNextTokenOrTrivia = true; + if (currentTokenInfo.leadingTrivia) { + for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { + var triviaItem = currentTokenInfo.leadingTrivia[i]; + var triviaStartLine = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos).line; + if (rangeContainsRange(originalRange, triviaItem)) { + switch (triviaItem.kind) { + case SyntaxKind.MultiLineCommentTrivia: + indentMultilineComment(triviaItem, indentation.getCommentIndentation(), /*firstLineIsIndented*/ !indentNextTokenOrTrivia); indentNextTokenOrTrivia = false; - } - break; - case SyntaxKind.NewLineTrivia: - indentNextTokenOrTrivia = true; - break; + break; + case SyntaxKind.SingleLineCommentTrivia: + if (indentNextTokenOrTrivia) { + insertIndentation(triviaItem.pos, indentation.getCommentIndentation(), /*lineAdded*/ false); + indentNextTokenOrTrivia = false; + } + break; + case SyntaxKind.NewLineTrivia: + indentNextTokenOrTrivia = true; + break; + } } } } + if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { + insertIndentation(currentTokenInfo.token.pos, indentation.getEffectiveIndentation(tokenStart.line, currentTokenInfo.token.kind), lineAdded); + } } - if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { - insertIndentation(currentTokenInfo.token.pos, indentation.getEffectiveIndentation(tokenStart.line, currentTokenInfo.token.kind), lineAdded); - } - } - formattingScanner.advance(); + formattingScanner.advance(); + + childContextNode = parent; + } } function processTrivia(trivia: TextRangeWithKind[], parent: Node, contextNode: Node, indentation: DynamicIndentation): void { @@ -535,6 +533,7 @@ module ts.formatting { indentation: DynamicIndentation): boolean { formattingContext.updateContext(previousItem, previousParent, currentItem, currentParent, contextNode); + var rule = rulesProvider.getRulesMap().GetRule(formattingContext); var trimTrailingWhitespaces: boolean; @@ -640,8 +639,8 @@ module ts.formatting { var startLinePos = getStartPositionOfLine(startLine, sourceFile); var nonWhitespaceColumn = i === 0 - ? nonWhitespaceColumnInFirstPart - : SmartIndenter.findFirstNonWhitespaceColumn(parts[i].pos, parts[i].end, sourceFile, options); + ? nonWhitespaceColumnInFirstPart + : SmartIndenter.findFirstNonWhitespaceColumn(parts[i].pos, parts[i].end, sourceFile, options); var newIndentation = nonWhitespaceColumn + delta; if (newIndentation > 0) { @@ -736,6 +735,7 @@ module ts.formatting { } } } + function isSomeBlock(kind: SyntaxKind): boolean { switch (kind) { case SyntaxKind.Block: @@ -745,9 +745,8 @@ module ts.formatting { case SyntaxKind.FinallyBlock: case SyntaxKind.ModuleBlock: return true; - default: - return false; } + return false; } function shouldIndentChildNodes(kind: SyntaxKind): boolean { @@ -794,7 +793,12 @@ module ts.formatting { return SyntaxKind.OpenParenToken; } break; + case SyntaxKind.TypeReference: + if ((node).typeArguments === list) { + return SyntaxKind.LessThanToken; + } } + return SyntaxKind.Unknown; } @@ -804,8 +808,8 @@ module ts.formatting { return SyntaxKind.CloseParenToken; case SyntaxKind.LessThanToken: return SyntaxKind.GreaterThanToken; - default: - return SyntaxKind.Unknown; } + + return SyntaxKind.Unknown; } } \ No newline at end of file diff --git a/src/services/smartIndenter.ts b/src/services/smartIndenter.ts index 98971b1f14a..932d90d3bd7 100644 --- a/src/services/smartIndenter.ts +++ b/src/services/smartIndenter.ts @@ -321,9 +321,8 @@ module ts.formatting { case SyntaxKind.ExportAssignment: case SyntaxKind.ReturnStatement: return true; - default: - return false; } + return false; } export function shouldIndentChildNode(parent: Node, child: Node): boolean { From 8464785aaf822669a402c1e6385aa3cb4cf03e76 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 7 Nov 2014 17:15:46 -0800 Subject: [PATCH 062/154] code cleanup: simplify DynamicIndentation interface --- src/services/format.ts | 182 ++++++++++++++++++++++------------------- 1 file changed, 98 insertions(+), 84 deletions(-) diff --git a/src/services/format.ts b/src/services/format.ts index 8b369b3006e..7c2d10f1137 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -24,7 +24,6 @@ module ts.formatting { getEffectiveCommentIndentation(commentLine: number): number; getDelta(): number; getIndentation(): number; - setDelta(delta: number): number; getCommentIndentation(): number; increaseCommentIndentation(delta: number): void; recomputeIndentation(lineAddedByFormatting: boolean): void; @@ -252,23 +251,9 @@ module ts.formatting { increaseCommentIndentation: (delta) => { commentIndentation += delta; }, - setDelta(newDelta: number): number { - var old = delta; - delta = newDelta; - return old; - } } } - function getListItemIndentation(node: Node, parentStartLine: number, options: EditorOptions): number { - var start = node.getStart(sourceFile); - var nodeStartLine = sourceFile.getLineAndCharacterFromPosition(start).line; - var startLinePosition = getStartPositionOfLine(nodeStartLine, sourceFile); - var shareLine = nodeStartLine === parentStartLine; - var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, start, sourceFile, options); - return shareLine && start !== column ? Indentation.Unknown : column; - } - function processNode(node: Node, contextNode: Node, nodeStartLine: number, indentation: number, delta: number) { if (!rangeOverlapsWithStartEnd(originalRange, node.getStart(sourceFile), node.getEnd())) { return; @@ -280,29 +265,30 @@ module ts.formatting { forEachChild( node, child => { - processChildNode(child, Indentation.Unknown, nodeStartLine, /*isListElement*/ false) + processChildNode(child, Indentation.Unknown, nodeIndentation, nodeStartLine, /*isListElement*/ false) }, - nodes => { + (nodes: NodeArray) => { var listStartToken = getOpenTokenForList(node, nodes); var listEndToken = getCloseTokenForOpenToken(listStartToken); + var listIndentation = nodeIndentation; + if (listStartToken !== SyntaxKind.Unknown) { // try to consume open token - if (formattingScanner.isOnToken()) { + while (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.kind === listStartToken) { + if (tokenInfo.token.end > nodes.pos) { + break; + } + else if (tokenInfo.token.kind === listStartToken) { var tokenStartLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; + var indentation = computeIndentation(tokenInfo.token, tokenStartLine, Indentation.Unknown, node, nodeStartLine); + listIndentation = getDynamicIndentation(node, nodeStartLine, indentation.indentation, indentation.indentation, indentation.delta); // make sure that this token does not belong to the child - var startTokenIndentation = nodeIndentation; - var tokenStartLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; - var oldDelta = -1; - if (node.parent.kind !== SyntaxKind.SourceFile && tokenStartLine !== nodeStartLine) { - oldDelta = nodeIndentation.setDelta(options.IndentSize); - } - consumeTokenAndAdvanceScanner(tokenInfo, node, startTokenIndentation); - if (oldDelta !== -1) { - nodeIndentation.setDelta(oldDelta); - } + consumeTokenAndAdvanceScanner(tokenInfo, node, listIndentation); + } + else { + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); } } } @@ -310,17 +296,14 @@ module ts.formatting { var inheritedIndentation: number = Indentation.Unknown; var effectiveStartLine = tokenStartLine || nodeStartLine; for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, effectiveStartLine, /*isListElement*/ true) + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, listIndentation, effectiveStartLine, /*isListElement*/ true) } if (listEndToken !== SyntaxKind.Unknown) { if (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.kind === listEndToken && formattingScanner.lastTrailingTriviaWasNewLine()) { - var old = nodeIndentation.setDelta(options.IndentSize); - //var endTokenIndentation = nodeIndentation.getIndentation() + options.IndentSize; - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); - nodeIndentation.setDelta(old); + consumeTokenAndAdvanceScanner(tokenInfo, node, listIndentation); } } } @@ -342,17 +325,18 @@ module ts.formatting { function processChildNode( child: Node, inheritedIndentation: number, - childEffectiveStartLine: number, - isListElement: boolean): number { + nodeIndentation: DynamicIndentation, + effectiveParentStartLine: number, + isListItem: boolean): number { if (child.kind === SyntaxKind.Missing) { return inheritedIndentation; } - var start = child.getStart(sourceFile); + var childStartPos = child.getStart(sourceFile); while (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > start) { + if (tokenInfo.token.end > childStartPos) { break; } @@ -363,23 +347,14 @@ module ts.formatting { return inheritedIndentation; } - var childStart = sourceFile.getLineAndCharacterFromPosition(start); - var actualIndentation = inheritedIndentation; - var childIndentationAmount = Indentation.Unknown; - var childDelta = 0; - var isChildInRange = rangeOverlapsWithStartEnd(originalRange, start, child.getEnd()); - if (isListElement) { - if (isChildInRange) { - if (inheritedIndentation !== Indentation.Unknown) { - childIndentationAmount = inheritedIndentation; - } - } - else { - var actualIndentation = getListItemIndentation(child, childEffectiveStartLine, options); - if (actualIndentation !== Indentation.Unknown) { - inheritedIndentation = childIndentationAmount = actualIndentation; - } - } + var childStart = sourceFile.getLineAndCharacterFromPosition(childStartPos); + var childIndentationAmount = + isListItem + ? tryComputeIndentationForListItem(childStartPos, child.end, effectiveParentStartLine, originalRange, inheritedIndentation) + : Indentation.Unknown; + + if (isListItem && childIndentationAmount !== Indentation.Unknown) { + inheritedIndentation = childIndentationAmount; } if (isToken(child)) { @@ -389,42 +364,79 @@ module ts.formatting { return inheritedIndentation; } - if (childIndentationAmount === Indentation.Unknown) { - if (isSomeBlock(child.kind)) { - // child is indented - childDelta = options.IndentSize; - if (isSomeBlock(node.kind) || node.kind === SyntaxKind.SourceFile || node.kind === SyntaxKind.CaseClause || node.kind === SyntaxKind.DefaultClause) { - childIndentationAmount = nodeIndentation.getIndentation() + nodeIndentation.getDelta(); - } - else { - childIndentationAmount = nodeIndentation.getIndentation(); - } - } - else { - if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStart.line, sourceFile)) { - childIndentationAmount = nodeIndentation.getIndentation(); - } - else { - childIndentationAmount = nodeIndentation.getIndentation() + nodeIndentation.getDelta(); - } - } - } + var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, effectiveParentStartLine); - if (shouldIndentChildNodes(child.kind)) { - childDelta = options.IndentSize; - } + processNode(child, childContextNode, childStart.line, childIndentation.indentation, childIndentation.delta); - if (childEffectiveStartLine === childStart.line) { - childIndentationAmount = nodeIndentation.getIndentation(); - childDelta = Math.min(options.IndentSize, delta + childDelta); - } - - processNode(child, childContextNode, childStart.line, childIndentationAmount, childDelta); childContextNode = node; return inheritedIndentation; } + function tryComputeIndentationForListItem(startPos: number, endPos: number, effectiveParentStartLine: number, range: TextRange, inheritedIndentation: number): number { + if (rangeOverlapsWithStartEnd(range, startPos, endPos)) { + if (inheritedIndentation !== Indentation.Unknown) { + return inheritedIndentation; + } + } + else { + var startLine = sourceFile.getLineAndCharacterFromPosition(startPos).line; + var startLinePosition = getStartLinePositionForPosition(startPos, sourceFile); + var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); + if (startLine !== effectiveParentStartLine || startPos === column) { + return column + } + } + + return Indentation.Unknown; + } + + function computeIndentation( + node: TextRangeWithKind, + startLine: number, + indentation: number, + parent: Node, + effectiveParentStartLine: number): { indentation: number; delta: number } { + + var delta = 0; + if (indentation === Indentation.Unknown) { + if (isSomeBlock(node.kind)) { + delta = options.IndentSize; + if (isSomeBlock(parent.kind) || + parent.kind === SyntaxKind.SourceFile || + parent.kind === SyntaxKind.CaseClause || + parent.kind === SyntaxKind.DefaultClause) { + + indentation = nodeIndentation.getIndentation() + nodeIndentation.getDelta(); + } + else { + indentation = nodeIndentation.getIndentation(); + } + } + else { + if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { + indentation = nodeIndentation.getIndentation(); + } + else { + indentation = nodeIndentation.getIndentation() + nodeIndentation.getDelta(); + } + } + } + + if (shouldIndentChildNodes(node.kind)) { + delta = options.IndentSize; + } + + if (effectiveParentStartLine === startLine) { + indentation = nodeIndentation.getIndentation(); + delta = Math.min(options.IndentSize, nodeIndentation.getDelta() + delta); + } + return { + indentation: indentation, + delta: delta + } + } + function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, indentation: DynamicIndentation): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); @@ -761,9 +773,11 @@ module ts.formatting { case SyntaxKind.DoStatement: case SyntaxKind.FunctionExpression: case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ArrowFunction: case SyntaxKind.Method: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: + case SyntaxKind.Constructor: return true; } From ae034d4fbdacd06f2847656b2ef23ad775dc3953 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 7 Nov 2014 18:43:48 -0800 Subject: [PATCH 063/154] code cleanup: fix typo in formatting scanner, removed explicit indentation for comments, invert conditions to reduce nesting --- src/services/format.ts | 146 +++++++++++------------ src/services/format/formattingScanner.ts | 2 +- 2 files changed, 71 insertions(+), 77 deletions(-) diff --git a/src/services/format.ts b/src/services/format.ts index 7c2d10f1137..d836f106a9d 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -20,12 +20,10 @@ module ts.formatting { } interface DynamicIndentation { - getEffectiveIndentation(tokenLine: number, kind: SyntaxKind): number; - getEffectiveCommentIndentation(commentLine: number): number; - getDelta(): number; + getIndentationForToken(tokenLine: number, tokenKind: SyntaxKind): number; + getIndentationForComment(owningToken: SyntaxKind): number; getIndentation(): number; - getCommentIndentation(): number; - increaseCommentIndentation(delta: number): void; + getDelta(): number; recomputeIndentation(lineAddedByFormatting: boolean): void; } @@ -128,42 +126,41 @@ module ts.formatting { if (!errors.length) { return rangeHasNoErrors; } - else { - // pick only errors that fall in range - var sorted = errors - .filter(d => d.isParseError && (d.start >= originalRange.pos && d.start + d.length < originalRange.end)) - .sort((e1, e2) => e1.start - e2.start); + + // pick only errors that fall in range + var sorted = errors + .filter(d => d.isParseError && (d.start >= originalRange.pos && d.start + d.length < originalRange.end)) + .sort((e1, e2) => e1.start - e2.start); - if (!sorted.length) { - return rangeHasNoErrors; - } + if (!sorted.length) { + return rangeHasNoErrors; + } - var index = 0; - return r => { - while (true) { - if (index >= sorted.length) { - return false; - } - else { - var curr = sorted[index]; - if (r.end <= curr.start) { - return false; - } - else { - var s = Math.max(r.pos, curr.start); - var e = Math.min(r.end, curr.start + curr.length); - if (s < e) { - return true; - } - index++; - } - } + var index = 0; + + return r => { + while (true) { + if (index >= sorted.length) { + return false; } - }; - function rangeHasNoErrors(r: TextRange): boolean { - return false; + var error = sorted[index]; + if (r.end <= error.start) { + return false; + } + + var s = Math.max(r.pos, error.start); + var e = Math.min(r.end, error.start + error.length); + if (s < e) { + return true; + } + + index++; } + }; + + function rangeHasNoErrors(r: TextRange): boolean { + return false; } } @@ -205,16 +202,23 @@ module ts.formatting { // local functions - function getDynamicIndentation(node: Node, nodeStartLine: number, indentation: number, commentIndentation: number, delta: number): DynamicIndentation { + function getDynamicIndentation(node: Node, nodeStartLine: number, indentation: number, delta: number): DynamicIndentation { return { - getEffectiveCommentIndentation: (line) => { - if (nodeStartLine !== line) { - return commentIndentation + delta; - } - return commentIndentation; - }, - getEffectiveIndentation: (line, kind) => { + getIndentationForComment: (kind) => { switch (kind) { + // preceding comment to the token that closes the indentation scope inherits the indentation from the scope + // .. { + // // comment + // } + case SyntaxKind.CloseBraceToken: + case SyntaxKind.CloseBracketToken: + return indentation + delta; + } + return indentation; + }, + getIndentationForToken: (line, kind) => { + switch (kind) { + // open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent case SyntaxKind.OpenBraceToken: case SyntaxKind.CloseBraceToken: case SyntaxKind.OpenBracketToken: @@ -224,21 +228,17 @@ module ts.formatting { return indentation; default: return nodeStartLine !== line ? indentation + delta : indentation; - } }, getIndentation: () => indentation, - getCommentIndentation: () => commentIndentation, getDelta: () => delta, recomputeIndentation: (lineAdded) => { if (node.parent && SmartIndenter.shouldIndentChildNode(node.parent, node)) { if (lineAdded) { indentation += options.IndentSize; - commentIndentation += options.IndentSize; } else { indentation -= options.IndentSize; - commentIndentation -= options.IndentSize; } if (shouldIndentChildNodes(node.kind)) { delta = options.IndentSize; @@ -248,9 +248,6 @@ module ts.formatting { } } }, - increaseCommentIndentation: (delta) => { - commentIndentation += delta; - }, } } @@ -259,7 +256,7 @@ module ts.formatting { return; } - var nodeIndentation = getDynamicIndentation(node, nodeStartLine, indentation, indentation, delta); + var nodeIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta); var childContextNode = contextNode; forEachChild( @@ -283,8 +280,7 @@ module ts.formatting { else if (tokenInfo.token.kind === listStartToken) { var tokenStartLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; var indentation = computeIndentation(tokenInfo.token, tokenStartLine, Indentation.Unknown, node, nodeStartLine); - listIndentation = getDynamicIndentation(node, nodeStartLine, indentation.indentation, indentation.indentation, indentation.delta); - // make sure that this token does not belong to the child + listIndentation = getDynamicIndentation(node, nodeStartLine, indentation.indentation, indentation.delta); consumeTokenAndAdvanceScanner(tokenInfo, node, listIndentation); } else { @@ -315,10 +311,6 @@ module ts.formatting { if (tokenInfo.token.end > node.end) { break; } - - if (SmartIndenter.nodeContentIsAlwaysIndented(node.kind) && node.end === tokenInfo.token.end) { - nodeIndentation.increaseCommentIndentation(options.IndentSize); - } consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); } @@ -400,7 +392,7 @@ module ts.formatting { var delta = 0; if (indentation === Indentation.Unknown) { - if (isSomeBlock(node.kind)) { + if (isSomeBlock(node.kind)) { delta = options.IndentSize; if (isSomeBlock(parent.kind) || parent.kind === SyntaxKind.SourceFile || @@ -466,34 +458,36 @@ module ts.formatting { processTrivia(currentTokenInfo.trailingTrivia, parent, childContextNode, indentation); } - if (lastTriviaWasNewLine && indentToken) { var indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { var triviaItem = currentTokenInfo.leadingTrivia[i]; + if (!rangeContainsRange(originalRange, triviaItem)) { + continue; + } + var triviaStartLine = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos).line; - if (rangeContainsRange(originalRange, triviaItem)) { - switch (triviaItem.kind) { - case SyntaxKind.MultiLineCommentTrivia: - indentMultilineComment(triviaItem, indentation.getCommentIndentation(), /*firstLineIsIndented*/ !indentNextTokenOrTrivia); + switch (triviaItem.kind) { + case SyntaxKind.MultiLineCommentTrivia: + indentMultilineComment(triviaItem, indentation.getIndentationForComment(currentTokenInfo.token.kind), /*firstLineIsIndented*/ !indentNextTokenOrTrivia); + indentNextTokenOrTrivia = false; + break; + case SyntaxKind.SingleLineCommentTrivia: + if (indentNextTokenOrTrivia) { + insertIndentation(triviaItem.pos, indentation.getIndentationForComment(currentTokenInfo.token.kind), /*lineAdded*/ false); indentNextTokenOrTrivia = false; - break; - case SyntaxKind.SingleLineCommentTrivia: - if (indentNextTokenOrTrivia) { - insertIndentation(triviaItem.pos, indentation.getCommentIndentation(), /*lineAdded*/ false); - indentNextTokenOrTrivia = false; - } - break; - case SyntaxKind.NewLineTrivia: - indentNextTokenOrTrivia = true; - break; - } + } + break; + case SyntaxKind.NewLineTrivia: + indentNextTokenOrTrivia = true; + break; } } } + if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { - insertIndentation(currentTokenInfo.token.pos, indentation.getEffectiveIndentation(tokenStart.line, currentTokenInfo.token.kind), lineAdded); + insertIndentation(currentTokenInfo.token.pos, indentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind), lineAdded); } } diff --git a/src/services/format/formattingScanner.ts b/src/services/format/formattingScanner.ts index eb6d7a7964f..ed7b84dd4bb 100644 --- a/src/services/format/formattingScanner.ts +++ b/src/services/format/formattingScanner.ts @@ -125,7 +125,7 @@ module ts.formatting { } var expectedScanAction = - shouldRescanSlashToken(n) + shouldRescanGreaterThanToken(n) ? ScanAction.RescanGreaterThanToken : shouldRescanSlashToken(n) ? ScanAction.RescanSlashToken From aafc54ed2057dcd0be3ef1f7443c62609fdda732 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 7 Nov 2014 18:50:59 -0800 Subject: [PATCH 064/154] code cleanup: removed redundant check --- src/services/format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/format.ts b/src/services/format.ts index d836f106a9d..c3abf265166 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -298,7 +298,7 @@ module ts.formatting { if (listEndToken !== SyntaxKind.Unknown) { if (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.kind === listEndToken && formattingScanner.lastTrailingTriviaWasNewLine()) { + if (tokenInfo.token.kind === listEndToken) { consumeTokenAndAdvanceScanner(tokenInfo, node, listIndentation); } } From 07469fb306b6f8424871a765407b2f7dc590608b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 8 Nov 2014 00:10:30 -0800 Subject: [PATCH 065/154] do not descend into child nodes if child does not overlap with target span --- src/services/format.ts | 38 ++++++++++++++++++++++------------- src/services/smartIndenter.ts | 2 +- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/services/format.ts b/src/services/format.ts index c3abf265166..9ecdb09e861 100644 --- a/src/services/format.ts +++ b/src/services/format.ts @@ -176,9 +176,14 @@ module ts.formatting { var formattingContext = new FormattingContext(sourceFile, requestKind); var enclosingNode = findEnclosingNode(originalRange, sourceFile); - var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); - - var formattingScanner = getFormattingScanner(sourceFile, enclosingNode.pos, originalRange.end); + if (enclosingNode.kind === SyntaxKind.SourceFile) { + var formattingScanner = getFormattingScanner(sourceFile, originalRange.pos, originalRange.end); + var initialIndentation = 0; + } + else { + var formattingScanner = getFormattingScanner(sourceFile, enclosingNode.pos, originalRange.end); + var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); + } var previousRangeHasError: boolean; var previousRange: TextRangeWithKind; @@ -321,11 +326,26 @@ module ts.formatting { effectiveParentStartLine: number, isListItem: boolean): number { + var childStartPos = child.getStart(sourceFile); + + var childStart = sourceFile.getLineAndCharacterFromPosition(childStartPos); + var childIndentationAmount = + isListItem + ? tryComputeIndentationForListItem(childStartPos, child.end, effectiveParentStartLine, originalRange, inheritedIndentation) + : Indentation.Unknown; + + if (isListItem && childIndentationAmount !== Indentation.Unknown) { + inheritedIndentation = childIndentationAmount; + } + + if (!rangeOverlapsWithStartEnd(originalRange, child.pos, child.end)) { + return inheritedIndentation; + } + if (child.kind === SyntaxKind.Missing) { return inheritedIndentation; } - var childStartPos = child.getStart(sourceFile); while (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > childStartPos) { @@ -339,16 +359,6 @@ module ts.formatting { return inheritedIndentation; } - var childStart = sourceFile.getLineAndCharacterFromPosition(childStartPos); - var childIndentationAmount = - isListItem - ? tryComputeIndentationForListItem(childStartPos, child.end, effectiveParentStartLine, originalRange, inheritedIndentation) - : Indentation.Unknown; - - if (isListItem && childIndentationAmount !== Indentation.Unknown) { - inheritedIndentation = childIndentationAmount; - } - if (isToken(child)) { var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); diff --git a/src/services/smartIndenter.ts b/src/services/smartIndenter.ts index 932d90d3bd7..7feee03d9d8 100644 --- a/src/services/smartIndenter.ts +++ b/src/services/smartIndenter.ts @@ -197,7 +197,7 @@ module ts.formatting { return candidate.end > position || !isCompletedNode(candidate, sourceFile); } - export function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: Node, childStartLine: number, sourceFile: SourceFile): boolean { + export function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: TextRangeWithKind, childStartLine: number, sourceFile: SourceFile): boolean { if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { var elseKeyword = findChildOfKind(parent, SyntaxKind.ElseKeyword, sourceFile); Debug.assert(elseKeyword !== undefined); From b1c2907e21f55b7b31525d4bf445541492d566c7 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 8 Nov 2014 22:26:48 -0800 Subject: [PATCH 066/154] removed old formatting implementation --- src/services/format/formattingContext.ts | 115 --- src/services/format/formattingRequestKind.ts | 26 - src/services/format/rule.ts | 32 - src/services/format/ruleAction.ts | 25 - src/services/format/ruleDescriptor.ts | 46 -- src/services/format/ruleFlag.ts | 23 - src/services/format/ruleOperation.ts | 44 -- src/services/format/ruleOperationContext.ts | 47 -- src/services/format/rules.ts | 717 ------------------ src/services/format/rulesMap.ts | 189 ----- src/services/format/rulesProvider.ts | 117 --- src/services/format/tokenRange.ts | 142 ---- src/services/format/tokenSpan.ts | 25 - src/services/{format.ts => formatting.ts} | 8 +- src/services/formatting/formatter.ts | 320 -------- src/services/formatting/formatting.ts | 39 - src/services/formatting/formattingContext.ts | 87 ++- src/services/formatting/formattingManager.ts | 125 --- .../formatting/formattingRequestKind.ts | 9 +- .../formattingScanner.ts | 0 .../{format => formatting}/indentation.ts | 0 .../formatting/indentationNodeContext.ts | 103 --- .../formatting/indentationNodeContextPool.ts | 43 -- .../formatting/indentationTrackingWalker.ts | 365 --------- .../formatting/multipleTokenIndenter.ts | 206 ----- .../references.ts} | 0 src/services/formatting/rule.ts | 4 +- src/services/formatting/ruleAction.ts | 14 +- src/services/formatting/ruleDescriptor.ts | 4 +- src/services/formatting/ruleFlag.ts | 6 +- src/services/formatting/ruleOperation.ts | 4 +- .../formatting/ruleOperationContext.ts | 4 +- src/services/formatting/rules.ts | 149 +++- src/services/formatting/rulesMap.ts | 4 +- src/services/formatting/rulesProvider.ts | 4 +- src/services/formatting/snapshotPoint.ts | 30 - src/services/formatting/textEditInfo.ts | 28 - src/services/formatting/textSnapshot.ts | 89 --- src/services/formatting/textSnapshotLine.ts | 80 -- src/services/formatting/tokenRange.ts | 32 +- src/services/formatting/tokenSpan.ts | 7 +- src/services/indentation.ts | 154 ---- src/services/services.ts | 54 +- 43 files changed, 205 insertions(+), 3315 deletions(-) delete mode 100644 src/services/format/formattingContext.ts delete mode 100644 src/services/format/formattingRequestKind.ts delete mode 100644 src/services/format/rule.ts delete mode 100644 src/services/format/ruleAction.ts delete mode 100644 src/services/format/ruleDescriptor.ts delete mode 100644 src/services/format/ruleFlag.ts delete mode 100644 src/services/format/ruleOperation.ts delete mode 100644 src/services/format/ruleOperationContext.ts delete mode 100644 src/services/format/rules.ts delete mode 100644 src/services/format/rulesMap.ts delete mode 100644 src/services/format/rulesProvider.ts delete mode 100644 src/services/format/tokenRange.ts delete mode 100644 src/services/format/tokenSpan.ts rename src/services/{format.ts => formatting.ts} (97%) delete mode 100644 src/services/formatting/formatter.ts delete mode 100644 src/services/formatting/formatting.ts delete mode 100644 src/services/formatting/formattingManager.ts rename src/services/{format => formatting}/formattingScanner.ts (100%) rename src/services/{format => formatting}/indentation.ts (100%) delete mode 100644 src/services/formatting/indentationNodeContext.ts delete mode 100644 src/services/formatting/indentationNodeContextPool.ts delete mode 100644 src/services/formatting/indentationTrackingWalker.ts delete mode 100644 src/services/formatting/multipleTokenIndenter.ts rename src/services/{format/formatting.ts => formatting/references.ts} (100%) delete mode 100644 src/services/formatting/snapshotPoint.ts delete mode 100644 src/services/formatting/textEditInfo.ts delete mode 100644 src/services/formatting/textSnapshot.ts delete mode 100644 src/services/formatting/textSnapshotLine.ts delete mode 100644 src/services/indentation.ts diff --git a/src/services/format/formattingContext.ts b/src/services/format/formattingContext.ts deleted file mode 100644 index d96830e6e80..00000000000 --- a/src/services/format/formattingContext.ts +++ /dev/null @@ -1,115 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class FormattingContext { - public currentTokenSpan: TextRangeWithKind; - public nextTokenSpan: TextRangeWithKind; - public contextNode: Node; - public currentTokenParent: Node; - public nextTokenParent: Node; - - private contextNodeAllOnSameLine: boolean; - private nextNodeAllOnSameLine: boolean; - private tokensAreOnSameLine: boolean; - private contextNodeBlockIsOnOneLine: boolean; - private nextNodeBlockIsOnOneLine: boolean; - - constructor(private sourceFile: SourceFile, public formattingRequestKind: FormattingRequestKind) { - } - - public updateContext(currentRange: TextRangeWithKind, currentTokenParent: Node, nextRange: TextRangeWithKind, nextTokenParent: Node, commonParent: Node) { - Debug.assert(currentRange != null, "currentTokenSpan is null"); - Debug.assert(currentTokenParent != null, "currentTokenParent is null"); - Debug.assert(nextRange != null, "nextTokenSpan is null"); - Debug.assert(nextTokenParent != null, "nextTokenParent is null"); - Debug.assert(commonParent != null, "commonParent is null"); - - this.currentTokenSpan = currentRange; - this.currentTokenParent = currentTokenParent; - this.nextTokenSpan = nextRange; - this.nextTokenParent = nextTokenParent; - this.contextNode = commonParent; - - // drop cached results - this.contextNodeAllOnSameLine = undefined; - this.nextNodeAllOnSameLine = undefined; - this.tokensAreOnSameLine = undefined; - this.contextNodeBlockIsOnOneLine = undefined; - this.nextNodeBlockIsOnOneLine = undefined; - } - - public ContextNodeAllOnSameLine(): boolean { - if (this.contextNodeAllOnSameLine === undefined) { - this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode); - } - - return this.contextNodeAllOnSameLine; - } - - public NextNodeAllOnSameLine(): boolean { - if (this.nextNodeAllOnSameLine === undefined) { - this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent); - } - - return this.nextNodeAllOnSameLine; - } - - public TokensAreOnSameLine(): boolean { - if (this.tokensAreOnSameLine === undefined) { - var startLine = this.sourceFile.getLineAndCharacterFromPosition(this.currentTokenSpan.pos).line; - var endLine = this.sourceFile.getLineAndCharacterFromPosition(this.nextTokenSpan.pos).line; - this.tokensAreOnSameLine = (startLine == endLine); - } - - return this.tokensAreOnSameLine; - } - - public ContextNodeBlockIsOnOneLine() { - if (this.contextNodeBlockIsOnOneLine === undefined) { - this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode); - } - - return this.contextNodeBlockIsOnOneLine; - } - - public NextNodeBlockIsOnOneLine() { - if (this.nextNodeBlockIsOnOneLine === undefined) { - this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent); - } - - return this.nextNodeBlockIsOnOneLine; - } - - private NodeIsOnOneLine(node: Node): boolean { - var startLine = this.sourceFile.getLineAndCharacterFromPosition(node.getStart(this.sourceFile)).line; - var endLine = this.sourceFile.getLineAndCharacterFromPosition(node.getEnd()).line; - return startLine == endLine; - } - - private BlockIsOnOneLine(node: Node): boolean { - var openBrace = findChildOfKind(node, SyntaxKind.OpenBraceToken, this.sourceFile); - var closeBrace = findChildOfKind(node, SyntaxKind.CloseBraceToken, this.sourceFile); - if (openBrace && closeBrace) { - var startLine = this.sourceFile.getLineAndCharacterFromPosition(openBrace.getEnd()).line; - var endLine = this.sourceFile.getLineAndCharacterFromPosition(closeBrace.getStart(this.sourceFile)).line; - return startLine === endLine; - } - return false; - } - } -} \ No newline at end of file diff --git a/src/services/format/formattingRequestKind.ts b/src/services/format/formattingRequestKind.ts deleted file mode 100644 index 38cc0f233a2..00000000000 --- a/src/services/format/formattingRequestKind.ts +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export const enum FormattingRequestKind { - FormatDocument, - FormatSelection, - FormatOnEnter, - FormatOnSemicolon, - FormatOnClosingCurlyBrace - } -} \ No newline at end of file diff --git a/src/services/format/rule.ts b/src/services/format/rule.ts deleted file mode 100644 index f2550d40761..00000000000 --- a/src/services/format/rule.ts +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class Rule { - constructor( - public Descriptor: RuleDescriptor, - public Operation: RuleOperation, - public Flag: RuleFlags = RuleFlags.None) { - } - - public toString() { - return "[desc=" + this.Descriptor + "," + - "operation=" + this.Operation + "," + - "flag=" + this.Flag + "]"; - } - } -} \ No newline at end of file diff --git a/src/services/format/ruleAction.ts b/src/services/format/ruleAction.ts deleted file mode 100644 index 596a7a64451..00000000000 --- a/src/services/format/ruleAction.ts +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export const enum RuleAction { - Ignore = 0x00000001, - Space = 0x00000002, - NewLine = 0x00000004, - Delete = 0x00000008 - } -} \ No newline at end of file diff --git a/src/services/format/ruleDescriptor.ts b/src/services/format/ruleDescriptor.ts deleted file mode 100644 index e93f035b5be..00000000000 --- a/src/services/format/ruleDescriptor.ts +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class RuleDescriptor { - constructor(public LeftTokenRange: Shared.TokenRange, public RightTokenRange: Shared.TokenRange) { - } - - public toString(): string { - return "[leftRange=" + this.LeftTokenRange + "," + - "rightRange=" + this.RightTokenRange + "]"; - } - - static create1(left: SyntaxKind, right: SyntaxKind): RuleDescriptor { - return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), Shared.TokenRange.FromToken(right)); - } - - static create2(left: Shared.TokenRange, right: SyntaxKind): RuleDescriptor { - return RuleDescriptor.create4(left, Shared.TokenRange.FromToken(right)); - } - - static create3(left: SyntaxKind, right: Shared.TokenRange): RuleDescriptor - //: this(TokenRange.FromToken(left), right) - { - return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), right); - } - - static create4(left: Shared.TokenRange, right: Shared.TokenRange): RuleDescriptor { - return new RuleDescriptor(left, right); - } - } -} \ No newline at end of file diff --git a/src/services/format/ruleFlag.ts b/src/services/format/ruleFlag.ts deleted file mode 100644 index 1e55abc54c1..00000000000 --- a/src/services/format/ruleFlag.ts +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export const enum RuleFlags { - None, - CanDeleteNewLines - } -} \ No newline at end of file diff --git a/src/services/format/ruleOperation.ts b/src/services/format/ruleOperation.ts deleted file mode 100644 index e0e75b6a711..00000000000 --- a/src/services/format/ruleOperation.ts +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class RuleOperation { - public Context: RuleOperationContext; - public Action: RuleAction; - - constructor() { - this.Context = null; - this.Action = null; - } - - public toString(): string { - return "[context=" + this.Context + "," + - "action=" + this.Action + "]"; - } - - static create1(action: RuleAction) { - return RuleOperation.create2(RuleOperationContext.Any, action) - } - - static create2(context: RuleOperationContext, action: RuleAction) { - var result = new RuleOperation(); - result.Context = context; - result.Action = action; - return result; - } - } -} \ No newline at end of file diff --git a/src/services/format/ruleOperationContext.ts b/src/services/format/ruleOperationContext.ts deleted file mode 100644 index 2c2e8e8b5a4..00000000000 --- a/src/services/format/ruleOperationContext.ts +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - - export class RuleOperationContext { - private customContextChecks: { (context: FormattingContext): boolean; }[]; - - constructor(...funcs: { (context: FormattingContext): boolean; }[]) { - this.customContextChecks = funcs; - } - - static Any: RuleOperationContext = new RuleOperationContext(); - - - public IsAny(): boolean { - return this == RuleOperationContext.Any; - } - - public InContext(context: FormattingContext): boolean { - if (this.IsAny()) { - return true; - } - - for (var i = 0, len = this.customContextChecks.length; i < len; i++) { - if (!this.customContextChecks[i](context)) { - return false; - } - } - return true; - } - } -} \ No newline at end of file diff --git a/src/services/format/rules.ts b/src/services/format/rules.ts deleted file mode 100644 index bb54f85ca1e..00000000000 --- a/src/services/format/rules.ts +++ /dev/null @@ -1,717 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class Rules { - public getRuleName(rule: Rule) { - var o: ts.Map = this; - for (var name in o) { - if (o[name] === rule) { - return name; - } - } - throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.Unknown_rule, null)); - } - - [name: string]: any; - - public IgnoreBeforeComment: Rule; - public IgnoreAfterLineComment: Rule; - - // Space after keyword but not before ; or : or ? - public NoSpaceBeforeSemicolon: Rule; - public NoSpaceBeforeColon: Rule; - public NoSpaceBeforeQMark: Rule; - public SpaceAfterColon: Rule; - public SpaceAfterQMark: Rule; - public SpaceAfterSemicolon: Rule; - - // Space/new line after }. - public SpaceAfterCloseBrace: Rule; - - // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied - // Also should not apply to }) - public SpaceBetweenCloseBraceAndElse: Rule; - public SpaceBetweenCloseBraceAndWhile: Rule; - public NoSpaceAfterCloseBrace: Rule; - - // No space for indexer and dot - public NoSpaceBeforeDot: Rule; - public NoSpaceAfterDot: Rule; - public NoSpaceBeforeOpenBracket: Rule; - public NoSpaceAfterOpenBracket: Rule; - public NoSpaceBeforeCloseBracket: Rule; - public NoSpaceAfterCloseBracket: Rule; - - // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. - public SpaceAfterOpenBrace: Rule; - public SpaceBeforeCloseBrace: Rule; - public NoSpaceBetweenEmptyBraceBrackets: Rule; - - // Insert new line after { and before } in multi-line contexts. - public NewLineAfterOpenBraceInBlockContext: Rule; - - // For functions and control block place } on a new line [multi-line rule] - public NewLineBeforeCloseBraceInBlockContext: Rule; - - // Special handling of unary operators. - // Prefix operators generally shouldn't have a space between - // them and their target unary expression. - public NoSpaceAfterUnaryPrefixOperator: Rule; - public NoSpaceAfterUnaryPreincrementOperator: Rule; - public NoSpaceAfterUnaryPredecrementOperator: Rule; - public NoSpaceBeforeUnaryPostincrementOperator: Rule; - public NoSpaceBeforeUnaryPostdecrementOperator: Rule; - - // More unary operator special-casing. - // DevDiv 181814: Be careful when removing leading whitespace - // around unary operators. Examples: - // 1 - -2 --X--> 1--2 - // a + ++b --X--> a+++b - public SpaceAfterPostincrementWhenFollowedByAdd: Rule; - public SpaceAfterAddWhenFollowedByUnaryPlus: Rule; - public SpaceAfterAddWhenFollowedByPreincrement: Rule; - public SpaceAfterPostdecrementWhenFollowedBySubtract: Rule; - public SpaceAfterSubtractWhenFollowedByUnaryMinus: Rule; - public SpaceAfterSubtractWhenFollowedByPredecrement: Rule; - - public NoSpaceBeforeComma: Rule; - - public SpaceAfterCertainKeywords: Rule; - public NoSpaceBeforeOpenParenInFuncCall: Rule; - public SpaceAfterFunctionInFuncDecl: Rule; - public NoSpaceBeforeOpenParenInFuncDecl: Rule; - public SpaceAfterVoidOperator: Rule; - - public NoSpaceBetweenReturnAndSemicolon: Rule; - - // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. - // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] - public SpaceBetweenStatements: Rule; - - // This low-pri rule takes care of "try {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - public SpaceAfterTryFinally: Rule; - - // For get/set members, we check for (identifier,identifier) since get/set don't have tokens and they are represented as just an identifier token. - // Though, we do extra check on the context to make sure we are dealing with get/set node. Example: - // get x() {} - // set x(val) {} - public SpaceAfterGetSetInMember: Rule; - - // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. - public SpaceBeforeBinaryKeywordOperator: Rule; - public SpaceAfterBinaryKeywordOperator: Rule; - - // TypeScript-specific rules - - // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - public NoSpaceAfterConstructor: Rule; - - // Use of module as a function call. e.g.: import m2 = module("m2"); - public NoSpaceAfterModuleImport: Rule; - - // Add a space around certain TypeScript keywords - public SpaceAfterCertainTypeScriptKeywords: Rule; - public SpaceBeforeCertainTypeScriptKeywords: Rule; - - // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { - public SpaceAfterModuleName: Rule; - - // Lambda expressions - public SpaceAfterArrow: Rule; - - // Optional parameters and var args - public NoSpaceAfterEllipsis: Rule; - public NoSpaceAfterOptionalParameters: Rule; - - // generics - public NoSpaceBeforeOpenAngularBracket: Rule; - public NoSpaceBetweenCloseParenAndAngularBracket: Rule; - public NoSpaceAfterOpenAngularBracket: Rule; - public NoSpaceBeforeCloseAngularBracket: Rule; - public NoSpaceAfterCloseAngularBracket: Rule; - - // Remove spaces in empty interface literals. e.g.: x: {} - public NoSpaceBetweenEmptyInterfaceBraceBrackets: Rule; - - // These rules are higher in priority than user-configurable rules. - public HighPriorityCommonRules: Rule[]; - - // These rules are lower in priority than user-configurable rules. - public LowPriorityCommonRules: Rule[]; - - /// - /// Rules controlled by user options - /// - - // Insert space after comma delimiter - public SpaceAfterComma: Rule; - public NoSpaceAfterComma: Rule; - - // Insert space before and after binary operators - public SpaceBeforeBinaryOperator: Rule; - public SpaceAfterBinaryOperator: Rule; - public NoSpaceBeforeBinaryOperator: Rule; - public NoSpaceAfterBinaryOperator: Rule; - - // Insert space after keywords in control flow statements - public SpaceAfterKeywordInControl: Rule; - public NoSpaceAfterKeywordInControl: Rule; - - // Open Brace braces after function - //TypeScript: Function can have return types, which can be made of tons of different token kinds - public FunctionOpenBraceLeftTokenRange: Shared.TokenRange; - public SpaceBeforeOpenBraceInFunction: Rule; - public NewLineBeforeOpenBraceInFunction: Rule; - - // Open Brace braces after TypeScript module/class/interface - public TypeScriptOpenBraceLeftTokenRange: Shared.TokenRange; - public SpaceBeforeOpenBraceInTypeScriptDeclWithBlock: Rule; - public NewLineBeforeOpenBraceInTypeScriptDeclWithBlock: Rule; - - // Open Brace braces after control block - public ControlOpenBraceLeftTokenRange: Shared.TokenRange; - public SpaceBeforeOpenBraceInControl: Rule; - public NewLineBeforeOpenBraceInControl: Rule; - - // Insert space after semicolon in for statement - public SpaceAfterSemicolonInFor: Rule; - public NoSpaceAfterSemicolonInFor: Rule; - - // Insert space after opening and before closing nonempty parenthesis - public SpaceAfterOpenParen: Rule; - public SpaceBeforeCloseParen: Rule; - public NoSpaceBetweenParens: Rule; - public NoSpaceAfterOpenParen: Rule; - public NoSpaceBeforeCloseParen: Rule; - - // Insert space after function keyword for anonymous functions - public SpaceAfterAnonymousFunctionKeyword: Rule; - public NoSpaceAfterAnonymousFunctionKeyword: Rule; - - constructor() { - /// - /// Common Rules - /// - - // Leave comments alone - this.IgnoreBeforeComment = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.Comments), RuleOperation.create1(RuleAction.Ignore)); - this.IgnoreAfterLineComment = new Rule(RuleDescriptor.create3(SyntaxKind.SingleLineCommentTrivia, Shared.TokenRange.Any), RuleOperation.create1(RuleAction.Ignore)); - - // Space after keyword but not before ; or : or ? - this.NoSpaceBeforeSemicolon = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.SemicolonToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceBeforeColon = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.ColonToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); - this.NoSpaceBeforeQMark = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.QuestionToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); - this.SpaceAfterColon = new Rule(RuleDescriptor.create3(SyntaxKind.ColonToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Space)); - this.SpaceAfterQMark = new Rule(RuleDescriptor.create3(SyntaxKind.QuestionToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Space)); - this.SpaceAfterSemicolon = new Rule(RuleDescriptor.create3(SyntaxKind.SemicolonToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - - // Space after }. - this.SpaceAfterCloseBrace = new Rule(RuleDescriptor.create3(SyntaxKind.CloseBraceToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsAfterCodeBlockContext), RuleAction.Space)); - - // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied - this.SpaceBetweenCloseBraceAndElse = new Rule(RuleDescriptor.create1(SyntaxKind.CloseBraceToken, SyntaxKind.ElseKeyword), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - this.SpaceBetweenCloseBraceAndWhile = new Rule(RuleDescriptor.create1(SyntaxKind.CloseBraceToken, SyntaxKind.WhileKeyword), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - this.NoSpaceAfterCloseBrace = new Rule(RuleDescriptor.create3(SyntaxKind.CloseBraceToken, Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.CommaToken, SyntaxKind.SemicolonToken])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - - // No space for indexer and dot - this.NoSpaceBeforeDot = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.DotToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceAfterDot = new Rule(RuleDescriptor.create3(SyntaxKind.DotToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceBeforeOpenBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.OpenBracketToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceAfterOpenBracket = new Rule(RuleDescriptor.create3(SyntaxKind.OpenBracketToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceBeforeCloseBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CloseBracketToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceAfterCloseBracket = new Rule(RuleDescriptor.create3(SyntaxKind.CloseBracketToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - - // Place a space before open brace in a function declaration - this.FunctionOpenBraceLeftTokenRange = Shared.TokenRange.AnyIncludingMultilineComments; - this.SpaceBeforeOpenBraceInFunction = new Rule(RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), RuleAction.Space), RuleFlags.CanDeleteNewLines); - - // Place a space before open brace in a TypeScript declaration that has braces as children (class, module, enum, etc) - this.TypeScriptOpenBraceLeftTokenRange = Shared.TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.MultiLineCommentTrivia]); - this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new Rule(RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), RuleAction.Space), RuleFlags.CanDeleteNewLines); - - // Place a space before open brace in a control flow construct - this.ControlOpenBraceLeftTokenRange = Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.MultiLineCommentTrivia, SyntaxKind.DoKeyword, SyntaxKind.TryKeyword, SyntaxKind.FinallyKeyword, SyntaxKind.ElseKeyword]); - this.SpaceBeforeOpenBraceInControl = new Rule(RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), RuleAction.Space), RuleFlags.CanDeleteNewLines); - - // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. - this.SpaceAfterOpenBrace = new Rule(RuleDescriptor.create3(SyntaxKind.OpenBraceToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSingleLineBlockContext), RuleAction.Space)); - this.SpaceBeforeCloseBrace = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CloseBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSingleLineBlockContext), RuleAction.Space)); - this.NoSpaceBetweenEmptyBraceBrackets = new Rule(RuleDescriptor.create1(SyntaxKind.OpenBraceToken, SyntaxKind.CloseBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectContext), RuleAction.Delete)); - - // Insert new line after { and before } in multi-line contexts. - this.NewLineAfterOpenBraceInBlockContext = new Rule(RuleDescriptor.create3(SyntaxKind.OpenBraceToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsMultilineBlockContext), RuleAction.NewLine)); - - // For functions and control block place } on a new line [multi-line rule] - this.NewLineBeforeCloseBraceInBlockContext = new Rule(RuleDescriptor.create2(Shared.TokenRange.AnyIncludingMultilineComments, SyntaxKind.CloseBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsMultilineBlockContext), RuleAction.NewLine)); - - // Special handling of unary operators. - // Prefix operators generally shouldn't have a space between - // them and their target unary expression. - this.NoSpaceAfterUnaryPrefixOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.UnaryPrefixOperators, Shared.TokenRange.UnaryPrefixExpressions), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); - this.NoSpaceAfterUnaryPreincrementOperator = new Rule(RuleDescriptor.create3(SyntaxKind.PlusPlusToken, Shared.TokenRange.UnaryPreincrementExpressions), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceAfterUnaryPredecrementOperator = new Rule(RuleDescriptor.create3(SyntaxKind.MinusMinusToken, Shared.TokenRange.UnaryPredecrementExpressions), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceBeforeUnaryPostincrementOperator = new Rule(RuleDescriptor.create2(Shared.TokenRange.UnaryPostincrementExpressions, SyntaxKind.PlusPlusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceBeforeUnaryPostdecrementOperator = new Rule(RuleDescriptor.create2(Shared.TokenRange.UnaryPostdecrementExpressions, SyntaxKind.MinusMinusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - - // More unary operator special-casing. - // DevDiv 181814: Be careful when removing leading whitespace - // around unary operators. Examples: - // 1 - -2 --X--> 1--2 - // a + ++b --X--> a+++b - this.SpaceAfterPostincrementWhenFollowedByAdd = new Rule(RuleDescriptor.create1(SyntaxKind.PlusPlusToken, SyntaxKind.PlusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); - this.SpaceAfterAddWhenFollowedByUnaryPlus = new Rule(RuleDescriptor.create1(SyntaxKind.PlusToken, SyntaxKind.PlusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); - this.SpaceAfterAddWhenFollowedByPreincrement = new Rule(RuleDescriptor.create1(SyntaxKind.PlusToken, SyntaxKind.PlusPlusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); - this.SpaceAfterPostdecrementWhenFollowedBySubtract = new Rule(RuleDescriptor.create1(SyntaxKind.MinusMinusToken, SyntaxKind.MinusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); - this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new Rule(RuleDescriptor.create1(SyntaxKind.MinusToken, SyntaxKind.MinusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); - this.SpaceAfterSubtractWhenFollowedByPredecrement = new Rule(RuleDescriptor.create1(SyntaxKind.MinusToken, SyntaxKind.MinusMinusToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); - - this.NoSpaceBeforeComma = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CommaToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - - this.SpaceAfterCertainKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.VarKeyword, SyntaxKind.ThrowKeyword, SyntaxKind.NewKeyword, SyntaxKind.DeleteKeyword, SyntaxKind.ReturnKeyword, SyntaxKind.TypeOfKeyword]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - this.NoSpaceBeforeOpenParenInFuncCall = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionCallOrNewContext), RuleAction.Delete)); - this.SpaceAfterFunctionInFuncDecl = new Rule(RuleDescriptor.create3(SyntaxKind.FunctionKeyword, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space)); - this.NoSpaceBeforeOpenParenInFuncDecl = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionDeclContext), RuleAction.Delete)); - this.SpaceAfterVoidOperator = new Rule(RuleDescriptor.create3(SyntaxKind.VoidKeyword, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsVoidOpContext), RuleAction.Space)); - - this.NoSpaceBetweenReturnAndSemicolon = new Rule(RuleDescriptor.create1(SyntaxKind.ReturnKeyword, SyntaxKind.SemicolonToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - - // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. - // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] - this.SpaceBetweenStatements = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.DoKeyword, SyntaxKind.ElseKeyword, SyntaxKind.CaseKeyword]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotForContext), RuleAction.Space)); - - // This low-pri rule takes care of "try {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - this.SpaceAfterTryFinally = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.TryKeyword, SyntaxKind.FinallyKeyword]), SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - - // get x() {} - // set x(val) {} - this.SpaceAfterGetSetInMember = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.GetKeyword, SyntaxKind.SetKeyword]), SyntaxKind.Identifier), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space)); - - // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. - this.SpaceBeforeBinaryKeywordOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.BinaryKeywordOperators), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); - this.SpaceAfterBinaryKeywordOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.BinaryKeywordOperators, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); - - // TypeScript-specific higher priority rules - - // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - this.NoSpaceAfterConstructor = new Rule(RuleDescriptor.create1(SyntaxKind.ConstructorKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - - // Use of module as a function call. e.g.: import m2 = module("m2"); - this.NoSpaceAfterModuleImport = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.ModuleKeyword, SyntaxKind.RequireKeyword]), SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - - // Add a space around certain TypeScript keywords - this.SpaceAfterCertainTypeScriptKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.ClassKeyword, SyntaxKind.DeclareKeyword, SyntaxKind.EnumKeyword, SyntaxKind.ExportKeyword, SyntaxKind.ExtendsKeyword, SyntaxKind.GetKeyword, SyntaxKind.ImplementsKeyword, SyntaxKind.ImportKeyword, SyntaxKind.InterfaceKeyword, SyntaxKind.ModuleKeyword, SyntaxKind.PrivateKeyword, SyntaxKind.PublicKeyword, SyntaxKind.SetKeyword, SyntaxKind.StaticKeyword]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - this.SpaceBeforeCertainTypeScriptKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.FromTokens([SyntaxKind.ExtendsKeyword, SyntaxKind.ImplementsKeyword])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - - // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { - this.SpaceAfterModuleName = new Rule(RuleDescriptor.create1(SyntaxKind.StringLiteral, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsModuleDeclContext), RuleAction.Space)); - - // Lambda expressions - this.SpaceAfterArrow = new Rule(RuleDescriptor.create3(SyntaxKind.EqualsGreaterThanToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - - // Optional parameters and var args - this.NoSpaceAfterEllipsis = new Rule(RuleDescriptor.create1(SyntaxKind.DotDotDotToken, SyntaxKind.Identifier), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceAfterOptionalParameters = new Rule(RuleDescriptor.create3(SyntaxKind.QuestionToken, Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.CommaToken])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); - - // generics - this.NoSpaceBeforeOpenAngularBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.TypeNames, SyntaxKind.LessThanToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), RuleAction.Delete)); - this.NoSpaceBetweenCloseParenAndAngularBracket = new Rule(RuleDescriptor.create1(SyntaxKind.CloseParenToken, SyntaxKind.LessThanToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), RuleAction.Delete)); - this.NoSpaceAfterOpenAngularBracket = new Rule(RuleDescriptor.create3(SyntaxKind.LessThanToken, Shared.TokenRange.TypeNames), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), RuleAction.Delete)); - this.NoSpaceBeforeCloseAngularBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.GreaterThanToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), RuleAction.Delete)); - this.NoSpaceAfterCloseAngularBracket = new Rule(RuleDescriptor.create3(SyntaxKind.GreaterThanToken, Shared.TokenRange.FromTokens([SyntaxKind.OpenParenToken, SyntaxKind.OpenBracketToken, SyntaxKind.GreaterThanToken, SyntaxKind.CommaToken])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), RuleAction.Delete)); - - // Remove spaces in empty interface literals. e.g.: x: {} - this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new Rule(RuleDescriptor.create1(SyntaxKind.OpenBraceToken, SyntaxKind.CloseBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectTypeContext), RuleAction.Delete)); - - // These rules are higher in priority than user-configurable rules. - this.HighPriorityCommonRules = - [ - this.IgnoreBeforeComment, this.IgnoreAfterLineComment, - this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQMark, this.SpaceAfterQMark, - this.NoSpaceBeforeDot, this.NoSpaceAfterDot, - this.NoSpaceAfterUnaryPrefixOperator, - this.NoSpaceAfterUnaryPreincrementOperator, this.NoSpaceAfterUnaryPredecrementOperator, - this.NoSpaceBeforeUnaryPostincrementOperator, this.NoSpaceBeforeUnaryPostdecrementOperator, - this.SpaceAfterPostincrementWhenFollowedByAdd, - this.SpaceAfterAddWhenFollowedByUnaryPlus, this.SpaceAfterAddWhenFollowedByPreincrement, - this.SpaceAfterPostdecrementWhenFollowedBySubtract, - this.SpaceAfterSubtractWhenFollowedByUnaryMinus, this.SpaceAfterSubtractWhenFollowedByPredecrement, - this.NoSpaceAfterCloseBrace, - this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NewLineBeforeCloseBraceInBlockContext, - this.SpaceAfterCloseBrace, this.SpaceBetweenCloseBraceAndElse, this.SpaceBetweenCloseBraceAndWhile, this.NoSpaceBetweenEmptyBraceBrackets, - this.SpaceAfterFunctionInFuncDecl, this.NewLineAfterOpenBraceInBlockContext, this.SpaceAfterGetSetInMember, - this.NoSpaceBetweenReturnAndSemicolon, - this.SpaceAfterCertainKeywords, - this.NoSpaceBeforeOpenParenInFuncCall, - this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, - this.SpaceAfterVoidOperator, - - // TypeScript-specific rules - this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, - this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, - this.SpaceAfterModuleName, - this.SpaceAfterArrow, - this.NoSpaceAfterEllipsis, - this.NoSpaceAfterOptionalParameters, - this.NoSpaceBetweenEmptyInterfaceBraceBrackets, - this.NoSpaceBeforeOpenAngularBracket, - this.NoSpaceBetweenCloseParenAndAngularBracket, - this.NoSpaceAfterOpenAngularBracket, - this.NoSpaceBeforeCloseAngularBracket, - this.NoSpaceAfterCloseAngularBracket - ]; - - // These rules are lower in priority than user-configurable rules. - this.LowPriorityCommonRules = - [ - this.NoSpaceBeforeSemicolon, - this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, - this.NoSpaceBeforeComma, - this.NoSpaceBeforeOpenBracket, this.NoSpaceAfterOpenBracket, - this.NoSpaceBeforeCloseBracket, this.NoSpaceAfterCloseBracket, - this.SpaceAfterSemicolon, - this.NoSpaceBeforeOpenParenInFuncDecl, - this.SpaceBetweenStatements, this.SpaceAfterTryFinally - ]; - - /// - /// Rules controlled by user options - /// - - // Insert space after comma delimiter - this.SpaceAfterComma = new Rule(RuleDescriptor.create3(SyntaxKind.CommaToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - this.NoSpaceAfterComma = new Rule(RuleDescriptor.create3(SyntaxKind.CommaToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - - // Insert space before and after binary operators - this.SpaceBeforeBinaryOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.BinaryOperators), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); - this.SpaceAfterBinaryOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.BinaryOperators, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); - this.NoSpaceBeforeBinaryOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.BinaryOperators), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Delete)); - this.NoSpaceAfterBinaryOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.BinaryOperators, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Delete)); - - // Insert space after keywords in control flow statements - this.SpaceAfterKeywordInControl = new Rule(RuleDescriptor.create2(Shared.TokenRange.Keywords, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsControlDeclContext), RuleAction.Space)); - this.NoSpaceAfterKeywordInControl = new Rule(RuleDescriptor.create2(Shared.TokenRange.Keywords, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsControlDeclContext), RuleAction.Delete)); - - // Open Brace braces after function - //TypeScript: Function can have return types, which can be made of tons of different token kinds - this.NewLineBeforeOpenBraceInFunction = new Rule(RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), RuleAction.NewLine), RuleFlags.CanDeleteNewLines); - - // Open Brace braces after TypeScript module/class/interface - this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new Rule(RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), RuleAction.NewLine), RuleFlags.CanDeleteNewLines); - - // Open Brace braces after control block - this.NewLineBeforeOpenBraceInControl = new Rule(RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), RuleAction.NewLine), RuleFlags.CanDeleteNewLines); - - // Insert space after semicolon in for statement - this.SpaceAfterSemicolonInFor = new Rule(RuleDescriptor.create3(SyntaxKind.SemicolonToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), RuleAction.Space)); - this.NoSpaceAfterSemicolonInFor = new Rule(RuleDescriptor.create3(SyntaxKind.SemicolonToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), RuleAction.Delete)); - - // Insert space after opening and before closing nonempty parenthesis - this.SpaceAfterOpenParen = new Rule(RuleDescriptor.create3(SyntaxKind.OpenParenToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - this.SpaceBeforeCloseParen = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CloseParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - this.NoSpaceBetweenParens = new Rule(RuleDescriptor.create1(SyntaxKind.OpenParenToken, SyntaxKind.CloseParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceAfterOpenParen = new Rule(RuleDescriptor.create3(SyntaxKind.OpenParenToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - this.NoSpaceBeforeCloseParen = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CloseParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); - - // Insert space after function keyword for anonymous functions - this.SpaceAfterAnonymousFunctionKeyword = new Rule(RuleDescriptor.create1(SyntaxKind.FunctionKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space)); - this.NoSpaceAfterAnonymousFunctionKeyword = new Rule(RuleDescriptor.create1(SyntaxKind.FunctionKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Delete)); - } - - /// - /// Contexts - /// - - static IsForContext(context: FormattingContext): boolean { - return context.contextNode.kind === SyntaxKind.ForStatement; - } - - static IsNotForContext(context: FormattingContext): boolean { - return !Rules.IsForContext(context); - } - - static IsBinaryOpContext(context: FormattingContext): boolean { - - switch (context.contextNode.kind) { - case SyntaxKind.BinaryExpression: - case SyntaxKind.ConditionalExpression: - return true; - //// binary expressions - //case SyntaxKind.AssignmentExpression: - //case SyntaxKind.AddAssignmentExpression: - //case SyntaxKind.SubtractAssignmentExpression: - //case SyntaxKind.MultiplyAssignmentExpression: - //case SyntaxKind.DivideAssignmentExpression: - //case SyntaxKind.ModuloAssignmentExpression: - //case SyntaxKind.AndAssignmentExpression: - //case SyntaxKind.ExclusiveOrAssignmentExpression: - //case SyntaxKind.OrAssignmentExpression: - //case SyntaxKind.LeftShiftAssignmentExpression: - //case SyntaxKind.SignedRightShiftAssignmentExpression: - //case SyntaxKind.UnsignedRightShiftAssignmentExpression: - //case SyntaxKind.ConditionalExpression: - //case SyntaxKind.LogicalOrExpression: - //case SyntaxKind.LogicalAndExpression: - //case SyntaxKind.BitwiseOrExpression: - //case SyntaxKind.BitwiseExclusiveOrExpression: - //case SyntaxKind.BitwiseAndExpression: - //case SyntaxKind.EqualsWithTypeConversionExpression: - //case SyntaxKind.NotEqualsWithTypeConversionExpression: - //case SyntaxKind.EqualsExpression: - //case SyntaxKind.NotEqualsExpression: - //case SyntaxKind.LessThanExpression: - //case SyntaxKind.GreaterThanExpression: - //case SyntaxKind.LessThanOrEqualExpression: - //case SyntaxKind.GreaterThanOrEqualExpression: - //case SyntaxKind.InstanceOfExpression: - //case SyntaxKind.InExpression: - //case SyntaxKind.LeftShiftExpression: - //case SyntaxKind.SignedRightShiftExpression: - //case SyntaxKind.UnsignedRightShiftExpression: - //case SyntaxKind.MultiplyExpression: - //case SyntaxKind.DivideExpression: - //case SyntaxKind.ModuloExpression: - //case SyntaxKind.AddExpression: - //case SyntaxKind.SubtractExpression: - // return true; - - // equal in import a = module('a'); - case SyntaxKind.ImportDeclaration: - // equal in var a = 0; - case SyntaxKind.VariableDeclaration: - // equal in p = 0; - case SyntaxKind.Parameter: - case SyntaxKind.EnumMember: - case SyntaxKind.Property: - return context.currentTokenSpan.kind === SyntaxKind.EqualsToken || context.nextTokenSpan.kind === SyntaxKind.EqualsToken; - // "in" keyword in for (var x in []) { } - case SyntaxKind.ForInStatement: - return context.currentTokenSpan.kind === SyntaxKind.InKeyword || context.nextTokenSpan.kind === SyntaxKind.InKeyword; - } - return false; - } - - static IsNotBinaryOpContext(context: FormattingContext): boolean { - return !Rules.IsBinaryOpContext(context); - } - - static IsSameLineTokenOrBeforeMultilineBlockContext(context: FormattingContext): boolean { - //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. - //// - //// Ex: - //// if (1) { .... - //// * ) and { are on the same line so apply the rule. Here we don't care whether it's same or multi block context - //// - //// Ex: - //// if (1) - //// { ... } - //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we don't format. - //// - //// Ex: - //// if (1) - //// { ... - //// } - //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we format. - - return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); - } - - // This check is done before an open brace in a control construct, a function, or a typescript block declaration - static IsBeforeMultilineBlockContext(context: FormattingContext): boolean { - return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); - } - - static IsMultilineBlockContext(context: FormattingContext): boolean { - return Rules.IsBlockContext(context) && !(context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); - } - - static IsSingleLineBlockContext(context: FormattingContext): boolean { - return Rules.IsBlockContext(context) && (context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); - } - - static IsBlockContext(context: FormattingContext): boolean { - return Rules.NodeIsBlockContext(context.contextNode); - } - - static IsBeforeBlockContext(context: FormattingContext): boolean { - return Rules.NodeIsBlockContext(context.nextTokenParent); - } - - // IMPORTANT!!! This method must return true ONLY for nodes with open and close braces as immediate children - static NodeIsBlockContext(node: Node): boolean { - if (Rules.NodeIsTypeScriptDeclWithBlockContext(node)) { - // This means we are in a context that looks like a block to the user, but in the grammar is actually not a node (it's a class, module, enum, object type literal, etc). - return true; - } - - switch (node.kind) { - case SyntaxKind.Block: - case SyntaxKind.SwitchStatement: - case SyntaxKind.ObjectLiteral: - case SyntaxKind.TryBlock: - case SyntaxKind.CatchBlock: - case SyntaxKind.FinallyBlock: - case SyntaxKind.FunctionBlock: - case SyntaxKind.ModuleBlock: - return true; - } - - return false; - } - - static IsFunctionDeclContext(context: FormattingContext): boolean { - switch (context.contextNode.kind) { - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.Method: - //case SyntaxKind.MemberFunctionDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - ///case SyntaxKind.MethodSignature: - case SyntaxKind.CallSignature: - case SyntaxKind.FunctionExpression: - case SyntaxKind.Constructor: - case SyntaxKind.ArrowFunction: - //case SyntaxKind.ConstructorDeclaration: - //case SyntaxKind.SimpleArrowFunctionExpression: - //case SyntaxKind.ParenthesizedArrowFunctionExpression: - case SyntaxKind.InterfaceDeclaration: // This one is not truly a function, but for formatting purposes, it acts just like one - return true; - } - - return false; - } - - static IsTypeScriptDeclWithBlockContext(context: FormattingContext): boolean { - return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); - } - - static NodeIsTypeScriptDeclWithBlockContext(node: Node): boolean { - switch (node.kind) { - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.TypeLiteral: - case SyntaxKind.ModuleDeclaration: - return true; - } - - return false; - } - - static IsAfterCodeBlockContext(context: FormattingContext): boolean { - switch (context.currentTokenParent.kind) { - case SyntaxKind.ClassDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.Block: - case SyntaxKind.TryBlock: - case SyntaxKind.CatchBlock: - case SyntaxKind.FinallyBlock: - case SyntaxKind.FunctionBlock: - case SyntaxKind.ModuleBlock: - case SyntaxKind.SwitchStatement: - return true; - } - return false; - } - - static IsControlDeclContext(context: FormattingContext): boolean { - switch (context.contextNode.kind) { - case SyntaxKind.IfStatement: - case SyntaxKind.SwitchStatement: - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.TryStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WithStatement: - // TODO - // case SyntaxKind.ElseClause: - case SyntaxKind.CatchBlock: - case SyntaxKind.FinallyBlock: - return true; - - default: - return false; - } - } - - static IsObjectContext(context: FormattingContext): boolean { - return context.contextNode.kind === SyntaxKind.ObjectLiteral; - } - - static IsFunctionCallContext(context: FormattingContext): boolean { - return context.contextNode.kind === SyntaxKind.CallExpression; - } - - static IsNewContext(context: FormattingContext): boolean { - return context.contextNode.kind === SyntaxKind.NewExpression; - } - - static IsFunctionCallOrNewContext(context: FormattingContext): boolean { - return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); - } - - static IsSameLineTokenContext(context: FormattingContext): boolean { - return context.TokensAreOnSameLine(); - } - - static IsNotFormatOnEnter(context: FormattingContext): boolean { - return context.formattingRequestKind != FormattingRequestKind.FormatOnEnter; - } - - static IsModuleDeclContext(context: FormattingContext): boolean { - return context.contextNode.kind === SyntaxKind.ModuleDeclaration; - } - - static IsObjectTypeContext(context: FormattingContext): boolean { - return context.contextNode.kind === SyntaxKind.TypeLiteral;// && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; - } - - static IsTypeArgumentOrParameter(token: TextRangeWithKind, parent: Node): boolean { - if (token.kind !== SyntaxKind.LessThanToken && token.kind !== SyntaxKind.GreaterThanToken) { - return false; - } - switch (parent.kind) { - case SyntaxKind.TypeReference: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.ArrowFunction: - case SyntaxKind.Method: - case SyntaxKind.CallSignature: - case SyntaxKind.ConstructSignature: - case SyntaxKind.CallExpression: - case SyntaxKind.NewExpression: - return true; - default: - return false; - - } - } - - static IsTypeArgumentOrParameterContext(context: FormattingContext): boolean { - return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan, context.currentTokenParent) || - Rules.IsTypeArgumentOrParameter(context.nextTokenSpan, context.nextTokenParent); - } - - static IsVoidOpContext(context: FormattingContext): boolean { - return context.currentTokenSpan.kind === SyntaxKind.VoidKeyword && context.currentTokenParent.kind === SyntaxKind.PrefixOperator; - } - } -} \ No newline at end of file diff --git a/src/services/format/rulesMap.ts b/src/services/format/rulesMap.ts deleted file mode 100644 index 6aa472d8d1d..00000000000 --- a/src/services/format/rulesMap.ts +++ /dev/null @@ -1,189 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class RulesMap { - public map: RulesBucket[]; - public mapRowLength: number; - - constructor() { - this.map = []; - this.mapRowLength = 0; - } - - static create(rules: Rule[]): RulesMap { - var result = new RulesMap(); - result.Initialize(rules); - return result; - } - - public Initialize(rules: Rule[]) { - this.mapRowLength = SyntaxKind.LastToken + 1; - this.map = new Array(this.mapRowLength * this.mapRowLength);//new Array(this.mapRowLength * this.mapRowLength); - - // This array is used only during construction of the rulesbucket in the map - var rulesBucketConstructionStateList: RulesBucketConstructionState[] = new Array(this.map.length);//new Array(this.map.length); - - this.FillRules(rules, rulesBucketConstructionStateList); - return this.map; - } - - public FillRules(rules: Rule[], rulesBucketConstructionStateList: RulesBucketConstructionState[]): void { - rules.forEach((rule) => { - this.FillRule(rule, rulesBucketConstructionStateList); - }); - } - - private GetRuleBucketIndex(row: number, column: number): number { - var rulesBucketIndex = (row * this.mapRowLength) + column; - //Debug.Assert(rulesBucketIndex < this.map.Length, "Trying to access an index outside the array."); - return rulesBucketIndex; - } - - private FillRule(rule: Rule, rulesBucketConstructionStateList: RulesBucketConstructionState[]): void { - var specificRule = rule.Descriptor.LeftTokenRange != Shared.TokenRange.Any && - rule.Descriptor.RightTokenRange != Shared.TokenRange.Any; - - rule.Descriptor.LeftTokenRange.GetTokens().forEach((left) => { - rule.Descriptor.RightTokenRange.GetTokens().forEach((right) => { - var rulesBucketIndex = this.GetRuleBucketIndex(left, right); - - var rulesBucket = this.map[rulesBucketIndex]; - if (rulesBucket == undefined) { - rulesBucket = this.map[rulesBucketIndex] = new RulesBucket(); - } - - rulesBucket.AddRule(rule, specificRule, rulesBucketConstructionStateList, rulesBucketIndex); - }) - }) - } - - public GetRule(context: FormattingContext): Rule { - var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); - var bucket = this.map[bucketIndex]; - if (bucket != null) { - for (var i = 0, len = bucket.Rules().length; i < len; i++) { - var rule = bucket.Rules()[i]; - if (rule.Operation.Context.InContext(context)) - return rule; - } - } - return null; - } - } - - var MaskBitSize = 5; - var Mask = 0x1f; - - export enum RulesPosition { - IgnoreRulesSpecific = 0, - IgnoreRulesAny = MaskBitSize * 1, - ContextRulesSpecific = MaskBitSize * 2, - ContextRulesAny = MaskBitSize * 3, - NoContextRulesSpecific = MaskBitSize * 4, - NoContextRulesAny = MaskBitSize * 5 - } - - export class RulesBucketConstructionState { - private rulesInsertionIndexBitmap: number; - - constructor() { - //// The Rules list contains all the inserted rules into a rulebucket in the following order: - //// 1- Ignore rules with specific token combination - //// 2- Ignore rules with any token combination - //// 3- Context rules with specific token combination - //// 4- Context rules with any token combination - //// 5- Non-context rules with specific token combination - //// 6- Non-context rules with any token combination - //// - //// The member rulesInsertionIndexBitmap is used to describe the number of rules - //// in each sub-bucket (above) hence can be used to know the index of where to insert - //// the next rule. It's a bitmap which contains 6 different sections each is given 5 bits. - //// - //// Example: - //// In order to insert a rule to the end of sub-bucket (3), we get the index by adding - //// the values in the bitmap segments 3rd, 2nd, and 1st. - this.rulesInsertionIndexBitmap = 0; - } - - public GetInsertionIndex(maskPosition: RulesPosition): number { - var index = 0; - - var pos = 0; - var indexBitmap = this.rulesInsertionIndexBitmap; - - while (pos <= maskPosition) { - index += (indexBitmap & Mask); - indexBitmap >>= MaskBitSize; - pos += MaskBitSize; - } - - return index; - } - - public IncreaseInsertionIndex(maskPosition: RulesPosition): void { - var value = (this.rulesInsertionIndexBitmap >> maskPosition) & Mask; - value++; - Debug.assert((value & Mask) == value, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."); - - var temp = this.rulesInsertionIndexBitmap & ~(Mask << maskPosition); - temp |= value << maskPosition; - - this.rulesInsertionIndexBitmap = temp; - } - } - - export class RulesBucket { - private rules: Rule[]; - - constructor() { - this.rules = []; - } - - public Rules(): Rule[] { - return this.rules; - } - - public AddRule(rule: Rule, specificTokens: boolean, constructionState: RulesBucketConstructionState[], rulesBucketIndex: number): void { - var position: RulesPosition; - - if (rule.Operation.Action == RuleAction.Ignore) { - position = specificTokens ? - RulesPosition.IgnoreRulesSpecific : - RulesPosition.IgnoreRulesAny; - } - else if (!rule.Operation.Context.IsAny()) { - position = specificTokens ? - RulesPosition.ContextRulesSpecific : - RulesPosition.ContextRulesAny; - } - else { - position = specificTokens ? - RulesPosition.NoContextRulesSpecific : - RulesPosition.NoContextRulesAny; - } - - var state = constructionState[rulesBucketIndex]; - if (state === undefined) { - state = constructionState[rulesBucketIndex] = new RulesBucketConstructionState(); - } - var index = state.GetInsertionIndex(position); - this.rules.splice(index, 0, rule); - state.IncreaseInsertionIndex(position); - } - } -} \ No newline at end of file diff --git a/src/services/format/rulesProvider.ts b/src/services/format/rulesProvider.ts deleted file mode 100644 index f7374a58142..00000000000 --- a/src/services/format/rulesProvider.ts +++ /dev/null @@ -1,117 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class RulesProvider { - private globalRules: Rules; - private options: ts.FormatCodeOptions; - private activeRules: Rule[]; - private rulesMap: RulesMap; - - constructor(private logger: TypeScript.Logger) { - this.globalRules = new Rules(); - } - - public getRuleName(rule: Rule): string { - return this.globalRules.getRuleName(rule); - } - - public getRuleByName(name: string): Rule { - return this.globalRules[name]; - } - - public getRulesMap() { - return this.rulesMap; - } - - public ensureUpToDate(options: ts.FormatCodeOptions) { - if (this.options == null || !ts.compareDataObjects(this.options, options)) { - var activeRules = this.createActiveRules(options); - var rulesMap = RulesMap.create(activeRules); - - this.activeRules = activeRules; - this.rulesMap = rulesMap; - this.options = ts.clone(options); - } - } - - private createActiveRules(options: ts.FormatCodeOptions): Rule[] { - var rules = this.globalRules.HighPriorityCommonRules.slice(0); - - if (options.InsertSpaceAfterCommaDelimiter) { - rules.push(this.globalRules.SpaceAfterComma); - } - else { - rules.push(this.globalRules.NoSpaceAfterComma); - } - - if (options.InsertSpaceAfterFunctionKeywordForAnonymousFunctions) { - rules.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword); - } - else { - rules.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword); - } - - if (options.InsertSpaceAfterKeywordsInControlFlowStatements) { - rules.push(this.globalRules.SpaceAfterKeywordInControl); - } - else { - rules.push(this.globalRules.NoSpaceAfterKeywordInControl); - } - - if (options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis) { - rules.push(this.globalRules.SpaceAfterOpenParen); - rules.push(this.globalRules.SpaceBeforeCloseParen); - rules.push(this.globalRules.NoSpaceBetweenParens); - } - else { - rules.push(this.globalRules.NoSpaceAfterOpenParen); - rules.push(this.globalRules.NoSpaceBeforeCloseParen); - rules.push(this.globalRules.NoSpaceBetweenParens); - } - - if (options.InsertSpaceAfterSemicolonInForStatements) { - rules.push(this.globalRules.SpaceAfterSemicolonInFor); - } - else { - rules.push(this.globalRules.NoSpaceAfterSemicolonInFor); - } - - if (options.InsertSpaceBeforeAndAfterBinaryOperators) { - rules.push(this.globalRules.SpaceBeforeBinaryOperator); - rules.push(this.globalRules.SpaceAfterBinaryOperator); - } - else { - rules.push(this.globalRules.NoSpaceBeforeBinaryOperator); - rules.push(this.globalRules.NoSpaceAfterBinaryOperator); - } - - if (options.PlaceOpenBraceOnNewLineForControlBlocks) { - rules.push(this.globalRules.NewLineBeforeOpenBraceInControl); - } - - if (options.PlaceOpenBraceOnNewLineForFunctions) { - rules.push(this.globalRules.NewLineBeforeOpenBraceInFunction); - rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock); - } - - rules = rules.concat(this.globalRules.LowPriorityCommonRules); - - return rules; - } - } -} \ No newline at end of file diff --git a/src/services/format/tokenRange.ts b/src/services/format/tokenRange.ts deleted file mode 100644 index 6cb8b9f5be1..00000000000 --- a/src/services/format/tokenRange.ts +++ /dev/null @@ -1,142 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export module Shared { - export interface ITokenAccess { - GetTokens(): SyntaxKind[]; - Contains(token: SyntaxKind): boolean; - } - - export class TokenRangeAccess implements ITokenAccess { - private tokens: SyntaxKind[]; - - constructor(from: SyntaxKind, to: SyntaxKind, except: SyntaxKind[]) { - this.tokens = []; - for (var token = from; token <= to; token++) { - if (except.indexOf(token) < 0) { - this.tokens.push(token); - } - } - } - - public GetTokens(): SyntaxKind[] { - return this.tokens; - } - - public Contains(token: SyntaxKind): boolean { - return this.tokens.indexOf(token) >= 0; - } - } - - export class TokenValuesAccess implements ITokenAccess { - private tokens: SyntaxKind[]; - - constructor(tks: SyntaxKind[]) { - this.tokens = tks && tks.length ? tks : []; - } - - public GetTokens(): SyntaxKind[] { - return this.tokens; - } - - public Contains(token: SyntaxKind): boolean { - return this.tokens.indexOf(token) >= 0; - } - } - - export class TokenSingleValueAccess implements ITokenAccess { - constructor(public token: SyntaxKind) { - } - - public GetTokens(): SyntaxKind[] { - return [this.token]; - } - - public Contains(tokenValue: SyntaxKind): boolean { - return tokenValue == this.token; - } - } - - export class TokenAllAccess implements ITokenAccess { - public GetTokens(): SyntaxKind[] { - var result: SyntaxKind[] = []; - for (var token = SyntaxKind.FirstToken; token <= SyntaxKind.LastToken; token++) { - result.push(token); - } - return result; - } - - public Contains(tokenValue: SyntaxKind): boolean { - return true; - } - - public toString(): string { - return "[allTokens]"; - } - } - - export class TokenRange { - constructor(public tokenAccess: ITokenAccess) { - } - - static FromToken(token: SyntaxKind): TokenRange { - return new TokenRange(new TokenSingleValueAccess(token)); - } - - static FromTokens(tokens: SyntaxKind[]): TokenRange { - return new TokenRange(new TokenValuesAccess(tokens)); - } - - static FromRange(f: SyntaxKind, to: SyntaxKind, except: SyntaxKind[] = []): TokenRange { - return new TokenRange(new TokenRangeAccess(f, to, except)); - } - - static AllTokens(): TokenRange { - return new TokenRange(new TokenAllAccess()); - } - - public GetTokens(): SyntaxKind[] { - return this.tokenAccess.GetTokens(); - } - - public Contains(token: SyntaxKind): boolean { - return this.tokenAccess.Contains(token); - } - - public toString(): string { - return this.tokenAccess.toString(); - } - - static Any: TokenRange = TokenRange.AllTokens(); - static AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([SyntaxKind.MultiLineCommentTrivia])); - static Keywords = TokenRange.FromRange(SyntaxKind.FirstKeyword, SyntaxKind.LastKeyword); - static Operators = TokenRange.FromRange(SyntaxKind.FirstOperator, SyntaxKind.LastOperator); - static BinaryOperators = TokenRange.FromRange(SyntaxKind.FirstBinaryOperator, SyntaxKind.LastBinaryOperator); - static BinaryKeywordOperators = TokenRange.FromTokens([SyntaxKind.InKeyword, SyntaxKind.InstanceOfKeyword]); - static ReservedKeywords = TokenRange.FromRange(SyntaxKind.FirstFutureReservedWord, SyntaxKind.LastFutureReservedWord); - static UnaryPrefixOperators = TokenRange.FromTokens([SyntaxKind.PlusPlusToken, SyntaxKind.MinusMinusToken, SyntaxKind.TildeToken, SyntaxKind.ExclamationToken]); - static UnaryPrefixExpressions = TokenRange.FromTokens([SyntaxKind.NumericLiteral, SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.OpenBracketToken, SyntaxKind.OpenBraceToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); - static UnaryPreincrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); - static UnaryPostincrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); - static UnaryPredecrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); - static UnaryPostdecrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); - static Comments = TokenRange.FromTokens([SyntaxKind.SingleLineCommentTrivia, SyntaxKind.MultiLineCommentTrivia]); - static TypeNames = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.NumberKeyword, SyntaxKind.StringKeyword, SyntaxKind.BooleanKeyword, SyntaxKind.VoidKeyword, SyntaxKind.AnyKeyword]); - } - } -} \ No newline at end of file diff --git a/src/services/format/tokenSpan.ts b/src/services/format/tokenSpan.ts deleted file mode 100644 index 7194b0ce4fa..00000000000 --- a/src/services/format/tokenSpan.ts +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - - -module ts.formatting { - export class TokenSpan extends TypeScript.TextSpan { - constructor(public kind: SyntaxKind, start: number, length: number) { - super(start, length); - } - } -} \ No newline at end of file diff --git a/src/services/format.ts b/src/services/formatting.ts similarity index 97% rename from src/services/format.ts rename to src/services/formatting.ts index 9ecdb09e861..e455183eccc 100644 --- a/src/services/format.ts +++ b/src/services/formatting.ts @@ -1,7 +1,7 @@ /// -/// -/// -/// +/// +/// +/// module ts.formatting { @@ -111,6 +111,8 @@ module ts.formatting { case SyntaxKind.ModuleBlock: return rangeContainsRange((parent).statements, node) } + + return false; } function findEnclosingNode(range: TextRange, sourceFile: SourceFile): Node { diff --git a/src/services/formatting/formatter.ts b/src/services/formatting/formatter.ts deleted file mode 100644 index 92417168eac..00000000000 --- a/src/services/formatting/formatter.ts +++ /dev/null @@ -1,320 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class Formatter extends MultipleTokenIndenter { - private previousTokenSpan: TokenSpan = null; - private previousTokenParent: IndentationNodeContext = null; - - // TODO: implement it with skipped tokens in Fidelity - private scriptHasErrors: boolean = false; - - private rulesProvider: RulesProvider; - private formattingRequestKind: FormattingRequestKind; - private formattingContext: FormattingContext; - - constructor(textSpan: TextSpan, - sourceUnit: SourceUnitSyntax, - indentFirstToken: boolean, - options: FormattingOptions, - snapshot: ITextSnapshot, - rulesProvider: RulesProvider, - formattingRequestKind: FormattingRequestKind) { - - super(textSpan, sourceUnit, snapshot, indentFirstToken, options); - - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - - this.rulesProvider = rulesProvider; - this.formattingRequestKind = formattingRequestKind; - this.formattingContext = new FormattingContext(this.snapshot(), this.formattingRequestKind); - } - - public static getEdits(textSpan: TextSpan, - sourceUnit: SourceUnitSyntax, - options: FormattingOptions, - indentFirstToken: boolean, - snapshot: ITextSnapshot, - rulesProvider: RulesProvider, - formattingRequestKind: FormattingRequestKind): TextEditInfo[] { - var walker = new Formatter(textSpan, sourceUnit, indentFirstToken, options, snapshot, rulesProvider, formattingRequestKind); - walker.walk(sourceUnit); - return walker.edits(); - } - - public visitTokenInSpan(token: ISyntaxToken): void { - if (token.fullWidth() !== 0) { - var tokenSpan = new TextSpan(this.position() + token.leadingTriviaWidth(), width(token)); - if (this.textSpan().containsTextSpan(tokenSpan)) { - this.processToken(token); - } - } - - // Call the base class to process the token and indent it if needed - super.visitTokenInSpan(token); - } - - private processToken(token: ISyntaxToken): void { - var position = this.position(); - - // Extract any leading comments - if (token.leadingTriviaWidth() !== 0) { - this.processTrivia(token.leadingTrivia(), position); - position += token.leadingTriviaWidth(); - } - - // Push the token - var currentTokenSpan = new TokenSpan(token.kind, position, width(token)); - if (!this.parent().hasSkippedOrMissingTokenChild()) { - if (this.previousTokenSpan) { - // Note that formatPair calls TrimWhitespaceInLineRange in between the 2 tokens - this.formatPair(this.previousTokenSpan, this.previousTokenParent, currentTokenSpan, this.parent()); - } - else { - // We still want to trim whitespace even if it is the first trivia of the first token. Trim from the beginning of the span to the trivia - this.trimWhitespaceInLineRange(this.getLineNumber(this.textSpan()), this.getLineNumber(currentTokenSpan)); - } - } - this.previousTokenSpan = currentTokenSpan; - if (this.previousTokenParent) { - // Make sure to clear the previous parent before assigning a new value to it - this.indentationNodeContextPool().releaseNode(this.previousTokenParent, /* recursive */true); - } - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - position += width(token); - - // Extract any trailing comments - if (token.trailingTriviaWidth() !== 0) { - this.processTrivia(token.trailingTrivia(), position); - } - } - - private processTrivia(triviaList: ISyntaxTriviaList, fullStart: number) { - var position = fullStart; - - for (var i = 0, n = triviaList.count(); i < n ; i++) { - var trivia = triviaList.syntaxTriviaAt(i); - // For a comment, format it like it is a token. For skipped text, eat it up as a token, but skip the formatting - if (trivia.isComment() || trivia.isSkippedToken()) { - var currentTokenSpan = new TokenSpan(trivia.kind(), position, trivia.fullWidth()); - if (this.textSpan().containsTextSpan(currentTokenSpan)) { - if (trivia.isComment() && this.previousTokenSpan) { - // Note that formatPair calls TrimWhitespaceInLineRange in between the 2 tokens - this.formatPair(this.previousTokenSpan, this.previousTokenParent, currentTokenSpan, this.parent()); - } - else { - // We still want to trim whitespace even if it is the first trivia of the first token. Trim from the beginning of the span to the trivia - var startLine = this.getLineNumber(this.previousTokenSpan || this.textSpan()); - this.trimWhitespaceInLineRange(startLine, this.getLineNumber(currentTokenSpan)); - } - this.previousTokenSpan = currentTokenSpan; - if (this.previousTokenParent) { - // Make sure to clear the previous parent before assigning a new value to it - this.indentationNodeContextPool().releaseNode(this.previousTokenParent, /* recursive */true); - } - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - } - } - - position += trivia.fullWidth(); - } - } - - private findCommonParents(parent1: IndentationNodeContext, parent2: IndentationNodeContext): IndentationNodeContext { - // TODO: disable debug assert message - - var shallowParent: IndentationNodeContext; - var shallowParentDepth: number; - var deepParent: IndentationNodeContext; - var deepParentDepth: number; - - if (parent1.depth() < parent2.depth()) { - shallowParent = parent1; - shallowParentDepth = parent1.depth(); - deepParent = parent2; - deepParentDepth = parent2.depth(); - } - else { - shallowParent = parent2; - shallowParentDepth = parent2.depth(); - deepParent = parent1; - deepParentDepth = parent1.depth(); - } - - Debug.assert(shallowParentDepth >= 0, "Expected shallowParentDepth >= 0"); - Debug.assert(deepParentDepth >= 0, "Expected deepParentDepth >= 0"); - Debug.assert(deepParentDepth >= shallowParentDepth, "Expected deepParentDepth >= shallowParentDepth"); - - while (deepParentDepth > shallowParentDepth) { - deepParent = deepParent.parent(); - deepParentDepth--; - } - - Debug.assert(deepParentDepth === shallowParentDepth, "Expected deepParentDepth === shallowParentDepth"); - - while (deepParent.node() && shallowParent.node()) { - if (deepParent.node() === shallowParent.node()) { - return deepParent; - } - deepParent = deepParent.parent(); - shallowParent = shallowParent.parent(); - } - - // The root should be the first element in the parent chain, we can not be here unless something wrong - // happened along the way - throw Errors.invalidOperation(); - } - - private formatPair(t1: TokenSpan, t1Parent: IndentationNodeContext, t2: TokenSpan, t2Parent: IndentationNodeContext): void { - var token1Line = this.getLineNumber(t1); - var token2Line = this.getLineNumber(t2); - - // Find common parent - var commonParent= this.findCommonParents(t1Parent, t2Parent); - - // Update the context - this.formattingContext.updateContext(t1, t1Parent, t2, t2Parent, commonParent); - - // Find rules matching the current context - var rule = this.rulesProvider.getRulesMap().GetRule(this.formattingContext); - - if (rule != null) { - // Record edits from the rule - this.RecordRuleEdits(rule, t1, t2); - - // Handle the case where the next line is moved to be the end of this line. - // In this case we don't indent the next line in the next pass. - if ((rule.Operation.Action == RuleAction.Space || rule.Operation.Action == RuleAction.Delete) && - token1Line != token2Line) { - this.forceSkipIndentingNextToken(t2.start()); - } - - // Handle the case where token2 is moved to the new line. - // In this case we indent token2 in the next pass but we set - // sameLineIndent flag to notify the indenter that the indentation is within the line. - if (rule.Operation.Action == RuleAction.NewLine && token1Line == token2Line) { - this.forceIndentNextToken(t2.start()); - } - } - - // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line - if (token1Line != token2Line && (!rule || (rule.Operation.Action != RuleAction.Delete && rule.Flag != RuleFlags.CanDeleteNewLines))) { - this.trimWhitespaceInLineRange(token1Line, token2Line, t1); - } - } - - private getLineNumber(span: TextSpan): number { - return this.snapshot().getLineNumberFromPosition(span.start()); - } - - private trimWhitespaceInLineRange(startLine: number, endLine: number, token?: TokenSpan): void { - for (var lineNumber = startLine; lineNumber < endLine; ++lineNumber) { - var line = this.snapshot().getLineFromLineNumber(lineNumber); - - this.trimWhitespace(line, token); - } - } - - private trimWhitespace(line: ITextSnapshotLine, token?: TokenSpan): void { - // Don't remove the trailing spaces inside comments (this includes line comments and block comments) - if (token && (token.kind == SyntaxKind.MultiLineCommentTrivia || token.kind == SyntaxKind.SingleLineCommentTrivia) && token.start() <= line.endPosition() && token.end() >= line.endPosition()) - return; - - var text = line.getText(); - var index = 0; - - for (index = text.length - 1; index >= 0; --index) { - if (!CharacterInfo.isWhitespace(text.charCodeAt(index))) { - break; - } - } - - ++index; - - if (index < text.length) { - this.recordEdit(line.startPosition() + index, line.length() - index, ""); - } - } - - private RecordRuleEdits(rule: Rule, t1: TokenSpan, t2: TokenSpan): void { - if (rule.Operation.Action == RuleAction.Ignore) { - return; - } - - var betweenSpan: TextSpan; - - switch (rule.Operation.Action) { - case RuleAction.Delete: - { - betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); - - if (betweenSpan.length() > 0) { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), ""); - return; - } - } - break; - - case RuleAction.NewLine: - { - if (!(rule.Flag == RuleFlags.CanDeleteNewLines || this.getLineNumber(t1) == this.getLineNumber(t2))) { - return; - } - - betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); - - var doEdit = false; - var betweenText = this.snapshot().getText(betweenSpan); - - var lineFeedLoc = betweenText.indexOf(this.options.newLineCharacter); - if (lineFeedLoc < 0) { - // no linefeeds, do the edit - doEdit = true; - } - else { - // We only require one line feed. If there is another one, do the edit - lineFeedLoc = betweenText.indexOf(this.options.newLineCharacter, lineFeedLoc + 1); - if (lineFeedLoc >= 0) { - doEdit = true; - } - } - - if (doEdit) { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), this.options.newLineCharacter); - return; - } - } - break; - - case RuleAction.Space: - { - if (!(rule.Flag == RuleFlags.CanDeleteNewLines || this.getLineNumber(t1) == this.getLineNumber(t2))) { - return; - } - - betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); - - if (betweenSpan.length() > 1 || this.snapshot().getText(betweenSpan) != " ") { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), " "); - return; - } - } - break; - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts deleted file mode 100644 index 7570ef936c7..00000000000 --- a/src/services/formatting/formatting.ts +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// \ No newline at end of file diff --git a/src/services/formatting/formattingContext.ts b/src/services/formatting/formattingContext.ts index 9ced31ecef2..72fc7bf80fb 100644 --- a/src/services/formatting/formattingContext.ts +++ b/src/services/formatting/formattingContext.ts @@ -13,48 +13,48 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class FormattingContext { - public currentTokenSpan: TokenSpan = null; - public nextTokenSpan: TokenSpan = null; - public contextNode: IndentationNodeContext = null; - public currentTokenParent: IndentationNodeContext = null; - public nextTokenParent: IndentationNodeContext = null; + public currentTokenSpan: TextRangeWithKind; + public nextTokenSpan: TextRangeWithKind; + public contextNode: Node; + public currentTokenParent: Node; + public nextTokenParent: Node; - private contextNodeAllOnSameLine: boolean = null; - private nextNodeAllOnSameLine: boolean = null; - private tokensAreOnSameLine: boolean = null; - private contextNodeBlockIsOnOneLine: boolean = null; - private nextNodeBlockIsOnOneLine: boolean = null; + private contextNodeAllOnSameLine: boolean; + private nextNodeAllOnSameLine: boolean; + private tokensAreOnSameLine: boolean; + private contextNodeBlockIsOnOneLine: boolean; + private nextNodeBlockIsOnOneLine: boolean; - constructor(private snapshot: ITextSnapshot, public formattingRequestKind: FormattingRequestKind) { - Debug.assert(this.snapshot != null, "snapshot is null"); + constructor(private sourceFile: SourceFile, public formattingRequestKind: FormattingRequestKind) { } - public updateContext(currentTokenSpan: TokenSpan, currentTokenParent: IndentationNodeContext, nextTokenSpan: TokenSpan, nextTokenParent: IndentationNodeContext, commonParent: IndentationNodeContext) { - Debug.assert(currentTokenSpan != null, "currentTokenSpan is null"); + public updateContext(currentRange: TextRangeWithKind, currentTokenParent: Node, nextRange: TextRangeWithKind, nextTokenParent: Node, commonParent: Node) { + Debug.assert(currentRange != null, "currentTokenSpan is null"); Debug.assert(currentTokenParent != null, "currentTokenParent is null"); - Debug.assert(nextTokenSpan != null, "nextTokenSpan is null"); + Debug.assert(nextRange != null, "nextTokenSpan is null"); Debug.assert(nextTokenParent != null, "nextTokenParent is null"); Debug.assert(commonParent != null, "commonParent is null"); - this.currentTokenSpan = currentTokenSpan; + this.currentTokenSpan = currentRange; this.currentTokenParent = currentTokenParent; - this.nextTokenSpan = nextTokenSpan; + this.nextTokenSpan = nextRange; this.nextTokenParent = nextTokenParent; this.contextNode = commonParent; - this.contextNodeAllOnSameLine = null; - this.nextNodeAllOnSameLine = null; - this.tokensAreOnSameLine = null; - this.contextNodeBlockIsOnOneLine = null; - this.nextNodeBlockIsOnOneLine = null; + // drop cached results + this.contextNodeAllOnSameLine = undefined; + this.nextNodeAllOnSameLine = undefined; + this.tokensAreOnSameLine = undefined; + this.contextNodeBlockIsOnOneLine = undefined; + this.nextNodeBlockIsOnOneLine = undefined; } public ContextNodeAllOnSameLine(): boolean { - if (this.contextNodeAllOnSameLine === null) { + if (this.contextNodeAllOnSameLine === undefined) { this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode); } @@ -62,7 +62,7 @@ module TypeScript.Services.Formatting { } public NextNodeAllOnSameLine(): boolean { - if (this.nextNodeAllOnSameLine === null) { + if (this.nextNodeAllOnSameLine === undefined) { this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent); } @@ -70,10 +70,9 @@ module TypeScript.Services.Formatting { } public TokensAreOnSameLine(): boolean { - if (this.tokensAreOnSameLine === null) { - var startLine = this.snapshot.getLineNumberFromPosition(this.currentTokenSpan.start()); - var endLine = this.snapshot.getLineNumberFromPosition(this.nextTokenSpan.start()); - + if (this.tokensAreOnSameLine === undefined) { + var startLine = this.sourceFile.getLineAndCharacterFromPosition(this.currentTokenSpan.pos).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(this.nextTokenSpan.pos).line; this.tokensAreOnSameLine = (startLine == endLine); } @@ -81,7 +80,7 @@ module TypeScript.Services.Formatting { } public ContextNodeBlockIsOnOneLine() { - if (this.contextNodeBlockIsOnOneLine === null) { + if (this.contextNodeBlockIsOnOneLine === undefined) { this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode); } @@ -89,28 +88,28 @@ module TypeScript.Services.Formatting { } public NextNodeBlockIsOnOneLine() { - if (this.nextNodeBlockIsOnOneLine === null) { + if (this.nextNodeBlockIsOnOneLine === undefined) { this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent); } return this.nextNodeBlockIsOnOneLine; } - public NodeIsOnOneLine(node: IndentationNodeContext): boolean { - var startLine = this.snapshot.getLineNumberFromPosition(node.start()); - var endLine = this.snapshot.getLineNumberFromPosition(node.end()); - + private NodeIsOnOneLine(node: Node): boolean { + var startLine = this.sourceFile.getLineAndCharacterFromPosition(node.getStart(this.sourceFile)).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(node.getEnd()).line; return startLine == endLine; } - // Now we know we have a block (or a fake block represented by some other kind of node with an open and close brace as children). - // IMPORTANT!!! This relies on the invariant that IsBlockContext must return true ONLY for nodes with open and close braces as immediate children - public BlockIsOnOneLine(node: IndentationNodeContext): boolean { - var block = node.node(); - - // Now check if they are on the same line - return this.snapshot.getLineNumberFromPosition(end(block.openBraceToken)) === - this.snapshot.getLineNumberFromPosition(start(block.closeBraceToken)); + private BlockIsOnOneLine(node: Node): boolean { + var openBrace = findChildOfKind(node, SyntaxKind.OpenBraceToken, this.sourceFile); + var closeBrace = findChildOfKind(node, SyntaxKind.CloseBraceToken, this.sourceFile); + if (openBrace && closeBrace) { + var startLine = this.sourceFile.getLineAndCharacterFromPosition(openBrace.getEnd()).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(closeBrace.getStart(this.sourceFile)).line; + return startLine === endLine; + } + return false; } } } \ No newline at end of file diff --git a/src/services/formatting/formattingManager.ts b/src/services/formatting/formattingManager.ts deleted file mode 100644 index b83281fb9ec..00000000000 --- a/src/services/formatting/formattingManager.ts +++ /dev/null @@ -1,125 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class FormattingManager { - private options: FormattingOptions; - - constructor(private syntaxTree: SyntaxTree, - private snapshot: ITextSnapshot, - private rulesProvider: RulesProvider, - editorOptions: ts.EditorOptions) { - // - // TODO: convert to use FormattingOptions instead of EditorOptions - this.options = new FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter) - } - - public formatSelection(minChar: number, limChar: number): ts.TextChange[] { - var span = TextSpan.fromBounds(minChar, limChar); - return this.formatSpan(span, FormattingRequestKind.FormatSelection); - } - - public formatDocument(): ts.TextChange[] { - var span = TextSpan.fromBounds(0, this.snapshot.getLength()); - return this.formatSpan(span, FormattingRequestKind.FormatDocument); - } - - public formatOnSemicolon(caretPosition: number): ts.TextChange[] { - var sourceUnit = this.syntaxTree.sourceUnit(); - var semicolonPositionedToken = findToken(sourceUnit, caretPosition - 1); - - if (semicolonPositionedToken.kind === SyntaxKind.SemicolonToken) { - // Find the outer most parent that this semicolon terminates - var current: ISyntaxElement = semicolonPositionedToken; - while (current.parent !== null && - end(current.parent) === end(semicolonPositionedToken) && - current.parent.kind !== SyntaxKind.List) { - current = current.parent; - } - - // Compute the span - var span = new TextSpan(fullStart(current), fullWidth(current)); - - // Format the span - return this.formatSpan(span, FormattingRequestKind.FormatOnSemicolon); - } - - return []; - } - - public formatOnClosingCurlyBrace(caretPosition: number): ts.TextChange[] { - var sourceUnit = this.syntaxTree.sourceUnit(); - var closeBracePositionedToken = findToken(sourceUnit, caretPosition - 1); - - if (closeBracePositionedToken.kind === SyntaxKind.CloseBraceToken) { - // Find the outer most parent that this closing brace terminates - var current: ISyntaxElement = closeBracePositionedToken; - while (current.parent !== null && - end(current.parent) === end(closeBracePositionedToken) && - current.parent.kind !== SyntaxKind.List) { - current = current.parent; - } - - // Compute the span - var span = new TextSpan(fullStart(current), fullWidth(current)); - - // Format the span - return this.formatSpan(span, FormattingRequestKind.FormatOnClosingCurlyBrace); - } - - return []; - } - - public formatOnEnter(caretPosition: number): ts.TextChange[] { - var lineNumber = this.snapshot.getLineNumberFromPosition(caretPosition); - - if (lineNumber > 0) { - // Format both lines - var prevLine = this.snapshot.getLineFromLineNumber(lineNumber - 1); - var currentLine = this.snapshot.getLineFromLineNumber(lineNumber); - var span = TextSpan.fromBounds(prevLine.startPosition(), currentLine.endPosition()); - - // Format the span - return this.formatSpan(span, FormattingRequestKind.FormatOnEnter); - - } - - return []; - } - - private formatSpan(span: TextSpan, formattingRequestKind: FormattingRequestKind): ts.TextChange[] { - // Always format from the beginning of the line - var startLine = this.snapshot.getLineFromPosition(span.start()); - span = TextSpan.fromBounds(startLine.startPosition(), span.end()); - - var result: ts.TextChange[] = []; - - var formattingEdits = Formatter.getEdits(span, this.syntaxTree.sourceUnit(), this.options, true, this.snapshot, this.rulesProvider, formattingRequestKind); - - // - // TODO: Change the ILanguageService interface to return TextEditInfo (with start, and length) instead of TextEdit (with minChar and limChar) - formattingEdits.forEach(item => { - result.push({ - span: new TextSpan(item.position, item.length), - newText: item.replaceWith - }); - }); - - return result; - } - } -} \ No newline at end of file diff --git a/src/services/formatting/formattingRequestKind.ts b/src/services/formatting/formattingRequestKind.ts index b766058e1ca..a66169c1e7c 100644 --- a/src/services/formatting/formattingRequestKind.ts +++ b/src/services/formatting/formattingRequestKind.ts @@ -13,15 +13,14 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { - export enum FormattingRequestKind { +module ts.formatting { + export const enum FormattingRequestKind { FormatDocument, FormatSelection, FormatOnEnter, FormatOnSemicolon, - FormatOnClosingCurlyBrace, - FormatOnPaste + FormatOnClosingCurlyBrace } } \ No newline at end of file diff --git a/src/services/format/formattingScanner.ts b/src/services/formatting/formattingScanner.ts similarity index 100% rename from src/services/format/formattingScanner.ts rename to src/services/formatting/formattingScanner.ts diff --git a/src/services/format/indentation.ts b/src/services/formatting/indentation.ts similarity index 100% rename from src/services/format/indentation.ts rename to src/services/formatting/indentation.ts diff --git a/src/services/formatting/indentationNodeContext.ts b/src/services/formatting/indentationNodeContext.ts deleted file mode 100644 index 7aa10d2f9b9..00000000000 --- a/src/services/formatting/indentationNodeContext.ts +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class IndentationNodeContext { - private _node: ISyntaxNode; - private _parent: IndentationNodeContext; - private _fullStart: number; - private _indentationAmount: number; - private _childIndentationAmountDelta: number; - private _depth: number; - private _hasSkippedOrMissingTokenChild: boolean; - - constructor(parent: IndentationNodeContext, node: ISyntaxNode, fullStart: number, indentationAmount: number, childIndentationAmountDelta: number) { - this.update(parent, node, fullStart, indentationAmount, childIndentationAmountDelta); - } - - public parent(): IndentationNodeContext { - return this._parent; - } - - public node(): ISyntaxNode { - return this._node; - } - - public fullStart(): number { - return this._fullStart; - } - - public fullWidth(): number { - return fullWidth(this._node); - } - - public start(): number { - return this._fullStart + leadingTriviaWidth(this._node); - } - - public end(): number { - return this._fullStart + leadingTriviaWidth(this._node) + width(this._node); - } - - public indentationAmount(): number { - return this._indentationAmount; - } - - public childIndentationAmountDelta(): number { - return this._childIndentationAmountDelta; - } - - public depth(): number { - return this._depth; - } - - public kind(): SyntaxKind { - return this._node.kind; - } - - public hasSkippedOrMissingTokenChild(): boolean { - if (this._hasSkippedOrMissingTokenChild === null) { - this._hasSkippedOrMissingTokenChild = Syntax.nodeHasSkippedOrMissingTokens(this._node); - } - return this._hasSkippedOrMissingTokenChild; - } - - public clone(pool: IndentationNodeContextPool): IndentationNodeContext { - var parent: IndentationNodeContext = null; - if (this._parent) { - parent = this._parent.clone(pool); - } - return pool.getNode(parent, this._node, this._fullStart, this._indentationAmount, this._childIndentationAmountDelta); - } - - public update(parent: IndentationNodeContext, node: ISyntaxNode, fullStart: number, indentationAmount: number, childIndentationAmountDelta: number) { - this._parent = parent; - this._node = node; - this._fullStart = fullStart; - this._indentationAmount = indentationAmount; - this._childIndentationAmountDelta = childIndentationAmountDelta; - this._hasSkippedOrMissingTokenChild = null; - - if (parent) { - this._depth = parent.depth() + 1; - } - else { - this._depth = 0; - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/indentationNodeContextPool.ts b/src/services/formatting/indentationNodeContextPool.ts deleted file mode 100644 index ea5b26277b5..00000000000 --- a/src/services/formatting/indentationNodeContextPool.ts +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class IndentationNodeContextPool { - private nodes: IndentationNodeContext[] = []; - - public getNode(parent: IndentationNodeContext, node: ISyntaxNode, fullStart: number, indentationLevel: number, childIndentationLevelDelta: number): IndentationNodeContext { - if (this.nodes.length > 0) { - var cachedNode = this.nodes.pop(); - cachedNode.update(parent, node, fullStart, indentationLevel, childIndentationLevelDelta); - return cachedNode; - } - - return new IndentationNodeContext(parent, node, fullStart, indentationLevel, childIndentationLevelDelta); - } - - public releaseNode(node: IndentationNodeContext, recursive: boolean = false): void { - this.nodes.push(node); - - if (recursive) { - var parent = node.parent(); - if (parent) { - this.releaseNode(parent, recursive); - } - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/indentationTrackingWalker.ts b/src/services/formatting/indentationTrackingWalker.ts deleted file mode 100644 index 9ed998858c5..00000000000 --- a/src/services/formatting/indentationTrackingWalker.ts +++ /dev/null @@ -1,365 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class IndentationTrackingWalker { - private _position: number = 0; - private _parent: IndentationNodeContext = null; - private _textSpan: TextSpan; - private _snapshot: ITextSnapshot; - private _lastTriviaWasNewLine: boolean; - private _indentationNodeContextPool: IndentationNodeContextPool; - private _text: ISimpleText; - - constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, public options: FormattingOptions) { - // Create a pool object to manage context nodes while walking the tree - this._indentationNodeContextPool = new IndentationNodeContextPool(); - - this._textSpan = textSpan; - this._text = sourceUnit.syntaxTree.text; - this._snapshot = snapshot; - this._parent = this._indentationNodeContextPool.getNode(null, sourceUnit, 0, 0, 0); - - // Is the first token in the span at the start of a new line. - this._lastTriviaWasNewLine = indentFirstToken; - } - - public position(): number { - return this._position; - } - - public parent(): IndentationNodeContext { - return this._parent; - } - - public textSpan(): TextSpan { - return this._textSpan; - } - - public snapshot(): ITextSnapshot { - return this._snapshot; - } - - public indentationNodeContextPool(): IndentationNodeContextPool { - return this._indentationNodeContextPool; - } - - public forceIndentNextToken(tokenStart: number): void { - this._lastTriviaWasNewLine = true; - this.forceRecomputeIndentationOfParent(tokenStart, true); - } - - public forceSkipIndentingNextToken(tokenStart: number): void { - this._lastTriviaWasNewLine = false; - this.forceRecomputeIndentationOfParent(tokenStart, false); - } - - public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void { - throw Errors.abstract(); - } - - public visitTokenInSpan(token: ISyntaxToken): void { - if (this._lastTriviaWasNewLine) { - // Compute the indentation level at the current token - var indentationAmount = this.getTokenIndentationAmount(token); - var commentIndentationAmount = this.getCommentIndentationAmount(token); - - // Process the token - this.indentToken(token, indentationAmount, commentIndentationAmount); - } - } - - public visitToken(token: ISyntaxToken): void { - var tokenSpan = new TextSpan(this._position, token.fullWidth()); - - if (tokenSpan.intersectsWithTextSpan(this._textSpan)) { - this.visitTokenInSpan(token); - - // Only track new lines on tokens within the range. Make sure to check that the last trivia is a newline, and not just one of the trivia - var trivia = token.trailingTrivia(); - this._lastTriviaWasNewLine = trivia.hasNewLine() && trivia.syntaxTriviaAt(trivia.count() - 1).kind() == SyntaxKind.NewLineTrivia; - } - - // Update the position - this._position += token.fullWidth(); - } - - public walk(element: ISyntaxElement) { - if (element) { - if (isToken(element)) { - this.visitToken(element); - } - else if (element.kind === SyntaxKind.List) { - for (var i = 0, n = childCount(element); i < n; i++) { - this.walk(childAt(element, i)); - } - } - else { - this.visitNode(element); - } - } - } - - private visitNode(node: ISyntaxNode): void { - var nodeSpan = new TextSpan(this._position, fullWidth(node)); - - if (nodeSpan.intersectsWithTextSpan(this._textSpan)) { - // Update indentation level - var indentation = this.getNodeIndentation(node); - - // Update the parent - var currentParent = this._parent; - this._parent = this._indentationNodeContextPool.getNode(currentParent, node, this._position, indentation.indentationAmount, indentation.indentationAmountDelta); - - // Visit node - for (var i = 0, n = childCount(node); i < n; i++) { - this.walk(childAt(node, i)); - } - - // Reset state - this._indentationNodeContextPool.releaseNode(this._parent); - this._parent = currentParent; - } - else { - // We're skipping the node, so update our position accordingly. - this._position += fullWidth(node); - } - } - - private getTokenIndentationAmount(token: ISyntaxToken): number { - // If this is the first token of a node, it should follow the node indentation and not the child indentation; - // (e.g.class in a class declaration or module in module declariotion). - // Open and close braces should follow the indentation of thier parent as well(e.g. - // class { - // } - // Also in a do-while statement, the while should be indented like the parent. - if (firstToken(this._parent.node()) === token || - token.kind === SyntaxKind.OpenBraceToken || token.kind === SyntaxKind.CloseBraceToken || - token.kind === SyntaxKind.OpenBracketToken || token.kind === SyntaxKind.CloseBracketToken || - (token.kind === SyntaxKind.WhileKeyword && this._parent.node().kind == SyntaxKind.DoStatement)) { - return this._parent.indentationAmount(); - } - - return (this._parent.indentationAmount() + this._parent.childIndentationAmountDelta()); - } - - private getCommentIndentationAmount(token: ISyntaxToken): number { - // If this is token terminating an indentation scope, leading comments should be indented to follow the children - // indentation level and not the node - - if (token.kind === SyntaxKind.CloseBraceToken || token.kind === SyntaxKind.CloseBracketToken) { - return (this._parent.indentationAmount() + this._parent.childIndentationAmountDelta()); - } - return this._parent.indentationAmount(); - } - - private getNodeIndentation(node: ISyntaxNode, newLineInsertedByFormatting?: boolean): { indentationAmount: number; indentationAmountDelta: number; } { - var parent = this._parent; - - // We need to get the parent's indentation, which could be one of 2 things. If first token of the parent is in the span, use the parent's computed indentation. - // If the parent was outside the span, use the actual indentation of the parent. - var parentIndentationAmount: number; - if (this._textSpan.containsPosition(parent.start())) { - parentIndentationAmount = parent.indentationAmount(); - } - else { - if (parent.kind() === SyntaxKind.Block && !this.shouldIndentBlockInParent(this._parent.parent())) { - // Blocks preserve the indentation of their containing node (unless they're a - // standalone block in a list). i.e. if you have: - // - // function foo( - // a: number) { - // - // Then we expect the indentation of the block to be tied to the function, not to - // the line that the block is defined on. If we were to do the latter, then the - // indentation would be here: - // - // function foo( - // a: number) { - // | - // - // Instead of: - // - // function foo( - // a: number) { - // | - parent = this._parent.parent(); - } - - var line = this._snapshot.getLineFromPosition(parent.start()).getText(); - var firstNonWhiteSpacePosition = Indentation.firstNonWhitespacePosition(line); - parentIndentationAmount = Indentation.columnForPositionInString(line, firstNonWhiteSpacePosition, this.options); - } - var parentIndentationAmountDelta = parent.childIndentationAmountDelta(); - - // The indentation level of the node - var indentationAmount: number; - - // The delta it adds to its children. - var indentationAmountDelta: number; - var parentNode = parent.node(); - - switch (node.kind) { - default: - // General case - // This node should follow the child indentation set by its parent - // This node does not introduce any new indentation scope, indent any decendants of this node (tokens or child nodes) - // using the same indentation level - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - indentationAmountDelta = 0; - break; - - // Statements introducing {} - case SyntaxKind.ClassDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.ObjectType: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.SwitchStatement: - case SyntaxKind.ObjectLiteralExpression: - case SyntaxKind.ConstructorDeclaration: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.MemberFunctionDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.IndexMemberDeclaration: - case SyntaxKind.CatchClause: - // Statements introducing [] - case SyntaxKind.ArrayLiteralExpression: - case SyntaxKind.ArrayType: - case SyntaxKind.ElementAccessExpression: - case SyntaxKind.IndexSignature: - // Other statements - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WithStatement: - case SyntaxKind.CaseSwitchClause: - case SyntaxKind.DefaultSwitchClause: - case SyntaxKind.ReturnStatement: - case SyntaxKind.ThrowStatement: - case SyntaxKind.SimpleArrowFunctionExpression: - case SyntaxKind.ParenthesizedArrowFunctionExpression: - case SyntaxKind.VariableDeclaration: - case SyntaxKind.ExportAssignment: - - // Expressions which have argument lists or parameter lists - case SyntaxKind.InvocationExpression: - case SyntaxKind.ObjectCreationExpression: - case SyntaxKind.CallSignature: - case SyntaxKind.ConstructSignature: - - // These nodes should follow the child indentation set by its parent; - // they introduce a new indenation scope; children should be indented at one level deeper - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - indentationAmountDelta = this.options.indentSpaces; - break; - - case SyntaxKind.IfStatement: - if (parent.kind() === SyntaxKind.ElseClause && - !SyntaxUtilities.isLastTokenOnLine((parentNode).elseKeyword, this._text)) { - // This is an else if statement with the if on the same line as the else, do not indent the if statmement. - // Note: Children indentation has already been set by the parent if statement, so no need to increment - indentationAmount = parentIndentationAmount; - } - else { - // Otherwise introduce a new indenation scope; children should be indented at one level deeper - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - } - indentationAmountDelta = this.options.indentSpaces; - break; - - case SyntaxKind.ElseClause: - // Else should always follow its parent if statement indentation. - // Note: Children indentation has already been set by the parent if statement, so no need to increment - indentationAmount = parentIndentationAmount; - indentationAmountDelta = this.options.indentSpaces; - break; - - - case SyntaxKind.Block: - // Check if the block is a member in a list of statements (if the parent is a source unit, module, or block, or switch clause) - if (this.shouldIndentBlockInParent(parent)) { - indentationAmount = parentIndentationAmount + parentIndentationAmountDelta; - } - else { - indentationAmount = parentIndentationAmount; - } - - indentationAmountDelta = this.options.indentSpaces; - break; - } - - // If the parent happens to start on the same line as this node, then override the current node indenation with that - // of the parent. This avoid having to add an extra level of indentation for the children. e.g.: - // return { - // a:1 - // }; - // instead of: - // return { - // a:1 - // }; - // We also need to pass the delta (if it is nonzero) to the children, so that subsequent lines get indented. Essentially, if any node starting on the given line - // has a nonzero delta , the resulting delta should be inherited from this node. This is to indent cases like the following: - // return a - // || b; - // Lastly, it is possible the node indentation needs to be recomputed because the formatter inserted a newline before its first token. - // If this is the case, we know the node no longer starts on the same line as its parent (or at least we shouldn't treat it as such). - if (parentNode) { - if (!newLineInsertedByFormatting /*This could be false or undefined here*/) { - var parentStartLine = this._snapshot.getLineNumberFromPosition(parent.start()); - var currentNodeStartLine = this._snapshot.getLineNumberFromPosition(this._position + leadingTriviaWidth(node)); - if (parentStartLine === currentNodeStartLine || newLineInsertedByFormatting === false /*meaning a new line was removed and we are force recomputing*/) { - indentationAmount = parentIndentationAmount; - indentationAmountDelta = Math.min(this.options.indentSpaces, parentIndentationAmountDelta + indentationAmountDelta); - } - } - } - - return { - indentationAmount: indentationAmount, - indentationAmountDelta: indentationAmountDelta - }; - } - - private shouldIndentBlockInParent(parent: IndentationNodeContext): boolean { - switch (parent.kind()) { - case SyntaxKind.SourceUnit: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.Block: - case SyntaxKind.CaseSwitchClause: - case SyntaxKind.DefaultSwitchClause: - return true; - - default: - return false; - } - } - - private forceRecomputeIndentationOfParent(tokenStart: number, newLineAdded: boolean /*as opposed to removed*/): void { - var parent = this._parent; - if (parent.fullStart() === tokenStart) { - // Temporarily pop the parent before recomputing - this._parent = parent.parent(); - var indentation = this.getNodeIndentation(parent.node(), /* newLineInsertedByFormatting */ newLineAdded); - parent.update(parent.parent(), parent.node(), parent.fullStart(), indentation.indentationAmount, indentation.indentationAmountDelta); - this._parent = parent; - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/multipleTokenIndenter.ts b/src/services/formatting/multipleTokenIndenter.ts deleted file mode 100644 index 9297db96635..00000000000 --- a/src/services/formatting/multipleTokenIndenter.ts +++ /dev/null @@ -1,206 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class MultipleTokenIndenter extends IndentationTrackingWalker { - private _edits: TextEditInfo[] = []; - - constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, options: FormattingOptions) { - super(textSpan, sourceUnit, snapshot, indentFirstToken, options); - } - - public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void { - // Ignore generated tokens - if (token.fullWidth() === 0) { - return; - } - - // If we have any skipped tokens as children, do not process this node for indentation or formatting - if (this.parent().hasSkippedOrMissingTokenChild()) { - return; - } - - // Be strict, and only consider nodes that fall inside the span. This avoids indenting a multiline string - // on enter at the end of, as the whole token was not included in the span - var tokenSpan = new TextSpan(this.position() + token.leadingTriviaWidth(), width(token)); - if (!this.textSpan().containsTextSpan(tokenSpan)) { - return; - } - - // Compute an indentation string for this token - var indentationString = Indentation.indentationString(indentationAmount, this.options); - - var commentIndentationString = Indentation.indentationString(commentIndentationAmount, this.options); - - // Record any needed indentation edits - this.recordIndentationEditsForToken(token, indentationString, commentIndentationString); - } - - public edits(): TextEditInfo[]{ - return this._edits; - } - - public recordEdit(position: number, length: number, replaceWith: string): void { - this._edits.push(new TextEditInfo(position, length, replaceWith)); - } - - private recordIndentationEditsForToken(token: ISyntaxToken, indentationString: string, commentIndentationString: string) { - var position = this.position(); - var indentNextTokenOrTrivia = true; - var leadingWhiteSpace = ""; // We need to track the whitespace before a multiline comment - - // Process any leading trivia if any - var triviaList = token.leadingTrivia(); - if (triviaList) { - for (var i = 0, length = triviaList.count(); i < length; i++, position += trivia.fullWidth()) { - var trivia = triviaList.syntaxTriviaAt(i); - // Skip this trivia if it is not in the span - if (!this.textSpan().containsTextSpan(new TextSpan(position, trivia.fullWidth()))) { - continue; - } - - switch (trivia.kind()) { - case SyntaxKind.MultiLineCommentTrivia: - // We will only indent the first line of the multiline comment if we were planning to indent the next trivia. However, - // subsequent lines will always be indented - this.recordIndentationEditsForMultiLineComment(trivia, position, commentIndentationString, leadingWhiteSpace, !indentNextTokenOrTrivia /* already indented first line */); - indentNextTokenOrTrivia = false; - leadingWhiteSpace = ""; - break; - - case SyntaxKind.SingleLineCommentTrivia: - case SyntaxKind.SkippedTokenTrivia: - if (indentNextTokenOrTrivia) { - this.recordIndentationEditsForSingleLineOrSkippedText(trivia, position, commentIndentationString); - indentNextTokenOrTrivia = false; - } - break; - - case SyntaxKind.WhitespaceTrivia: - // If the next trivia is a comment, use the comment indentation level instead of the regular indentation level - // If the next trivia is a newline, this whole line is just whitespace, so don't do anything (trimming will take care of it) - var nextTrivia = length > i + 1 && triviaList.syntaxTriviaAt(i + 1); - var whiteSpaceIndentationString = nextTrivia && nextTrivia.isComment() ? commentIndentationString : indentationString; - if (indentNextTokenOrTrivia) { - if (!(nextTrivia && nextTrivia.isNewLine())) { - this.recordIndentationEditsForWhitespace(trivia, position, whiteSpaceIndentationString); - } - indentNextTokenOrTrivia = false; - } - leadingWhiteSpace += trivia.fullText(); - break; - - case SyntaxKind.NewLineTrivia: - // We hit a newline processing the trivia. We need to add the indentation to the - // next line as well. Note: don't bother indenting the newline itself. This will - // just insert ugly whitespace that most users probably will not want. - indentNextTokenOrTrivia = true; - leadingWhiteSpace = ""; - break; - - default: - throw Errors.invalidOperation(); - } - } - - } - - if (token.kind !== SyntaxKind.EndOfFileToken && indentNextTokenOrTrivia) { - // If the last trivia item was a new line, or no trivia items were encounterd record the - // indentation edit at the token position - if (indentationString.length > 0) { - this.recordEdit(position, 0, indentationString); - } - } - } - - private recordIndentationEditsForSingleLineOrSkippedText(trivia: ISyntaxTrivia, fullStart: number, indentationString: string): void { - // Record the edit - if (indentationString.length > 0) { - this.recordEdit(fullStart, 0, indentationString); - } - } - - private recordIndentationEditsForWhitespace(trivia: ISyntaxTrivia, fullStart: number, indentationString: string): void { - var text = trivia.fullText(); - - // Check if the current indentation matches the desired indentation or not - if (indentationString === text) { - return; - } - - // Record the edit - this.recordEdit(fullStart, text.length, indentationString); - } - - private recordIndentationEditsForMultiLineComment(trivia: ISyntaxTrivia, fullStart: number, indentationString: string, leadingWhiteSpace: string, firstLineAlreadyIndented: boolean): void { - // If the multiline comment spans multiple lines, we need to add the right indent amount to - // each successive line segment as well. - var position = fullStart; - var segments = Syntax.splitMultiLineCommentTriviaIntoMultipleLines(trivia); - - if (segments.length <= 1) { - if (!firstLineAlreadyIndented) { - // Process the one-line multiline comment just like a single line comment - this.recordIndentationEditsForSingleLineOrSkippedText(trivia, fullStart, indentationString); - } - return; - } - - // Find number of columns in first segment - var whiteSpaceColumnsInFirstSegment = Indentation.columnForPositionInString(leadingWhiteSpace, leadingWhiteSpace.length, this.options); - - var indentationColumns = Indentation.columnForPositionInString(indentationString, indentationString.length, this.options); - var startIndex = 0; - if (firstLineAlreadyIndented) { - startIndex = 1; - position += segments[0].length; - } - for (var i = startIndex; i < segments.length; i++) { - var segment = segments[i]; - this.recordIndentationEditsForSegment(segment, position, indentationColumns, whiteSpaceColumnsInFirstSegment); - position += segment.length; - } - } - - private recordIndentationEditsForSegment(segment: string, fullStart: number, indentationColumns: number, whiteSpaceColumnsInFirstSegment: number): void { - // Indent subsequent lines using a column delta of the actual indentation relative to the first line - var firstNonWhitespacePosition = Indentation.firstNonWhitespacePosition(segment); - var leadingWhiteSpaceColumns = Indentation.columnForPositionInString(segment, firstNonWhitespacePosition, this.options); - var deltaFromFirstSegment = leadingWhiteSpaceColumns - whiteSpaceColumnsInFirstSegment; - var finalColumns = indentationColumns + deltaFromFirstSegment; - if (finalColumns < 0) { - finalColumns = 0; - } - var indentationString = Indentation.indentationString(finalColumns, this.options); - - if (firstNonWhitespacePosition < segment.length && - CharacterInfo.isLineTerminator(segment.charCodeAt(firstNonWhitespacePosition))) { - // If this segment was just a newline, then don't bother indenting it. That will just - // leave the user with an ugly indent in their output that they probably do not want. - return; - } - - if (indentationString === segment.substring(0, firstNonWhitespacePosition)) { - return; - } - - // Record the edit - this.recordEdit(fullStart, firstNonWhitespacePosition, indentationString); - } - } -} \ No newline at end of file diff --git a/src/services/format/formatting.ts b/src/services/formatting/references.ts similarity index 100% rename from src/services/format/formatting.ts rename to src/services/formatting/references.ts diff --git a/src/services/formatting/rule.ts b/src/services/formatting/rule.ts index 273f0590ce7..356720d2330 100644 --- a/src/services/formatting/rule.ts +++ b/src/services/formatting/rule.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class Rule { constructor( public Descriptor: RuleDescriptor, diff --git a/src/services/formatting/ruleAction.ts b/src/services/formatting/ruleAction.ts index 32c67c950ca..d2890d8e080 100644 --- a/src/services/formatting/ruleAction.ts +++ b/src/services/formatting/ruleAction.ts @@ -13,13 +13,13 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { - export enum RuleAction { - Ignore, - Space, - NewLine, - Delete +module ts.formatting { + export const enum RuleAction { + Ignore = 0x00000001, + Space = 0x00000002, + NewLine = 0x00000004, + Delete = 0x00000008 } } \ No newline at end of file diff --git a/src/services/formatting/ruleDescriptor.ts b/src/services/formatting/ruleDescriptor.ts index 1e7d822d57b..0a9a5285133 100644 --- a/src/services/formatting/ruleDescriptor.ts +++ b/src/services/formatting/ruleDescriptor.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class RuleDescriptor { constructor(public LeftTokenRange: Shared.TokenRange, public RightTokenRange: Shared.TokenRange) { } diff --git a/src/services/formatting/ruleFlag.ts b/src/services/formatting/ruleFlag.ts index d815537dfd9..aaf70639e01 100644 --- a/src/services/formatting/ruleFlag.ts +++ b/src/services/formatting/ruleFlag.ts @@ -13,10 +13,10 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { - export enum RuleFlags { +module ts.formatting { + export const enum RuleFlags { None, CanDeleteNewLines } diff --git a/src/services/formatting/ruleOperation.ts b/src/services/formatting/ruleOperation.ts index 1f74aea0784..c73e3b6bcf7 100644 --- a/src/services/formatting/ruleOperation.ts +++ b/src/services/formatting/ruleOperation.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class RuleOperation { public Context: RuleOperationContext; public Action: RuleAction; diff --git a/src/services/formatting/ruleOperationContext.ts b/src/services/formatting/ruleOperationContext.ts index a1e349210e4..d037f8e70d7 100644 --- a/src/services/formatting/ruleOperationContext.ts +++ b/src/services/formatting/ruleOperationContext.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class RuleOperationContext { private customContextChecks: { (context: FormattingContext): boolean; }[]; diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 2bb8be11e7a..34ed2b74d91 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class Rules { public getRuleName(rule: Rule) { var o: ts.Map = this; @@ -241,7 +241,7 @@ module TypeScript.Services.Formatting { this.SpaceBeforeOpenBraceInFunction = new Rule(RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), RuleAction.Space), RuleFlags.CanDeleteNewLines); // Place a space before open brace in a TypeScript declaration that has braces as children (class, module, enum, etc) - this.TypeScriptOpenBraceLeftTokenRange = Shared.TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.MultiLineCommentTrivia]); + this.TypeScriptOpenBraceLeftTokenRange = Shared.TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.MultiLineCommentTrivia]); this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new Rule(RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), RuleAction.Space), RuleFlags.CanDeleteNewLines); // Place a space before open brace in a control flow construct @@ -299,7 +299,7 @@ module TypeScript.Services.Formatting { // get x() {} // set x(val) {} - this.SpaceAfterGetSetInMember = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.GetKeyword, SyntaxKind.SetKeyword]), SyntaxKind.IdentifierName), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space)); + this.SpaceAfterGetSetInMember = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.GetKeyword, SyntaxKind.SetKeyword]), SyntaxKind.Identifier), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space)); // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. this.SpaceBeforeBinaryKeywordOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.BinaryKeywordOperators), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); @@ -324,7 +324,7 @@ module TypeScript.Services.Formatting { this.SpaceAfterArrow = new Rule(RuleDescriptor.create3(SyntaxKind.EqualsGreaterThanToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); // Optional parameters and var args - this.NoSpaceAfterEllipsis = new Rule(RuleDescriptor.create1(SyntaxKind.DotDotDotToken, SyntaxKind.IdentifierName), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceAfterEllipsis = new Rule(RuleDescriptor.create1(SyntaxKind.DotDotDotToken, SyntaxKind.Identifier), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); this.NoSpaceAfterOptionalParameters = new Rule(RuleDescriptor.create3(SyntaxKind.QuestionToken, Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.CommaToken])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); // generics @@ -437,7 +437,7 @@ module TypeScript.Services.Formatting { /// static IsForContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.ForStatement; + return context.contextNode.kind === SyntaxKind.ForStatement; } static IsNotForContext(context: FormattingContext): boolean { @@ -446,17 +446,57 @@ module TypeScript.Services.Formatting { static IsBinaryOpContext(context: FormattingContext): boolean { - switch (context.contextNode.kind()) { - // binary expressions + switch (context.contextNode.kind) { case SyntaxKind.BinaryExpression: case SyntaxKind.ConditionalExpression: return true; + //// binary expressions + //case SyntaxKind.AssignmentExpression: + //case SyntaxKind.AddAssignmentExpression: + //case SyntaxKind.SubtractAssignmentExpression: + //case SyntaxKind.MultiplyAssignmentExpression: + //case SyntaxKind.DivideAssignmentExpression: + //case SyntaxKind.ModuloAssignmentExpression: + //case SyntaxKind.AndAssignmentExpression: + //case SyntaxKind.ExclusiveOrAssignmentExpression: + //case SyntaxKind.OrAssignmentExpression: + //case SyntaxKind.LeftShiftAssignmentExpression: + //case SyntaxKind.SignedRightShiftAssignmentExpression: + //case SyntaxKind.UnsignedRightShiftAssignmentExpression: + //case SyntaxKind.ConditionalExpression: + //case SyntaxKind.LogicalOrExpression: + //case SyntaxKind.LogicalAndExpression: + //case SyntaxKind.BitwiseOrExpression: + //case SyntaxKind.BitwiseExclusiveOrExpression: + //case SyntaxKind.BitwiseAndExpression: + //case SyntaxKind.EqualsWithTypeConversionExpression: + //case SyntaxKind.NotEqualsWithTypeConversionExpression: + //case SyntaxKind.EqualsExpression: + //case SyntaxKind.NotEqualsExpression: + //case SyntaxKind.LessThanExpression: + //case SyntaxKind.GreaterThanExpression: + //case SyntaxKind.LessThanOrEqualExpression: + //case SyntaxKind.GreaterThanOrEqualExpression: + //case SyntaxKind.InstanceOfExpression: + //case SyntaxKind.InExpression: + //case SyntaxKind.LeftShiftExpression: + //case SyntaxKind.SignedRightShiftExpression: + //case SyntaxKind.UnsignedRightShiftExpression: + //case SyntaxKind.MultiplyExpression: + //case SyntaxKind.DivideExpression: + //case SyntaxKind.ModuloExpression: + //case SyntaxKind.AddExpression: + //case SyntaxKind.SubtractExpression: + // return true; // equal in import a = module('a'); case SyntaxKind.ImportDeclaration: // equal in var a = 0; - case SyntaxKind.VariableDeclarator: - case SyntaxKind.EqualsValueClause: + case SyntaxKind.VariableDeclaration: + // equal in p = 0; + case SyntaxKind.Parameter: + case SyntaxKind.EnumMember: + case SyntaxKind.Property: return context.currentTokenSpan.kind === SyntaxKind.EqualsToken || context.nextTokenSpan.kind === SyntaxKind.EqualsToken; // "in" keyword in for (var x in []) { } case SyntaxKind.ForInStatement: @@ -512,16 +552,21 @@ module TypeScript.Services.Formatting { } // IMPORTANT!!! This method must return true ONLY for nodes with open and close braces as immediate children - static NodeIsBlockContext(node: IndentationNodeContext): boolean { + static NodeIsBlockContext(node: Node): boolean { if (Rules.NodeIsTypeScriptDeclWithBlockContext(node)) { // This means we are in a context that looks like a block to the user, but in the grammar is actually not a node (it's a class, module, enum, object type literal, etc). return true; } - switch (node.kind()) { + switch (node.kind) { case SyntaxKind.Block: case SyntaxKind.SwitchStatement: - case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.ObjectLiteral: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.FunctionBlock: + case SyntaxKind.ModuleBlock: return true; } @@ -529,17 +574,20 @@ module TypeScript.Services.Formatting { } static IsFunctionDeclContext(context: FormattingContext): boolean { - switch (context.contextNode.kind()) { + switch (context.contextNode.kind) { case SyntaxKind.FunctionDeclaration: - case SyntaxKind.MemberFunctionDeclaration: + case SyntaxKind.Method: + //case SyntaxKind.MemberFunctionDeclaration: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: - case SyntaxKind.MethodSignature: + ///case SyntaxKind.MethodSignature: case SyntaxKind.CallSignature: case SyntaxKind.FunctionExpression: - case SyntaxKind.ConstructorDeclaration: - case SyntaxKind.SimpleArrowFunctionExpression: - case SyntaxKind.ParenthesizedArrowFunctionExpression: + case SyntaxKind.Constructor: + case SyntaxKind.ArrowFunction: + //case SyntaxKind.ConstructorDeclaration: + //case SyntaxKind.SimpleArrowFunctionExpression: + //case SyntaxKind.ParenthesizedArrowFunctionExpression: case SyntaxKind.InterfaceDeclaration: // This one is not truly a function, but for formatting purposes, it acts just like one return true; } @@ -551,11 +599,12 @@ module TypeScript.Services.Formatting { return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); } - static NodeIsTypeScriptDeclWithBlockContext(node: IndentationNodeContext): boolean { - switch (node.kind()) { + static NodeIsTypeScriptDeclWithBlockContext(node: Node): boolean { + switch (node.kind) { case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: case SyntaxKind.EnumDeclaration: - case SyntaxKind.ObjectType: + case SyntaxKind.TypeLiteral: case SyntaxKind.ModuleDeclaration: return true; } @@ -564,11 +613,16 @@ module TypeScript.Services.Formatting { } static IsAfterCodeBlockContext(context: FormattingContext): boolean { - switch (context.currentTokenParent.kind()) { + switch (context.currentTokenParent.kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.ModuleDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.Block: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.FunctionBlock: + case SyntaxKind.ModuleBlock: case SyntaxKind.SwitchStatement: return true; } @@ -576,7 +630,7 @@ module TypeScript.Services.Formatting { } static IsControlDeclContext(context: FormattingContext): boolean { - switch (context.contextNode.kind()) { + switch (context.contextNode.kind) { case SyntaxKind.IfStatement: case SyntaxKind.SwitchStatement: case SyntaxKind.ForStatement: @@ -585,9 +639,10 @@ module TypeScript.Services.Formatting { case SyntaxKind.TryStatement: case SyntaxKind.DoStatement: case SyntaxKind.WithStatement: - case SyntaxKind.ElseClause: - case SyntaxKind.CatchClause: - case SyntaxKind.FinallyClause: + // TODO + // case SyntaxKind.ElseClause: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: return true; default: @@ -596,15 +651,15 @@ module TypeScript.Services.Formatting { } static IsObjectContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.ObjectLiteralExpression; + return context.contextNode.kind === SyntaxKind.ObjectLiteral; } static IsFunctionCallContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.InvocationExpression; + return context.contextNode.kind === SyntaxKind.CallExpression; } static IsNewContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.ObjectCreationExpression; + return context.contextNode.kind === SyntaxKind.NewExpression; } static IsFunctionCallOrNewContext(context: FormattingContext): boolean { @@ -620,25 +675,43 @@ module TypeScript.Services.Formatting { } static IsModuleDeclContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.ModuleDeclaration; + return context.contextNode.kind === SyntaxKind.ModuleDeclaration; } static IsObjectTypeContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.ObjectType && context.contextNode.parent().kind() !== SyntaxKind.InterfaceDeclaration; + return context.contextNode.kind === SyntaxKind.TypeLiteral;// && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; } - static IsTypeArgumentOrParameter(tokenKind: SyntaxKind, parentKind: SyntaxKind): boolean { - return ((tokenKind === SyntaxKind.LessThanToken || tokenKind === SyntaxKind.GreaterThanToken) && - (parentKind === SyntaxKind.TypeParameterList || parentKind === SyntaxKind.TypeArgumentList)); + static IsTypeArgumentOrParameter(token: TextRangeWithKind, parent: Node): boolean { + if (token.kind !== SyntaxKind.LessThanToken && token.kind !== SyntaxKind.GreaterThanToken) { + return false; + } + switch (parent.kind) { + case SyntaxKind.TypeReference: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.Method: + case SyntaxKind.CallSignature: + case SyntaxKind.ConstructSignature: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + return true; + default: + return false; + + } } static IsTypeArgumentOrParameterContext(context: FormattingContext): boolean { - return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan.kind, context.currentTokenParent.kind()) || - Rules.IsTypeArgumentOrParameter(context.nextTokenSpan.kind, context.nextTokenParent.kind()); + return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan, context.currentTokenParent) || + Rules.IsTypeArgumentOrParameter(context.nextTokenSpan, context.nextTokenParent); } static IsVoidOpContext(context: FormattingContext): boolean { - return context.currentTokenSpan.kind === SyntaxKind.VoidKeyword && context.currentTokenParent.kind() === SyntaxKind.VoidExpression; + return context.currentTokenSpan.kind === SyntaxKind.VoidKeyword && context.currentTokenParent.kind === SyntaxKind.PrefixOperator; } } } \ No newline at end of file diff --git a/src/services/formatting/rulesMap.ts b/src/services/formatting/rulesMap.ts index 0fbe81d16c9..d25320f16a8 100644 --- a/src/services/formatting/rulesMap.ts +++ b/src/services/formatting/rulesMap.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class RulesMap { public map: RulesBucket[]; public mapRowLength: number; diff --git a/src/services/formatting/rulesProvider.ts b/src/services/formatting/rulesProvider.ts index 90b11f01a9b..1469e86971b 100644 --- a/src/services/formatting/rulesProvider.ts +++ b/src/services/formatting/rulesProvider.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class RulesProvider { private globalRules: Rules; private options: ts.FormatCodeOptions; diff --git a/src/services/formatting/snapshotPoint.ts b/src/services/formatting/snapshotPoint.ts deleted file mode 100644 index 762748dbc70..00000000000 --- a/src/services/formatting/snapshotPoint.ts +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - - export class SnapshotPoint { - constructor(public snapshot: ITextSnapshot, public position: number) { - } - public getContainingLine(): ITextSnapshotLine { - return this.snapshot.getLineFromPosition(this.position); - } - public add(offset: number): SnapshotPoint { - return new SnapshotPoint(this.snapshot, this.position + offset); - } - } -} \ No newline at end of file diff --git a/src/services/formatting/textEditInfo.ts b/src/services/formatting/textEditInfo.ts deleted file mode 100644 index bdcbdd0ddc8..00000000000 --- a/src/services/formatting/textEditInfo.ts +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class TextEditInfo { - - constructor(public position: number, public length: number, public replaceWith: string) { - } - - public toString() { - return "[ position: " + this.position + ", length: " + this.length + ", replaceWith: '" + this.replaceWith + "' ]"; - } - } -} \ No newline at end of file diff --git a/src/services/formatting/textSnapshot.ts b/src/services/formatting/textSnapshot.ts deleted file mode 100644 index 4f2904dd76f..00000000000 --- a/src/services/formatting/textSnapshot.ts +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export interface ITextSnapshot { - getLength(): number; - getText(span: TextSpan): string; - getLineNumberFromPosition(position: number): number; - getLineFromPosition(position: number): ITextSnapshotLine; - getLineFromLineNumber(lineNumber: number): ITextSnapshotLine; - } - - export class TextSnapshot implements ITextSnapshot { - private lines: TextSnapshotLine[]; - - constructor(private snapshot: ISimpleText) { - this.lines = []; - } - - public getLength(): number { - return this.snapshot.length(); - } - - public getText(span: TextSpan): string { - return this.snapshot.substr(span.start(), span.length()); - } - - public getLineNumberFromPosition(position: number): number { - return this.snapshot.lineMap().getLineNumberFromPosition(position); - } - - public getLineFromPosition(position: number): ITextSnapshotLine { - var lineNumber = this.getLineNumberFromPosition(position); - return this.getLineFromLineNumber(lineNumber); - } - - public getLineFromLineNumber(lineNumber: number): ITextSnapshotLine { - var line = this.lines[lineNumber]; - if (line === undefined) { - line = this.getLineFromLineNumberWorker(lineNumber); - this.lines[lineNumber] = line; - } - return line; - } - - private getLineFromLineNumberWorker(lineNumber: number): ITextSnapshotLine { - var lineMap = this.snapshot.lineMap().lineStarts(); - var lineMapIndex = lineNumber; //Note: lineMap is 0-based - if (lineMapIndex < 0 || lineMapIndex >= lineMap.length) - throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.Invalid_line_number_0, [lineMapIndex])); - var start = lineMap[lineMapIndex]; - - var end: number; - var endIncludingLineBreak: number; - var lineBreak = ""; - if (lineMapIndex == lineMap.length) { - end = endIncludingLineBreak = this.snapshot.length(); - } - else { - endIncludingLineBreak = (lineMapIndex >= lineMap.length - 1 ? this.snapshot.length() : lineMap[lineMapIndex + 1]); - for (var p = endIncludingLineBreak - 1; p >= start; p--) { - var c = this.snapshot.substr(p, 1); - //TODO: Other ones? - if (c != "\r" && c != "\n") { - break; - } - } - end = p + 1; - lineBreak = this.snapshot.substr(end, endIncludingLineBreak - end); - } - var result = new TextSnapshotLine(this, lineNumber, start, end, lineBreak); - return result; - } - } -} \ No newline at end of file diff --git a/src/services/formatting/textSnapshotLine.ts b/src/services/formatting/textSnapshotLine.ts deleted file mode 100644 index df2d9eff237..00000000000 --- a/src/services/formatting/textSnapshotLine.ts +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export interface ITextSnapshotLine { - snapshot(): ITextSnapshot; - - start(): SnapshotPoint; - startPosition(): number; - - end(): SnapshotPoint; - endPosition(): number; - - endIncludingLineBreak(): SnapshotPoint; - endIncludingLineBreakPosition(): number; - - length(): number; - lineNumber(): number; - getText(): string; - } - - export class TextSnapshotLine implements ITextSnapshotLine { - constructor(private _snapshot: ITextSnapshot, private _lineNumber: number, private _start: number, private _end: number, private _lineBreak: string) { - } - - public snapshot() { - return this._snapshot; - } - - public start() { - return new SnapshotPoint(this._snapshot, this._start); - } - - public startPosition() { - return this._start; - } - - public end() { - return new SnapshotPoint(this._snapshot, this._end); - } - - public endPosition() { - return this._end; - } - - public endIncludingLineBreak() { - return new SnapshotPoint(this._snapshot, this._end + this._lineBreak.length); - } - - public endIncludingLineBreakPosition() { - return this._end + this._lineBreak.length; - } - - public length() { - return this._end - this._start; - } - - public lineNumber() { - return this._lineNumber; - } - - public getText(): string { - return this._snapshot.getText(TextSpan.fromBounds(this._start, this._end)); - } - } -} \ No newline at end of file diff --git a/src/services/formatting/tokenRange.ts b/src/services/formatting/tokenRange.ts index 0c06f797025..8d421140e67 100644 --- a/src/services/formatting/tokenRange.ts +++ b/src/services/formatting/tokenRange.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export module Shared { export interface ITokenAccess { GetTokens(): SyntaxKind[]; @@ -41,12 +41,6 @@ module TypeScript.Services.Formatting { public Contains(token: SyntaxKind): boolean { return this.tokens.indexOf(token) >= 0; } - - - public toString(): string { - return "[tokenRangeStart=" + SyntaxKind[this.tokens[0]] + "," + - "tokenRangeEnd=" + SyntaxKind[this.tokens[this.tokens.length - 1]] + "]"; - } } export class TokenValuesAccess implements ITokenAccess { @@ -76,10 +70,6 @@ module TypeScript.Services.Formatting { public Contains(tokenValue: SyntaxKind): boolean { return tokenValue == this.token; } - - public toString(): string { - return "[singleTokenKind=" + SyntaxKind[this.token] + "]"; - } } export class TokenAllAccess implements ITokenAccess { @@ -135,18 +125,18 @@ module TypeScript.Services.Formatting { static Any: TokenRange = TokenRange.AllTokens(); static AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([SyntaxKind.MultiLineCommentTrivia])); static Keywords = TokenRange.FromRange(SyntaxKind.FirstKeyword, SyntaxKind.LastKeyword); - static Operators = TokenRange.FromRange(SyntaxKind.SemicolonToken, SyntaxKind.SlashEqualsToken); - static BinaryOperators = TokenRange.FromRange(SyntaxKind.LessThanToken, SyntaxKind.SlashEqualsToken); + static Operators = TokenRange.FromRange(SyntaxKind.FirstOperator, SyntaxKind.LastOperator); + static BinaryOperators = TokenRange.FromRange(SyntaxKind.FirstBinaryOperator, SyntaxKind.LastBinaryOperator); static BinaryKeywordOperators = TokenRange.FromTokens([SyntaxKind.InKeyword, SyntaxKind.InstanceOfKeyword]); - static ReservedKeywords = TokenRange.FromRange(SyntaxKind.FirstFutureReservedStrictKeyword, SyntaxKind.LastFutureReservedStrictKeyword); + static ReservedKeywords = TokenRange.FromRange(SyntaxKind.FirstFutureReservedWord, SyntaxKind.LastFutureReservedWord); static UnaryPrefixOperators = TokenRange.FromTokens([SyntaxKind.PlusPlusToken, SyntaxKind.MinusMinusToken, SyntaxKind.TildeToken, SyntaxKind.ExclamationToken]); - static UnaryPrefixExpressions = TokenRange.FromTokens([SyntaxKind.NumericLiteral, SyntaxKind.IdentifierName, SyntaxKind.OpenParenToken, SyntaxKind.OpenBracketToken, SyntaxKind.OpenBraceToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); - static UnaryPreincrementExpressions = TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); - static UnaryPostincrementExpressions = TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); - static UnaryPredecrementExpressions = TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); - static UnaryPostdecrementExpressions = TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); + static UnaryPrefixExpressions = TokenRange.FromTokens([SyntaxKind.NumericLiteral, SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.OpenBracketToken, SyntaxKind.OpenBraceToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); + static UnaryPreincrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); + static UnaryPostincrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); + static UnaryPredecrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); + static UnaryPostdecrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); static Comments = TokenRange.FromTokens([SyntaxKind.SingleLineCommentTrivia, SyntaxKind.MultiLineCommentTrivia]); - static TypeNames = TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.NumberKeyword, SyntaxKind.StringKeyword, SyntaxKind.BooleanKeyword, SyntaxKind.VoidKeyword, SyntaxKind.AnyKeyword]); + static TypeNames = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.NumberKeyword, SyntaxKind.StringKeyword, SyntaxKind.BooleanKeyword, SyntaxKind.VoidKeyword, SyntaxKind.AnyKeyword]); } } } \ No newline at end of file diff --git a/src/services/formatting/tokenSpan.ts b/src/services/formatting/tokenSpan.ts index aba9c372f35..95f9bab3eee 100644 --- a/src/services/formatting/tokenSpan.ts +++ b/src/services/formatting/tokenSpan.ts @@ -13,11 +13,10 @@ // limitations under the License. // -/// +/// - -module TypeScript.Services.Formatting { - export class TokenSpan extends TextSpan { +module ts.formatting { + export class TokenSpan extends TypeScript.TextSpan { constructor(public kind: SyntaxKind, start: number, length: number) { super(start, length); } diff --git a/src/services/indentation.ts b/src/services/indentation.ts deleted file mode 100644 index 6616cdd3448..00000000000 --- a/src/services/indentation.ts +++ /dev/null @@ -1,154 +0,0 @@ - -module TypeScript.Indentation { - export function columnForEndOfTokenAtPosition(syntaxTree: SyntaxTree, position: number, options: FormattingOptions): number { - var token = findToken(syntaxTree.sourceUnit(), position); - return columnForStartOfTokenAtPosition(syntaxTree, position, options) + width(token); - } - - export function columnForStartOfTokenAtPosition(syntaxTree: SyntaxTree, position: number, options: FormattingOptions): number { - var token = findToken(syntaxTree.sourceUnit(), position); - - // Walk backward from this token until we find the first token in the line. For each token - // we see (that is not the first tokem in line), push the entirety of the text into the text - // array. Then, for the first token, add its text (without its leading trivia) to the text - // array. i.e. if we have: - // - // var foo = a => bar(); - // - // And we want the column for the start of 'bar', then we'll add the underlinded portions to - // the text array: - // - // var foo = a => bar(); - // _ - // __ - // __ - // ____ - // ____ - var firstTokenInLine = Syntax.firstTokenInLineContainingPosition(syntaxTree, token.fullStart()); - var leadingTextInReverse: string[] = []; - - var current = token; - while (current !== firstTokenInLine) { - current = previousToken(current); - - if (current === firstTokenInLine) { - // We're at the first token in teh line. - // We don't want the leading trivia for this token. That will be taken care of in - // columnForFirstNonWhitespaceCharacterInLine. So just push the trailing trivia - // and then the token text. - leadingTextInReverse.push(current.trailingTrivia().fullText()); - leadingTextInReverse.push(current.text()); - } - else { - // We're at an intermediate token on the line. Just push all its text into the array. - leadingTextInReverse.push(current.fullText()); - } - } - - // Now, add all trivia to the start of the line on the first token in the list. - collectLeadingTriviaTextToStartOfLine(firstTokenInLine, leadingTextInReverse); - - return columnForLeadingTextInReverse(leadingTextInReverse, options); - } - - export function columnForStartOfFirstTokenInLineContainingPosition(syntaxTree: SyntaxTree, position: number, options: FormattingOptions): number { - // Walk backward through the tokens until we find the first one on the line. - var firstTokenInLine = Syntax.firstTokenInLineContainingPosition(syntaxTree, position); - var leadingTextInReverse: string[] = []; - - // Now, add all trivia to the start of the line on the first token in the list. - collectLeadingTriviaTextToStartOfLine(firstTokenInLine, leadingTextInReverse); - - return columnForLeadingTextInReverse(leadingTextInReverse, options); - } - - // Collect all the trivia that precedes this token. Stopping when we hit a newline trivia - // or a multiline comment that spans multiple lines. This is meant to be called on the first - // token in a line. - function collectLeadingTriviaTextToStartOfLine(firstTokenInLine: ISyntaxToken, - leadingTextInReverse: string[]) { - var leadingTrivia = firstTokenInLine.leadingTrivia(); - - for (var i = leadingTrivia.count() - 1; i >= 0; i--) { - var trivia = leadingTrivia.syntaxTriviaAt(i); - if (trivia.kind() === SyntaxKind.NewLineTrivia) { - break; - } - - if (trivia.kind() === SyntaxKind.MultiLineCommentTrivia) { - var lineSegments = Syntax.splitMultiLineCommentTriviaIntoMultipleLines(trivia); - leadingTextInReverse.push(ArrayUtilities.last(lineSegments)); - - if (lineSegments.length > 0) { - // This multiline comment actually spanned multiple lines. So we're done. - break; - } - - // It was only on a single line, so keep on going. - } - - leadingTextInReverse.push(trivia.fullText()); - } - } - - function columnForLeadingTextInReverse(leadingTextInReverse: string[], - options: FormattingOptions): number { - var column = 0; - - // walk backwards. This means we're actually walking forward from column 0 to the start of - // the token. - for (var i = leadingTextInReverse.length - 1; i >= 0; i--) { - var text = leadingTextInReverse[i]; - column = columnForPositionInStringWorker(text, text.length, column, options); - } - - return column; - } - - // Returns the column that this input string ends at (assuming it starts at column 0). - export function columnForPositionInString(input: string, position: number, options: FormattingOptions): number { - return columnForPositionInStringWorker(input, position, 0, options); - } - - function columnForPositionInStringWorker(input: string, position: number, startColumn: number, options: FormattingOptions): number { - var column = startColumn; - var spacesPerTab = options.spacesPerTab; - - for (var j = 0; j < position; j++) { - var ch = input.charCodeAt(j); - - if (ch === CharacterCodes.tab) { - column += spacesPerTab - column % spacesPerTab; - } - else { - column++; - } - } - - return column; - } - - export function indentationString(column: number, options: FormattingOptions): string { - var numberOfTabs = 0; - var numberOfSpaces = Math.max(0, column); - - if (options.useTabs) { - numberOfTabs = Math.floor(column / options.spacesPerTab); - numberOfSpaces -= numberOfTabs * options.spacesPerTab; - } - - return StringUtilities.repeat('\t', numberOfTabs) + - StringUtilities.repeat(' ', numberOfSpaces); - } - - export function firstNonWhitespacePosition(value: string): number { - for (var i = 0; i < value.length; i++) { - var ch = value.charCodeAt(i); - if (!CharacterInfo.isWhitespace(ch)) { - return i; - } - } - - return value.length; - } -} \ No newline at end of file diff --git a/src/services/services.ts b/src/services/services.ts index 33bec5ae8d8..defbdd9138c 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -11,9 +11,8 @@ /// /// /// -/// /// -/// +/// /// /// @@ -2083,7 +2082,6 @@ module ts { export function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService { var syntaxTreeCache: SyntaxTreeCache = new SyntaxTreeCache(host); - var formattingRulesProvider: TypeScript.Services.Formatting.RulesProvider; var ruleProvider: ts.formatting.RulesProvider; var hostCache: HostCache; // A cache of all the information about the files on the host side. var program: Program; @@ -5138,36 +5136,11 @@ module ts { return result; } - function getFormattingManager(filename: string, options: FormatCodeOptions) { - // Ensure rules are initialized and up to date wrt to formatting options - if (formattingRulesProvider == null) { - formattingRulesProvider = new TypeScript.Services.Formatting.RulesProvider(host); - } - - formattingRulesProvider.ensureUpToDate(options); - - // Get the Syntax Tree - var syntaxTree = getSyntaxTree(filename); - - // Convert IScriptSnapshot to ITextSnapshot - var scriptSnapshot = syntaxTreeCache.getCurrentScriptSnapshot(filename); - var scriptText = TypeScript.SimpleText.fromScriptSnapshot(scriptSnapshot); - var textSnapshot = new TypeScript.Services.Formatting.TextSnapshot(scriptText); - - var manager = new TypeScript.Services.Formatting.FormattingManager(syntaxTree, textSnapshot, formattingRulesProvider, options); - - return manager; - } - function getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[] { fileName = TypeScript.switchToForwardSlashes(fileName); var options = copyFormatCodeOptions(options); var sourceFile = getCurrentSourceFile(fileName); - var edits = formatting.formatSelection(start, end, sourceFile, getRuleProvider(options), options); - return edits; - - var manager = getFormattingManager(fileName, options); - return manager.formatSelection(start, end); + return formatting.formatSelection(start, end, sourceFile, getRuleProvider(options), options); } function getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[] { @@ -5175,38 +5148,23 @@ module ts { var sourceFile = getCurrentSourceFile(fileName); var options = copyFormatCodeOptions(options) - var edits = formatting.formatDocument(sourceFile, getRuleProvider(options), options); - return edits; - - var manager = getFormattingManager(fileName, options); - return manager.formatDocument(); + return formatting.formatDocument(sourceFile, getRuleProvider(options), options); } function getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[] { fileName = TypeScript.switchToForwardSlashes(fileName); - var manager = getFormattingManager(fileName, options); - var sourceFile = getCurrentSourceFile(fileName); var options = copyFormatCodeOptions(options); if (key === "}") { - var edits = formatting.formatOnClosingCurly(position, sourceFile, getRuleProvider(options), options); - return edits; - - return manager.formatOnClosingCurlyBrace(position); + return formatting.formatOnClosingCurly(position, sourceFile, getRuleProvider(options), options); } else if (key === ";") { - var edits = formatting.formatOnSemicolon(position, sourceFile, getRuleProvider(options), options); - return edits; - - return manager.formatOnSemicolon(position); + return formatting.formatOnSemicolon(position, sourceFile, getRuleProvider(options), options); } else if (key === "\n") { - var edits = formatting.formatOnEnter(position, sourceFile, getRuleProvider(options), options); - return edits; - - return manager.formatOnEnter(position); + return formatting.formatOnEnter(position, sourceFile, getRuleProvider(options), options); } return []; From 5bbdbffbc3e6ff207a046f44ebf970e2d1694f82 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 8 Nov 2014 23:03:38 -0800 Subject: [PATCH 067/154] added tests for formatting in try blocks, add startEndOverlapsWithStartEnd --- src/services/formatting.ts | 15 ++++----------- src/services/services.ts | 1 - src/services/utilities.ts | 19 ++++++++++++------- .../fourslash/formatInTryCatchFinally.ts | 13 +++++++++++++ .../fourslash/formattingBlockInCaseClauses.ts | 12 ++++++++++++ .../fourslash/formattingIfInElseBlock.ts | 12 ++++++++++++ 6 files changed, 53 insertions(+), 19 deletions(-) create mode 100644 tests/cases/fourslash/formatInTryCatchFinally.ts create mode 100644 tests/cases/fourslash/formattingBlockInCaseClauses.ts create mode 100644 tests/cases/fourslash/formattingIfInElseBlock.ts diff --git a/src/services/formatting.ts b/src/services/formatting.ts index e455183eccc..f7fbb82491f 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -151,9 +151,7 @@ module ts.formatting { return false; } - var s = Math.max(r.pos, error.start); - var e = Math.min(r.end, error.start + error.length); - if (s < e) { + if (startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { return true; } @@ -177,15 +175,10 @@ module ts.formatting { // formatting context to be used by rules provider to get rules var formattingContext = new FormattingContext(sourceFile, requestKind); + var formattingScanner = getFormattingScanner(sourceFile, originalRange.pos, originalRange.end); + var enclosingNode = findEnclosingNode(originalRange, sourceFile); - if (enclosingNode.kind === SyntaxKind.SourceFile) { - var formattingScanner = getFormattingScanner(sourceFile, originalRange.pos, originalRange.end); - var initialIndentation = 0; - } - else { - var formattingScanner = getFormattingScanner(sourceFile, enclosingNode.pos, originalRange.end); - var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); - } + var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); var previousRangeHasError: boolean; var previousRange: TextRangeWithKind; diff --git a/src/services/services.ts b/src/services/services.ts index defbdd9138c..e9d8de76679 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -8,7 +8,6 @@ /// /// /// -/// /// /// /// diff --git a/src/services/utilities.ts b/src/services/utilities.ts index a4146c52e5e..b1a18dcbd30 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -8,17 +8,18 @@ module ts { export function getEndLinePosition(line: number, sourceFile: SourceFile): number { Debug.assert(line >= 1); var lineStarts = sourceFile.getLineStarts(); - - line = line - 1; - if (line === lineStarts.length - 1) { + + // lines returned by SourceFile.getLineAndCharacterForPosition are 1-based + var lineIndex = line - 1; + if (lineIndex === lineStarts.length - 1) { // last line - return EOF return sourceFile.text.length - 1; } else { // current line start - var start = lineStarts[line]; + var start = lineStarts[lineIndex]; // take the start position of the next line -1 = it should be some line break - var pos = lineStarts[line + 1] - 1; + var pos = lineStarts[lineIndex + 1] - 1; Debug.assert(isLineBreak(sourceFile.text.charCodeAt(pos))); // walk backwards skipping line breaks, stop the the beginning of current line. // i.e: @@ -55,8 +56,12 @@ module ts { } export function rangeOverlapsWithStartEnd(r1: TextRange, start: number, end: number) { - var start = Math.max(r1.pos, start); - var end = Math.min(r1.end, end); + return startEndOverlapsWithStartEnd(r1.pos, r1.end, start, end); + } + + export function startEndOverlapsWithStartEnd(start1: number, end1: number, start2: number, end2: number) { + var start = Math.max(start1, start2); + var end = Math.min(end1, end2); return start < end; } diff --git a/tests/cases/fourslash/formatInTryCatchFinally.ts b/tests/cases/fourslash/formatInTryCatchFinally.ts new file mode 100644 index 00000000000..dbbf28fb878 --- /dev/null +++ b/tests/cases/fourslash/formatInTryCatchFinally.ts @@ -0,0 +1,13 @@ +/// + +////try +////{ +//// var x = 1/*1*/ +////} +////catch (e) +////{ +////} + +goTo.marker("1"); +edit.insert(";") +verify.currentLineContentIs(" var x = 1;"); diff --git a/tests/cases/fourslash/formattingBlockInCaseClauses.ts b/tests/cases/fourslash/formattingBlockInCaseClauses.ts new file mode 100644 index 00000000000..64cd74ca858 --- /dev/null +++ b/tests/cases/fourslash/formattingBlockInCaseClauses.ts @@ -0,0 +1,12 @@ +/// + +////switch (1) { +//// case 1: +//// { +//// /*1*/ +//// break; +////} + +goTo.marker("1"); +edit.insert("}"); +verify.currentLineContentIs(" }"); diff --git a/tests/cases/fourslash/formattingIfInElseBlock.ts b/tests/cases/fourslash/formattingIfInElseBlock.ts new file mode 100644 index 00000000000..b4f5246fb35 --- /dev/null +++ b/tests/cases/fourslash/formattingIfInElseBlock.ts @@ -0,0 +1,12 @@ +/// + +////if (true) { +////} +////else { +//// if (true) { +//// /*1*/ +////} + +goTo.marker("1"); +edit.insert("}") +verify.currentLineContentIs(" }"); From 82722b96cf34275842c1f272e3858e42ff56c808 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 8 Nov 2014 23:24:08 -0800 Subject: [PATCH 068/154] drop duplicated code --- src/services/formatting.ts | 31 ++++--------------------------- src/services/smartIndenter.ts | 21 ++++++++++++++------- 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/src/services/formatting.ts b/src/services/formatting.ts index f7fbb82491f..ff343e8f91d 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -192,7 +192,7 @@ module ts.formatting { if (formattingScanner.isOnToken()) { var startLine = sourceFile.getLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile)).line; - var delta = shouldIndentChildNodes(enclosingNode.kind) ? options.IndentSize : 0; + var delta = SmartIndenter.shouldIndentChildNode(enclosingNode.kind, SyntaxKind.Unknown) ? options.IndentSize : 0; processNode(enclosingNode, enclosingNode, startLine, initialIndentation, delta); } @@ -233,14 +233,14 @@ module ts.formatting { getIndentation: () => indentation, getDelta: () => delta, recomputeIndentation: (lineAdded) => { - if (node.parent && SmartIndenter.shouldIndentChildNode(node.parent, node)) { + if (node.parent && SmartIndenter.shouldIndentChildNode(node.parent.kind, node.kind)) { if (lineAdded) { indentation += options.IndentSize; } else { indentation -= options.IndentSize; } - if (shouldIndentChildNodes(node.kind)) { + if (SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown)) { delta = options.IndentSize; } else { @@ -420,7 +420,7 @@ module ts.formatting { } } - if (shouldIndentChildNodes(node.kind)) { + if (SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown)) { delta = options.IndentSize; } @@ -760,29 +760,6 @@ module ts.formatting { return false; } - function shouldIndentChildNodes(kind: SyntaxKind): boolean { - if (SmartIndenter.nodeContentIsAlwaysIndented(kind)) { - return true; - } - switch (kind) { - case SyntaxKind.IfStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.ArrowFunction: - case SyntaxKind.Method: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.Constructor: - return true; - } - - return false; - } - function getOpenTokenForList(node: Node, list: Node[]) { switch (node.kind) { case SyntaxKind.Constructor: diff --git a/src/services/smartIndenter.ts b/src/services/smartIndenter.ts index 7feee03d9d8..9fa172a07ac 100644 --- a/src/services/smartIndenter.ts +++ b/src/services/smartIndenter.ts @@ -37,7 +37,7 @@ module ts.formatting { var indentationDelta: number; while (current) { - if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current, previous)) { + if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current.kind, previous ? previous.kind : SyntaxKind.Unknown)) { currentStart = getStartLineAndCharacterForNode(current, sourceFile); if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) { @@ -114,7 +114,7 @@ module ts.formatting { } // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line - if (shouldIndentChildNode(parent, current) && !parentAndChildShareLine) { + if (shouldIndentChildNode(parent.kind, current.kind) && !parentAndChildShareLine) { indentationDelta += options.IndentSize; } @@ -205,6 +205,8 @@ module ts.formatting { var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; } + + return false; } function getActualIndentationForListItem(node: Node, sourceFile: SourceFile, options: EditorOptions): number { @@ -325,20 +327,25 @@ module ts.formatting { return false; } - export function shouldIndentChildNode(parent: Node, child: Node): boolean { - if (nodeContentIsAlwaysIndented(parent.kind)) { + export function shouldIndentChildNode(parent: SyntaxKind, child: SyntaxKind): boolean { + if (nodeContentIsAlwaysIndented(parent)) { return true; } - switch (parent.kind) { + switch (parent) { case SyntaxKind.DoStatement: case SyntaxKind.WhileStatement: case SyntaxKind.ForInStatement: case SyntaxKind.ForStatement: case SyntaxKind.IfStatement: - return child && child.kind !== SyntaxKind.Block; + return child !== SyntaxKind.Block; case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: - return child && child.kind !== SyntaxKind.FunctionBlock; + case SyntaxKind.Method: + case SyntaxKind.ArrowFunction: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + return child !== SyntaxKind.FunctionBlock; default: return false; } From 41e682ccd7ee9a2db36dc1660e5896914b474f8a Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sun, 9 Nov 2014 13:04:35 -0800 Subject: [PATCH 069/154] code cleanup: move functions to the outer scope --- src/services/formatting.ts | 149 +++++++++++++++++++------------------ 1 file changed, 78 insertions(+), 71 deletions(-) diff --git a/src/services/formatting.ts b/src/services/formatting.ts index ff343e8f91d..44068e744a0 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -15,7 +15,7 @@ module ts.formatting { trailingTrivia: TextRangeWithKind[]; } - const enum Indentation { + const enum Constants { Unknown = -1 } @@ -27,6 +27,11 @@ module ts.formatting { recomputeIndentation(lineAddedByFormatting: boolean): void; } + interface Indentation { + indentation: number; + delta: number + } + export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { var line = sourceFile.getLineAndCharacterFromPosition(position).line; Debug.assert(line >= 2); @@ -201,7 +206,73 @@ module ts.formatting { return edits; // local functions + + function tryComputeIndentationForListItem(startPos: number, endPos: number, effectiveParentStartLine: number, range: TextRange, inheritedIndentation: number): number { + if (rangeOverlapsWithStartEnd(range, startPos, endPos)) { + if (inheritedIndentation !== Constants.Unknown) { + return inheritedIndentation; + } + } + else { + var startLine = sourceFile.getLineAndCharacterFromPosition(startPos).line; + var startLinePosition = getStartLinePositionForPosition(startPos, sourceFile); + var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); + if (startLine !== effectiveParentStartLine || startPos === column) { + return column + } + } + + return Constants.Unknown; + } + function computeIndentation( + node: TextRangeWithKind, + startLine: number, + inheritedIndentation: number, + parent: Node, + parentIndentation: DynamicIndentation, + effectiveParentStartLine: number): Indentation { + + var indentation = inheritedIndentation; + var delta = 0; + if (indentation === Constants.Unknown) { + if (isSomeBlock(node.kind)) { + delta = options.IndentSize; + if (isSomeBlock(parent.kind) || + parent.kind === SyntaxKind.SourceFile || + parent.kind === SyntaxKind.CaseClause || + parent.kind === SyntaxKind.DefaultClause) { + + indentation = parentIndentation.getIndentation() + parentIndentation.getDelta(); + } + else { + indentation = parentIndentation.getIndentation(); + } + } + else { + if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { + indentation = parentIndentation.getIndentation(); + } + else { + indentation = parentIndentation.getIndentation() + parentIndentation.getDelta(); + } + } + } + + if (SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown)) { + delta = options.IndentSize; + } + + if (effectiveParentStartLine === startLine) { + indentation = parentIndentation.getIndentation(); + delta = Math.min(options.IndentSize, parentIndentation.getDelta() + delta); + } + return { + indentation: indentation, + delta: delta + } + } + function getDynamicIndentation(node: Node, nodeStartLine: number, indentation: number, delta: number): DynamicIndentation { return { getIndentationForComment: (kind) => { @@ -262,7 +333,7 @@ module ts.formatting { forEachChild( node, child => { - processChildNode(child, Indentation.Unknown, nodeIndentation, nodeStartLine, /*isListElement*/ false) + processChildNode(child, Constants.Unknown, nodeIndentation, nodeStartLine, /*isListElement*/ false) }, (nodes: NodeArray) => { var listStartToken = getOpenTokenForList(node, nodes); @@ -279,7 +350,7 @@ module ts.formatting { } else if (tokenInfo.token.kind === listStartToken) { var tokenStartLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; - var indentation = computeIndentation(tokenInfo.token, tokenStartLine, Indentation.Unknown, node, nodeStartLine); + var indentation = computeIndentation(tokenInfo.token, tokenStartLine, Constants.Unknown, node, nodeIndentation, tokenStartLine); listIndentation = getDynamicIndentation(node, nodeStartLine, indentation.indentation, indentation.delta); consumeTokenAndAdvanceScanner(tokenInfo, node, listIndentation); } @@ -289,7 +360,7 @@ module ts.formatting { } } - var inheritedIndentation: number = Indentation.Unknown; + var inheritedIndentation = Constants.Unknown; var effectiveStartLine = tokenStartLine || nodeStartLine; for (var i = 0, len = nodes.length; i < len; ++i) { inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, listIndentation, effectiveStartLine, /*isListElement*/ true) @@ -327,9 +398,9 @@ module ts.formatting { var childIndentationAmount = isListItem ? tryComputeIndentationForListItem(childStartPos, child.end, effectiveParentStartLine, originalRange, inheritedIndentation) - : Indentation.Unknown; + : Constants.Unknown; - if (isListItem && childIndentationAmount !== Indentation.Unknown) { + if (isListItem && childIndentationAmount !== Constants.Unknown) { inheritedIndentation = childIndentationAmount; } @@ -361,7 +432,7 @@ module ts.formatting { return inheritedIndentation; } - var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, effectiveParentStartLine); + var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, nodeIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStart.line, childIndentation.indentation, childIndentation.delta); @@ -370,70 +441,6 @@ module ts.formatting { return inheritedIndentation; } - function tryComputeIndentationForListItem(startPos: number, endPos: number, effectiveParentStartLine: number, range: TextRange, inheritedIndentation: number): number { - if (rangeOverlapsWithStartEnd(range, startPos, endPos)) { - if (inheritedIndentation !== Indentation.Unknown) { - return inheritedIndentation; - } - } - else { - var startLine = sourceFile.getLineAndCharacterFromPosition(startPos).line; - var startLinePosition = getStartLinePositionForPosition(startPos, sourceFile); - var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); - if (startLine !== effectiveParentStartLine || startPos === column) { - return column - } - } - - return Indentation.Unknown; - } - - function computeIndentation( - node: TextRangeWithKind, - startLine: number, - indentation: number, - parent: Node, - effectiveParentStartLine: number): { indentation: number; delta: number } { - - var delta = 0; - if (indentation === Indentation.Unknown) { - if (isSomeBlock(node.kind)) { - delta = options.IndentSize; - if (isSomeBlock(parent.kind) || - parent.kind === SyntaxKind.SourceFile || - parent.kind === SyntaxKind.CaseClause || - parent.kind === SyntaxKind.DefaultClause) { - - indentation = nodeIndentation.getIndentation() + nodeIndentation.getDelta(); - } - else { - indentation = nodeIndentation.getIndentation(); - } - } - else { - if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { - indentation = nodeIndentation.getIndentation(); - } - else { - indentation = nodeIndentation.getIndentation() + nodeIndentation.getDelta(); - } - } - } - - if (SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown)) { - delta = options.IndentSize; - } - - if (effectiveParentStartLine === startLine) { - indentation = nodeIndentation.getIndentation(); - delta = Math.min(options.IndentSize, nodeIndentation.getDelta() + delta); - } - return { - indentation: indentation, - delta: delta - } - } - function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, indentation: DynamicIndentation): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); From f8f2e6a35314cc08ccf46f4d23c3104bd104c42b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sun, 9 Nov 2014 13:14:06 -0800 Subject: [PATCH 070/154] code cleanup: remove commented code --- src/services/formatting/formattingContext.ts | 10 +++--- src/services/formatting/ruleDescriptor.ts | 1 - src/services/formatting/rules.ts | 38 -------------------- 3 files changed, 5 insertions(+), 44 deletions(-) diff --git a/src/services/formatting/formattingContext.ts b/src/services/formatting/formattingContext.ts index 72fc7bf80fb..2bfb155921e 100644 --- a/src/services/formatting/formattingContext.ts +++ b/src/services/formatting/formattingContext.ts @@ -33,11 +33,11 @@ module ts.formatting { } public updateContext(currentRange: TextRangeWithKind, currentTokenParent: Node, nextRange: TextRangeWithKind, nextTokenParent: Node, commonParent: Node) { - Debug.assert(currentRange != null, "currentTokenSpan is null"); - Debug.assert(currentTokenParent != null, "currentTokenParent is null"); - Debug.assert(nextRange != null, "nextTokenSpan is null"); - Debug.assert(nextTokenParent != null, "nextTokenParent is null"); - Debug.assert(commonParent != null, "commonParent is null"); + Debug.assert(currentRange !== undefined, "currentTokenSpan is null"); + Debug.assert(currentTokenParent !== undefined, "currentTokenParent is null"); + Debug.assert(nextRange !== undefined, "nextTokenSpan is null"); + Debug.assert(nextTokenParent !== undefined, "nextTokenParent is null"); + Debug.assert(commonParent !== undefined, "commonParent is null"); this.currentTokenSpan = currentRange; this.currentTokenParent = currentTokenParent; diff --git a/src/services/formatting/ruleDescriptor.ts b/src/services/formatting/ruleDescriptor.ts index 0a9a5285133..e5b7d6f3186 100644 --- a/src/services/formatting/ruleDescriptor.ts +++ b/src/services/formatting/ruleDescriptor.ts @@ -34,7 +34,6 @@ module ts.formatting { } static create3(left: SyntaxKind, right: Shared.TokenRange): RuleDescriptor - //: this(TokenRange.FromToken(left), right) { return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), right); } diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 34ed2b74d91..4b42591936e 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -450,44 +450,6 @@ module ts.formatting { case SyntaxKind.BinaryExpression: case SyntaxKind.ConditionalExpression: return true; - //// binary expressions - //case SyntaxKind.AssignmentExpression: - //case SyntaxKind.AddAssignmentExpression: - //case SyntaxKind.SubtractAssignmentExpression: - //case SyntaxKind.MultiplyAssignmentExpression: - //case SyntaxKind.DivideAssignmentExpression: - //case SyntaxKind.ModuloAssignmentExpression: - //case SyntaxKind.AndAssignmentExpression: - //case SyntaxKind.ExclusiveOrAssignmentExpression: - //case SyntaxKind.OrAssignmentExpression: - //case SyntaxKind.LeftShiftAssignmentExpression: - //case SyntaxKind.SignedRightShiftAssignmentExpression: - //case SyntaxKind.UnsignedRightShiftAssignmentExpression: - //case SyntaxKind.ConditionalExpression: - //case SyntaxKind.LogicalOrExpression: - //case SyntaxKind.LogicalAndExpression: - //case SyntaxKind.BitwiseOrExpression: - //case SyntaxKind.BitwiseExclusiveOrExpression: - //case SyntaxKind.BitwiseAndExpression: - //case SyntaxKind.EqualsWithTypeConversionExpression: - //case SyntaxKind.NotEqualsWithTypeConversionExpression: - //case SyntaxKind.EqualsExpression: - //case SyntaxKind.NotEqualsExpression: - //case SyntaxKind.LessThanExpression: - //case SyntaxKind.GreaterThanExpression: - //case SyntaxKind.LessThanOrEqualExpression: - //case SyntaxKind.GreaterThanOrEqualExpression: - //case SyntaxKind.InstanceOfExpression: - //case SyntaxKind.InExpression: - //case SyntaxKind.LeftShiftExpression: - //case SyntaxKind.SignedRightShiftExpression: - //case SyntaxKind.UnsignedRightShiftExpression: - //case SyntaxKind.MultiplyExpression: - //case SyntaxKind.DivideExpression: - //case SyntaxKind.ModuloExpression: - //case SyntaxKind.AddExpression: - //case SyntaxKind.SubtractExpression: - // return true; // equal in import a = module('a'); case SyntaxKind.ImportDeclaration: From 2458d238db5daae5c0520773cc563471bef3d6f5 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sun, 9 Nov 2014 23:09:16 -0800 Subject: [PATCH 071/154] code cleanup: added comments --- src/services/formatting.ts | 124 +++++++++++++------ src/services/formatting/formattingScanner.ts | 14 ++- 2 files changed, 100 insertions(+), 38 deletions(-) diff --git a/src/services/formatting.ts b/src/services/formatting.ts index 44068e744a0..f4acd193b02 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -19,6 +19,16 @@ module ts.formatting { Unknown = -1 } + /* + * Indentation for the scope that can be dynamically recomputed. + * i.e + * while(true) + * { var x; + * } + * Normally indentation is applied only to the first token in line so at glance 'var' should not be touched. + * However if some format rule removes new line between ')' and '{' 'var' will become + * the first token in line so it should be indented + */ interface DynamicIndentation { getIndentationForToken(tokenLine: number, tokenKind: SyntaxKind): number; getIndentationForComment(owningToken: SyntaxKind): number; @@ -88,7 +98,7 @@ module ts.formatting { return undefined; } - // walk up and search for the parent node that ends at the same position with precedingToken + // walk up and search for the parent node that ends at the same position with precedingToken. var current = precedingToken; while (current && current.parent && @@ -99,7 +109,9 @@ module ts.formatting { return current; } - + + // Returns true if node is a element in some list in parent + // i.e. parent is class declaration with the list of members and node is one of members. function isListElement(parent: Node, node: Node): boolean { switch (parent.kind) { case SyntaxKind.ClassDeclaration: @@ -120,6 +132,7 @@ module ts.formatting { return false; } + /** find node that fully contains given text range */ function findEnclosingNode(range: TextRange, sourceFile: SourceFile): Node { return find(sourceFile); @@ -129,6 +142,10 @@ module ts.formatting { } } + /** formatting is not applied to ranges that contain parse errors. + * This function will return a predicate that for a given text range will tell + * if there are any parse errors that overlap with the range. + */ function prepareRangeContainsErrorFunction(errors: Diagnostic[], originalRange: TextRange): (r: TextRange) => boolean { if (!errors.length) { return rangeHasNoErrors; @@ -136,7 +153,7 @@ module ts.formatting { // pick only errors that fall in range var sorted = errors - .filter(d => d.isParseError && (d.start >= originalRange.pos && d.start + d.length < originalRange.end)) + .filter(d => d.isParseError && rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length)) .sort((e1, e2) => e1.start - e2.start); if (!sorted.length) { @@ -146,17 +163,22 @@ module ts.formatting { var index = 0; return r => { + // in current implementation sequence of arguments [r1, r2...] is monotonically increasing. + // 'index' tracks the index of the most recent error that was checked. while (true) { if (index >= sorted.length) { + // all errors in the range were already checked -> no error in specified range return false; } var error = sorted[index]; if (r.end <= error.start) { + // specified range ends before the error refered by 'index' - no error in range return false; } if (startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { + // specified range overlaps with error range return true; } @@ -177,11 +199,12 @@ module ts.formatting { var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.syntacticErrors, originalRange); - // formatting context to be used by rules provider to get rules + // formatting context is used by rules provider var formattingContext = new FormattingContext(sourceFile, requestKind); var formattingScanner = getFormattingScanner(sourceFile, originalRange.pos, originalRange.end); + // find the smallest node that fully wraps the range and compute the initial indentation for the node var enclosingNode = findEnclosingNode(originalRange, sourceFile); var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); @@ -191,7 +214,6 @@ module ts.formatting { var previousRangeStartLine: number; var edits: TextChange[] = []; - var lastTriviaWasNewLine: boolean; formattingScanner.advance(); @@ -207,7 +229,17 @@ module ts.formatting { // local functions - function tryComputeIndentationForListItem(startPos: number, endPos: number, effectiveParentStartLine: number, range: TextRange, inheritedIndentation: number): number { + /** Tries to compute the indentation for a list element. + * If list element is not in range then function will pick its actual indentation + * so it can be pushed downstream as inherited indentation. + * If list element is in the range - its indentation will be equal to inherited indentation from its predecessors. + */ + function tryComputeIndentationForListItem(startPos: number, + endPos: number, + parentStartLine: number, + range: TextRange, + inheritedIndentation: number): number { + if (rangeOverlapsWithStartEnd(range, startPos, endPos)) { if (inheritedIndentation !== Constants.Unknown) { return inheritedIndentation; @@ -217,7 +249,7 @@ module ts.formatting { var startLine = sourceFile.getLineAndCharacterFromPosition(startPos).line; var startLinePosition = getStartLinePositionForPosition(startPos, sourceFile); var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); - if (startLine !== effectiveParentStartLine || startPos === column) { + if (startLine !== parentStartLine || startPos === column) { return column } } @@ -238,6 +270,10 @@ module ts.formatting { if (indentation === Constants.Unknown) { if (isSomeBlock(node.kind)) { delta = options.IndentSize; + // blocks should be indented in + // - other blocks + // - source file + // - switch\default clauses if (isSomeBlock(parent.kind) || parent.kind === SyntaxKind.SourceFile || parent.kind === SyntaxKind.CaseClause || @@ -250,7 +286,7 @@ module ts.formatting { } } else { - if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { + if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { indentation = parentIndentation.getIndentation(); } else { @@ -264,6 +300,9 @@ module ts.formatting { } if (effectiveParentStartLine === startLine) { + // if node is located on the same line with the parent + // - inherit indentation from the parent + // - push children if either parent of node itself has non-zero delta indentation = parentIndentation.getIndentation(); delta = Math.min(options.IndentSize, parentIndentation.getDelta() + delta); } @@ -275,7 +314,7 @@ module ts.formatting { function getDynamicIndentation(node: Node, nodeStartLine: number, indentation: number, delta: number): DynamicIndentation { return { - getIndentationForComment: (kind) => { + getIndentationForComment: kind => { switch (kind) { // preceding comment to the token that closes the indentation scope inherits the indentation from the scope // .. { @@ -303,7 +342,7 @@ module ts.formatting { }, getIndentation: () => indentation, getDelta: () => delta, - recomputeIndentation: (lineAdded) => { + recomputeIndentation: lineAdded => { if (node.parent && SmartIndenter.shouldIndentChildNode(node.parent.kind, node.kind)) { if (lineAdded) { indentation += options.IndentSize; @@ -311,6 +350,7 @@ module ts.formatting { else { indentation -= options.IndentSize; } + if (SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown)) { delta = options.IndentSize; } @@ -340,43 +380,48 @@ module ts.formatting { var listEndToken = getCloseTokenForOpenToken(listStartToken); var listIndentation = nodeIndentation; + var startLine = nodeStartLine; if (listStartToken !== SyntaxKind.Unknown) { - // try to consume open token + // introduce a new indentation scope for lists (including list start and end tokens) while (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > nodes.pos) { break; } else if (tokenInfo.token.kind === listStartToken) { - var tokenStartLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; - var indentation = computeIndentation(tokenInfo.token, tokenStartLine, Constants.Unknown, node, nodeIndentation, tokenStartLine); + // consume list start token + startLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; + var indentation = + computeIndentation(tokenInfo.token, startLine, Constants.Unknown, node, nodeIndentation, startLine); + listIndentation = getDynamicIndentation(node, nodeStartLine, indentation.indentation, indentation.delta); consumeTokenAndAdvanceScanner(tokenInfo, node, listIndentation); } else { + // consume any tokens that precede the list as child elements of 'node' using its indentation scope consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); } } } var inheritedIndentation = Constants.Unknown; - var effectiveStartLine = tokenStartLine || nodeStartLine; for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, listIndentation, effectiveStartLine, /*isListElement*/ true) + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, listIndentation, startLine, /*isListElement*/ true) } if (listEndToken !== SyntaxKind.Unknown) { if (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.kind === listEndToken) { + // consume list end token consumeTokenAndAdvanceScanner(tokenInfo, node, listIndentation); } } } }); - // this eats up last tokens in the node + // proceed any tokens in the node that are located after child nodes while (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > node.end) { @@ -389,7 +434,7 @@ module ts.formatting { child: Node, inheritedIndentation: number, nodeIndentation: DynamicIndentation, - effectiveParentStartLine: number, + parentStartLine: number, isListItem: boolean): number { var childStartPos = child.getStart(sourceFile); @@ -397,13 +442,14 @@ module ts.formatting { var childStart = sourceFile.getLineAndCharacterFromPosition(childStartPos); var childIndentationAmount = isListItem - ? tryComputeIndentationForListItem(childStartPos, child.end, effectiveParentStartLine, originalRange, inheritedIndentation) + ? tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation) : Constants.Unknown; if (isListItem && childIndentationAmount !== Constants.Unknown) { inheritedIndentation = childIndentationAmount; } + // child node is outside the target range - do not dive inside if (!rangeOverlapsWithStartEnd(originalRange, child.pos, child.end)) { return inheritedIndentation; } @@ -413,6 +459,7 @@ module ts.formatting { } while (formattingScanner.isOnToken()) { + // proceed any parent tokens that are located prior to child.getStart() var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > childStartPos) { break; @@ -426,13 +473,14 @@ module ts.formatting { } if (isToken(child)) { + // if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); return inheritedIndentation; } - var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, nodeIndentation, effectiveParentStartLine); + var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, nodeIndentation, parentStartLine); processNode(child, childContextNode, childStart.line, childIndentation.indentation, childIndentation.delta); @@ -444,7 +492,8 @@ module ts.formatting { function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, indentation: DynamicIndentation): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); - lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); + var lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); + var indentToken = false; if (currentTokenInfo.leadingTrivia) { processTrivia(currentTokenInfo.leadingTrivia, parent, childContextNode, indentation); @@ -452,17 +501,17 @@ module ts.formatting { var lineAdded: boolean; var isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); - var indentToken: boolean = true; var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); if (isTokenInRange) { + // save prevStartLine since processRange will overwrite this value with current ones var prevStartLine = previousRangeStartLine; lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, childContextNode, indentation); if (lineAdded !== undefined) { indentToken = lineAdded; } else { - indentToken = tokenStart.line !== prevStartLine; + indentToken = lastTriviaWasNewLine && tokenStart.line !== prevStartLine; } } @@ -470,7 +519,7 @@ module ts.formatting { processTrivia(currentTokenInfo.trailingTrivia, parent, childContextNode, indentation); } - if (lastTriviaWasNewLine && indentToken) { + if (indentToken) { var indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { @@ -482,12 +531,14 @@ module ts.formatting { var triviaStartLine = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos).line; switch (triviaItem.kind) { case SyntaxKind.MultiLineCommentTrivia: - indentMultilineComment(triviaItem, indentation.getIndentationForComment(currentTokenInfo.token.kind), /*firstLineIsIndented*/ !indentNextTokenOrTrivia); + var commentIndentation = indentation.getIndentationForComment(currentTokenInfo.token.kind); + indentMultilineComment(triviaItem, commentIndentation, /*firstLineIsIndented*/ !indentNextTokenOrTrivia); indentNextTokenOrTrivia = false; break; case SyntaxKind.SingleLineCommentTrivia: if (indentNextTokenOrTrivia) { - insertIndentation(triviaItem.pos, indentation.getIndentationForComment(currentTokenInfo.token.kind), /*lineAdded*/ false); + var commentIndentation = indentation.getIndentationForComment(currentTokenInfo.token.kind); + insertIndentation(triviaItem.pos, commentIndentation, /*lineAdded*/ false); indentNextTokenOrTrivia = false; } break; @@ -498,8 +549,10 @@ module ts.formatting { } } + // indent token only if is it is in target range and does not overlap with any error ranges if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { - insertIndentation(currentTokenInfo.token.pos, indentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind), lineAdded); + var tokenIndentation = indentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind); + insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAdded); } } @@ -529,7 +582,8 @@ module ts.formatting { trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); } else { - lineAdded = processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, indentation) + lineAdded = + processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, indentation) } } @@ -562,7 +616,6 @@ module ts.formatting { if (rule.Operation.Action & (RuleAction.Space | RuleAction.Delete) && currentStartLine !== previousStartLine) { // Handle the case where the next line is moved to be the end of this line. // In this case we don't indent the next line in the next pass. - lastTriviaWasNewLine = false; if (currentParent.getStart(sourceFile) === currentItem.pos) { lineAdded = false; } @@ -571,7 +624,6 @@ module ts.formatting { // Handle the case where token2 is moved to the new line. // In this case we indent token2 in the next pass but we set // sameLineIndent flag to notify the indenter that the indentation is within the line. - lastTriviaWasNewLine = true; if (currentParent.getStart(sourceFile) === currentItem.pos) { lineAdded = true; } @@ -601,13 +653,15 @@ module ts.formatting { function insertIndentation(pos: number, indentation: number, lineAdded: boolean): void { var indentationString = getIndentationString(indentation, options); if (lineAdded) { + // new line is added before the token by the formatting rules + // insert indentation string at the very beginning of the token recordReplace(pos, 0, indentationString); } else { - var tokenRange = sourceFile.getLineAndCharacterFromPosition(pos); - if (indentation !== tokenRange.character - 1) { - var startLinePosition = getStartPositionOfLine(tokenRange.line, sourceFile); - recordReplace(startLinePosition, tokenRange.character - 1, indentationString); + var tokenStart = sourceFile.getLineAndCharacterFromPosition(pos); + if (indentation !== tokenStart.character - 1) { + var startLinePosition = getStartPositionOfLine(tokenStart.line, sourceFile); + recordReplace(startLinePosition, tokenStart.character - 1, indentationString); } } } @@ -799,8 +853,8 @@ module ts.formatting { return SyntaxKind.Unknown; } - function getCloseTokenForOpenToken(k: SyntaxKind) { - switch (k) { + function getCloseTokenForOpenToken(kind: SyntaxKind) { + switch (kind) { case SyntaxKind.OpenParenToken: return SyntaxKind.CloseParenToken; case SyntaxKind.LessThanToken: diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index ed7b84dd4bb..d774e34da41 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -1,7 +1,7 @@ /// module ts.formatting { - var scanner = createScanner(ScriptTarget.ES5, /*skipTrivia*/ false); + var scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false); export interface FormattingScanner { advance(): void; @@ -64,7 +64,8 @@ module ts.formatting { var t: SyntaxKind; var pos = scanner.getStartPos(); - + + // Read leading trivia and token while (pos < endPos) { var t = scanner.getToken(); if (!isTrivia(t)) { @@ -116,14 +117,16 @@ module ts.formatting { function readTokenInfo(n: Node): TokenInfo { if (!isOnToken()) { + // scanner is not on the token (either advance was not called yet or scanner is already past the end position) return { leadingTrivia: leadingTrivia, trailingTrivia: undefined, token: undefined }; - } + // normally scanner returns the smallest available token + // check the kind of context node to determine if scanner should have more greedy behavior and consume more text. var expectedScanAction = shouldRescanGreaterThanToken(n) ? ScanAction.RescanGreaterThanToken @@ -132,10 +135,14 @@ module ts.formatting { : ScanAction.Scan if (lastTokenInfo && expectedScanAction === lastScanAction) { + // readTokenInfo was called before with the same expected scan action. + // No need to re-scan text, return existing 'lastTokenInfo' return lastTokenInfo; } if (scanner.getStartPos() !== savedPos) { + Debug.assert(lastTokenInfo !== undefined); + // readTokenInfo was called before but scan action differs - rescan text scanner.setTextPos(savedPos); scanner.scan(); } @@ -162,6 +169,7 @@ module ts.formatting { kind: currentToken } + // consume trailing trivia while(scanner.getStartPos() < endPos) { currentToken = scanner.scan(); if (!isTrivia(currentToken)) { From e9122b4d85f1f7546cd2e793203fd9504fdb006c Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 10 Nov 2014 10:51:08 -0800 Subject: [PATCH 072/154] Fix get type from short-hand property assignment --- src/compiler/checker.ts | 7 +++++++ src/compiler/parser.ts | 1 + src/services/services.ts | 5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5bd2e1f8ec8..36be5f8001e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1665,6 +1665,13 @@ module ts { } return type; } + + // If it is a short-hand property assignment; Use the type of the identifier + if (declaration.kind === SyntaxKind.ShortHandPropertyAssignment) { + var type = checkIdentifier((declaration.name)); + return type + } + // Rest parameters default to type any[], other parameters default to type any var type = declaration.flags & NodeFlags.Rest ? createArrayType(anyType) : anyType; checkImplicitAny(type); diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 75ff2993609..2657fc83668 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -574,6 +574,7 @@ module ts { case SyntaxKind.VariableDeclaration: case SyntaxKind.Property: case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShortHandPropertyAssignment: case SyntaxKind.EnumMember: case SyntaxKind.Method: case SyntaxKind.FunctionDeclaration: diff --git a/src/services/services.ts b/src/services/services.ts index d6465084fa4..916c468ea3d 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1969,7 +1969,7 @@ module ts { /** Returns true if node is a name of an object literal property, e.g. "a" in x = { "a": 1 } */ function isNameOfPropertyAssignment(node: Node): boolean { return (node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NumericLiteral) && - node.parent.kind === SyntaxKind.PropertyAssignment && (node.parent).name === node; + (node.parent.kind === SyntaxKind.PropertyAssignment || node.parent.kind === SyntaxKind.ShortHandPropertyAssignment) && (node.parent).name === node; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node: Node): boolean { @@ -2648,7 +2648,7 @@ module ts { var existingMemberNames: Map = {}; forEach(existingMembers, m => { - if (m.kind !== SyntaxKind.PropertyAssignment) { + if (m.kind !== SyntaxKind.PropertyAssignment && m.kind !== SyntaxKind.ShortHandPropertyAssignment) { // Ignore omitted expressions for missing members in the object literal return; } @@ -4569,6 +4569,7 @@ module ts { case SyntaxKind.VariableDeclaration: case SyntaxKind.Property: case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShortHandPropertyAssignment: case SyntaxKind.EnumMember: case SyntaxKind.Method: case SyntaxKind.Constructor: From 8960ab97129d8f135131f8351e55ead70a5f0b6b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 10 Nov 2014 13:30:00 -0800 Subject: [PATCH 073/154] addressed CR feedback, added comments, dropped unused code --- src/compiler/types.ts | 8 +++++++ src/services/formatting.ts | 39 +++++++++++++++++++++++++++++------ src/services/services.ts | 31 +--------------------------- src/services/smartIndenter.ts | 2 +- 4 files changed, 43 insertions(+), 37 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c69944f88a7..c30afb9360a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1124,7 +1124,15 @@ module ts { messageText: string; category: DiagnosticCategory; code: number; + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ isEarly?: boolean; + /** + * Parse error - error produced by parser when it scanner returns a token + * that parser does not understand in its current state + * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) + */ isParseError?: boolean; } diff --git a/src/services/formatting.ts b/src/services/formatting.ts index f4acd193b02..7b689544724 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -26,13 +26,24 @@ module ts.formatting { * { var x; * } * Normally indentation is applied only to the first token in line so at glance 'var' should not be touched. - * However if some format rule removes new line between ')' and '{' 'var' will become + * However if some format rule adds new line between '}' and 'var' 'var' will become * the first token in line so it should be indented */ interface DynamicIndentation { getIndentationForToken(tokenLine: number, tokenKind: SyntaxKind): number; getIndentationForComment(owningToken: SyntaxKind): number; + /** + * Indentation for open and close tokens of the node if it is block or another node that needs special indentation + * ... { + * ......... + * ....} + * ____ - indentation + * ____ - delta + **/ getIndentation(): number; + /** + * Prefered relative indentation for child nodes + */ getDelta(): number; recomputeIndentation(lineAddedByFormatting: boolean): void; } @@ -99,6 +110,14 @@ module ts.formatting { } // walk up and search for the parent node that ends at the same position with precedingToken. + // for cases like this + // + // var x = 1; + // while (true) { + // } + // after typing close curly in while statement we want to reformat just the while statement. + // However if we just walk upwards searching for the parent that has the same end value - + // we'll end up with the whole source file. isListElement allows to stop on the list element level var current = precedingToken; while (current && current.parent && @@ -138,7 +157,14 @@ module ts.formatting { function find(n: Node): Node { var candidate = forEachChild(n, c => startEndContainsRange(c.getStart(sourceFile), c.end, range) && c); - return (candidate && find(candidate)) || n; + if (candidate) { + var result = find(candidate); + if (result) { + return result; + } + } + + return n; } } @@ -230,9 +256,11 @@ module ts.formatting { // local functions /** Tries to compute the indentation for a list element. - * If list element is not in range then function will pick its actual indentation + * If list element is not in range then + * function will pick its actual indentation * so it can be pushed downstream as inherited indentation. - * If list element is in the range - its indentation will be equal to inherited indentation from its predecessors. + * If list element is in the range - its indentation will be equal + * to inherited indentation from its predecessors. */ function tryComputeIndentationForListItem(startPos: number, endPos: number, @@ -440,8 +468,7 @@ module ts.formatting { var childStartPos = child.getStart(sourceFile); var childStart = sourceFile.getLineAndCharacterFromPosition(childStartPos); - var childIndentationAmount = - isListItem + var childIndentationAmount = isListItem ? tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation) : Constants.Unknown; diff --git a/src/services/services.ts b/src/services/services.ts index ac2e9fec42e..292b7dc8780 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -959,15 +959,6 @@ module ts { ConvertTabsToSpaces: boolean; } - export function copyEditorOptions(o: EditorOptions): EditorOptions { - return { - IndentSize: o.IndentSize, - TabSize: o.TabSize, - NewLineCharacter: o.NewLineCharacter, - ConvertTabsToSpaces: o.ConvertTabsToSpaces - }; - } - export interface FormatCodeOptions extends EditorOptions { InsertSpaceAfterCommaDelimiter: boolean; InsertSpaceAfterSemicolonInForStatements: boolean; @@ -979,23 +970,6 @@ module ts { PlaceOpenBraceOnNewLineForControlBlocks: boolean; } - export function copyFormatCodeOptions(o: FormatCodeOptions): FormatCodeOptions { - return { - IndentSize: o.IndentSize, - TabSize: o.TabSize, - NewLineCharacter: o.NewLineCharacter, - ConvertTabsToSpaces: o.ConvertTabsToSpaces, - InsertSpaceAfterCommaDelimiter: o.InsertSpaceAfterCommaDelimiter, - InsertSpaceAfterSemicolonInForStatements: o.InsertSpaceAfterSemicolonInForStatements, - InsertSpaceBeforeAndAfterBinaryOperators: o.InsertSpaceBeforeAndAfterBinaryOperators, - InsertSpaceAfterKeywordsInControlFlowStatements: o.InsertSpaceAfterKeywordsInControlFlowStatements, - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: o.InsertSpaceAfterFunctionKeywordForAnonymousFunctions, - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: o.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis, - PlaceOpenBraceOnNewLineForFunctions: o.PlaceOpenBraceOnNewLineForFunctions, - PlaceOpenBraceOnNewLineForControlBlocks: o.PlaceOpenBraceOnNewLineForControlBlocks - }; - } - export interface DefinitionInfo { fileName: string; textSpan: TypeScript.TextSpan; @@ -5224,7 +5198,7 @@ module ts { var start = new Date().getTime(); - var result = formatting.SmartIndenter.getIndentation(position, sourceFile, copyEditorOptions(editorOptions)); + var result = formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); host.log("getIndentationAtPosition: computeIndentation : " + (new Date().getTime() - start)); return result; @@ -5232,7 +5206,6 @@ module ts { function getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[] { fileName = switchToForwardSlashes(fileName); - var options = copyFormatCodeOptions(options); var sourceFile = getCurrentSourceFile(fileName); return formatting.formatSelection(start, end, sourceFile, getRuleProvider(options), options); } @@ -5241,7 +5214,6 @@ module ts { fileName = switchToForwardSlashes(fileName); var sourceFile = getCurrentSourceFile(fileName); - var options = copyFormatCodeOptions(options) return formatting.formatDocument(sourceFile, getRuleProvider(options), options); } @@ -5249,7 +5221,6 @@ module ts { fileName = switchToForwardSlashes(fileName); var sourceFile = getCurrentSourceFile(fileName); - var options = copyFormatCodeOptions(options); if (key === "}") { return formatting.formatOnClosingCurly(position, sourceFile, getRuleProvider(options), options); diff --git a/src/services/smartIndenter.ts b/src/services/smartIndenter.ts index 97539b12a03..8e3208c21e5 100644 --- a/src/services/smartIndenter.ts +++ b/src/services/smartIndenter.ts @@ -298,7 +298,7 @@ module ts.formatting { return column; } - export function nodeContentIsAlwaysIndented(kind: SyntaxKind): boolean { + function nodeContentIsAlwaysIndented(kind: SyntaxKind): boolean { switch (kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: From 0e5d7aad6808d7f1ae8ca6deb657cb366d8b4354 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 10 Nov 2014 14:42:06 -0800 Subject: [PATCH 074/154] code cleanup: removed unused code --- src/services/formatting.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/services/formatting.ts b/src/services/formatting.ts index 7b689544724..7b78c16a689 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -297,7 +297,6 @@ module ts.formatting { var delta = 0; if (indentation === Constants.Unknown) { if (isSomeBlock(node.kind)) { - delta = options.IndentSize; // blocks should be indented in // - other blocks // - source file From 7e39622d5d8d552bb9c541819eb60a72eab2fde4 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 10 Nov 2014 14:55:41 -0800 Subject: [PATCH 075/154] Basic implementation for finding all references --- src/compiler/checker.ts | 7 ++++++- src/compiler/types.ts | 1 + src/services/services.ts | 3 +++ .../reference/incompleteObjectLiteral1.errors.txt | 9 ++++++--- .../objectTypesWithOptionalProperties.errors.txt | 11 ++++------- tests/baselines/reference/parser512097.errors.txt | 9 ++++++--- .../parserErrorRecovery_ObjectLiteral2.errors.txt | 9 ++++++--- 7 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 36be5f8001e..4ebcb925a7e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -110,7 +110,8 @@ module ts { getAliasedSymbol: resolveImport, isUndefinedSymbol: symbol => symbol === undefinedSymbol, isArgumentsSymbol: symbol => symbol === argumentsSymbol, - hasEarlyErrors: hasEarlyErrors + hasEarlyErrors: hasEarlyErrors, + resolveEntityNameForShortHandPropertyAssignment: resolveEntityNameForShortHandPropertyAssignment, }; var undefinedSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "undefined"); @@ -537,6 +538,10 @@ module ts { return symbol.flags & meaning ? symbol : resolveImport(symbol); } + function resolveEntityNameForShortHandPropertyAssignment(location: Node): Symbol { + return resolveEntityName(location, location, SymbolFlags.Value); + } + function isExternalModuleNameRelative(moduleName: string): boolean { // TypeScript 1.0 spec (April 2014): 11.2.1 // An external module name is "relative" if the first term is "." or "..". diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 51b93821d69..8e392de8ff5 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -733,6 +733,7 @@ module ts { getEnumMemberValue(node: EnumMember): number; isValidPropertyAccess(node: PropertyAccess, propertyName: string): boolean; getAliasedSymbol(symbol: Symbol): Symbol; + resolveEntityNameForShortHandPropertyAssignment(location: Node): Symbol; } export interface SymbolDisplayBuilder { diff --git a/src/services/services.ts b/src/services/services.ts index 916c468ea3d..a85824f873b 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -4227,6 +4227,9 @@ module ts { forEach(getPropertySymbolsFromContextualType(location), contextualSymbol => { result.push.apply(result, typeInfoResolver.getRootSymbols(contextualSymbol)); }); + if (location.kind === SyntaxKind.Identifier && location.parent.kind === SyntaxKind.ShortHandPropertyAssignment) { + result.push(typeInfoResolver.resolveEntityNameForShortHandPropertyAssignment(location)); + } } // If this is a union property, add all the symbols from all its source symbols in all unioned types. diff --git a/tests/baselines/reference/incompleteObjectLiteral1.errors.txt b/tests/baselines/reference/incompleteObjectLiteral1.errors.txt index 2e363de591e..c37f308960a 100644 --- a/tests/baselines/reference/incompleteObjectLiteral1.errors.txt +++ b/tests/baselines/reference/incompleteObjectLiteral1.errors.txt @@ -1,11 +1,14 @@ -tests/cases/compiler/incompleteObjectLiteral1.ts(1,14): error TS1005: ':' expected. +tests/cases/compiler/incompleteObjectLiteral1.ts(1,14): error TS1005: ',' expected. tests/cases/compiler/incompleteObjectLiteral1.ts(1,16): error TS1128: Declaration or statement expected. +tests/cases/compiler/incompleteObjectLiteral1.ts(1,12): error TS2304: Cannot find name 'aa'. -==== tests/cases/compiler/incompleteObjectLiteral1.ts (2 errors) ==== +==== tests/cases/compiler/incompleteObjectLiteral1.ts (3 errors) ==== var tt = { aa; } ~ -!!! error TS1005: ':' expected. +!!! error TS1005: ',' expected. ~ !!! error TS1128: Declaration or statement expected. + ~~ +!!! error TS2304: Cannot find name 'aa'. var x = tt; \ No newline at end of file diff --git a/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt b/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt index 0622b7badb0..35593f4378f 100644 --- a/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt +++ b/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt @@ -1,10 +1,9 @@ tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(12,6): error TS1112: A class member cannot be declared optional. tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(20,6): error TS1112: A class member cannot be declared optional. -tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(24,6): error TS1005: ':' expected. -tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(24,7): error TS1109: Expression expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(24,6): error TS1159: A object member cannot be declared optional. -==== tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts (4 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts (3 errors) ==== // Basic uses of optional properties var a: { @@ -33,8 +32,6 @@ tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWith var b = { x?: 1 // error - ~ -!!! error TS1005: ':' expected. - ~ -!!! error TS1109: Expression expected. + +!!! error TS1159: A object member cannot be declared optional. } \ No newline at end of file diff --git a/tests/baselines/reference/parser512097.errors.txt b/tests/baselines/reference/parser512097.errors.txt index 3963d969c34..181060db95d 100644 --- a/tests/baselines/reference/parser512097.errors.txt +++ b/tests/baselines/reference/parser512097.errors.txt @@ -1,13 +1,16 @@ -tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts(1,14): error TS1005: ':' expected. +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts(1,14): error TS1005: ',' expected. tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts(1,16): error TS1128: Declaration or statement expected. +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts(1,12): error TS2304: Cannot find name 'aa'. -==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts (3 errors) ==== var tt = { aa; } // After this point, no useful parsing occurs in the entire file ~ -!!! error TS1005: ':' expected. +!!! error TS1005: ',' expected. ~ !!! error TS1128: Declaration or statement expected. + ~~ +!!! error TS2304: Cannot find name 'aa'. if (true) { } \ No newline at end of file diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.errors.txt b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.errors.txt index 55667d42de5..1c526f0c9ec 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.errors.txt +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.errors.txt @@ -1,11 +1,14 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts(2,1): error TS1005: ':' expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts(2,1): error TS1005: ',' expected. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts(2,7): error TS1005: ':' expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts(1,11): error TS2304: Cannot find name 'a'. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts (3 errors) ==== var v = { a + ~ +!!! error TS2304: Cannot find name 'a'. return; ~~~~~~ -!!! error TS1005: ':' expected. +!!! error TS1005: ',' expected. ~ !!! error TS1005: ':' expected. \ No newline at end of file From d6769ae090954ad07c286165d9e28830c332aae0 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 10 Nov 2014 16:33:53 -0800 Subject: [PATCH 076/154] make smart indenter respect actual start line of the list --- src/services/smartIndenter.ts | 80 +++++++++++-------- .../fourslash/smartIndentStartLineInLists.ts | 8 ++ 2 files changed, 54 insertions(+), 34 deletions(-) create mode 100644 tests/cases/fourslash/smartIndentStartLineInLists.ts diff --git a/src/services/smartIndenter.ts b/src/services/smartIndenter.ts index 8e3208c21e5..7a56ea07be3 100644 --- a/src/services/smartIndenter.ts +++ b/src/services/smartIndenter.ts @@ -13,8 +13,8 @@ module ts.formatting { } // no indentation in string \regex literals - if ((precedingToken.kind === SyntaxKind.StringLiteral || precedingToken.kind === SyntaxKind.RegularExpressionLiteral) && - precedingToken.getStart(sourceFile) <= position && + if ((precedingToken.kind === SyntaxKind.StringLiteral || precedingToken.kind === SyntaxKind.RegularExpressionLiteral) && + precedingToken.getStart(sourceFile) <= position && precedingToken.end > position) { return 0; } @@ -59,7 +59,7 @@ module ts.formatting { previous = current; current = current.parent; } - + if (!current) { // no parent was found - return 0 to be indented on the level of SourceFile return 0; @@ -100,9 +100,9 @@ module ts.formatting { return actualIndentation + indentationDelta; } } - parentStart = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); - var parentAndChildShareLine = - parentStart.line === currentStart.line || + parentStart = getParentStart(parent, current, sourceFile); + var parentAndChildShareLine = + parentStart.line === currentStart.line || childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); if (useActualIndentation) { @@ -127,9 +127,18 @@ module ts.formatting { } + function getParentStart(parent: Node, child: Node, sourceFile: SourceFile): LineAndCharacter { + var containingList = getContainingList(child, sourceFile); + if (containingList) { + return sourceFile.getLineAndCharacterFromPosition(containingList.pos); + } + + return sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); + } + /* * Function returns -1 if indentation cannot be determined - */ + */ function getActualIndentationForListItemBeforeComma(commaToken: Node, sourceFile: SourceFile, options: EditorOptions): number { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it var commaItemInfo = findListItemInfo(commaToken); @@ -141,20 +150,20 @@ module ts.formatting { /* * Function returns -1 if actual indentation for node should not be used (i.e because node is nested expression) */ - function getActualIndentationForNode(current: Node, - parent: Node, - currentLineAndChar: LineAndCharacter, - parentAndChildShareLine: boolean, - sourceFile: SourceFile, - options: EditorOptions): number { + function getActualIndentationForNode(current: Node, + parent: Node, + currentLineAndChar: LineAndCharacter, + parentAndChildShareLine: boolean, + sourceFile: SourceFile, + options: EditorOptions): number { // actual indentation is used for statements\declarations if one of cases below is true: // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually // - parent and child are not on the same line - var useActualIndentation = + var useActualIndentation = (isDeclaration(current) || isStatement(current)) && (parent.kind === SyntaxKind.SourceFile || !parentAndChildShareLine); - + if (!useActualIndentation) { return -1; } @@ -167,7 +176,7 @@ module ts.formatting { if (!nextToken) { return false; } - + if (nextToken.kind === SyntaxKind.OpenBraceToken) { // open braces are always indented at the parent level return true; @@ -202,27 +211,25 @@ module ts.formatting { var elseKeyword = findChildOfKind(parent, SyntaxKind.ElseKeyword, sourceFile); Debug.assert(elseKeyword !== undefined); - var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; + var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; } return false; } - function getActualIndentationForListItem(node: Node, sourceFile: SourceFile, options: EditorOptions): number { + function getContainingList(node: Node, sourceFile: SourceFile): NodeArray { if (node.parent) { switch (node.parent.kind) { case SyntaxKind.TypeReference: if ((node.parent).typeArguments) { - return getActualIndentationFromList((node.parent).typeArguments); + return (node.parent).typeArguments; } break; case SyntaxKind.ObjectLiteral: - return getActualIndentationFromList((node.parent).properties); - //case SyntaxKind.TypeLiteral: - // return getActualIndentationFromList((node.parent).members); + return (node.parent).properties; case SyntaxKind.ArrayLiteral: - return getActualIndentationFromList((node.parent).elements); + return (node.parent).elements; case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: case SyntaxKind.ArrowFunction: @@ -230,21 +237,26 @@ module ts.formatting { case SyntaxKind.CallSignature: case SyntaxKind.ConstructSignature: if ((node.parent).typeParameters && node.end < (node.parent).typeParameters.end) { - return getActualIndentationFromList((node.parent).typeParameters); + return (node.parent).typeParameters; } - - return getActualIndentationFromList((node.parent).parameters); + + return (node.parent).parameters; case SyntaxKind.NewExpression: case SyntaxKind.CallExpression: if ((node.parent).typeArguments && node.end < (node.parent).typeArguments.end) { - return getActualIndentationFromList((node.parent).typeArguments); + return (node.parent).typeArguments; } - - return getActualIndentationFromList((node.parent).arguments); + + return (node.parent).arguments; } } - return -1; + return undefined; + } + + function getActualIndentationForListItem(node: Node, sourceFile: SourceFile, options: EditorOptions): number { + var containingList = getContainingList(node, sourceFile); + return containingList ? getActualIndentationFromList(containingList) : -1; function getActualIndentationFromList(list: Node[]): number { var index = indexOf(list, node); @@ -259,7 +271,7 @@ module ts.formatting { // walk toward the start of the list starting from current node and check if the line is the same for all items. // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] - var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); + var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); for (var i = index - 1; i >= 0; --i) { if (list[i].kind === SyntaxKind.CommaToken) { continue; @@ -401,7 +413,7 @@ module ts.formatting { if ((n).elseStatement) { return isCompletedNode((n).elseStatement, sourceFile); } - return isCompletedNode((n).thenStatement, sourceFile); + return isCompletedNode((n).thenStatement, sourceFile); case SyntaxKind.ExpressionStatement: return isCompletedNode((n).expression, sourceFile); case SyntaxKind.ArrayLiteral: @@ -417,10 +429,10 @@ module ts.formatting { case SyntaxKind.DoStatement: // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; var hasWhileKeyword = findChildOfKind(n, SyntaxKind.WhileKeyword, sourceFile); - if(hasWhileKeyword) { + if (hasWhileKeyword) { return nodeEndsWith(n, SyntaxKind.CloseParenToken, sourceFile); } - return isCompletedNode((n).statement, sourceFile); + return isCompletedNode((n).statement, sourceFile); default: return true; } diff --git a/tests/cases/fourslash/smartIndentStartLineInLists.ts b/tests/cases/fourslash/smartIndentStartLineInLists.ts new file mode 100644 index 00000000000..0150881ff34 --- /dev/null +++ b/tests/cases/fourslash/smartIndentStartLineInLists.ts @@ -0,0 +1,8 @@ +/// +////foo(function () { +////}).then(function () {/*1*/ +////}) + +goTo.marker("1"); +edit.insert("\r\n"); +verify.indentationIs(4); \ No newline at end of file From 068e58965beb12da9226c50757101d251c1cba1b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 10 Nov 2014 17:16:28 -0800 Subject: [PATCH 077/154] code cleanup: add more comments, rename methods --- src/services/formatting.ts | 92 ++++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 39 deletions(-) diff --git a/src/services/formatting.ts b/src/services/formatting.ts index 7b78c16a689..6aacb78d445 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -42,7 +42,16 @@ module ts.formatting { **/ getIndentation(): number; /** - * Prefered relative indentation for child nodes + * Prefered relative indentation for child nodes. + * Delta is used to carry the indentation info + * foo(bar({ + * $ + * })) + * Both 'foo', 'bar' introduce new indentation with delta = 4, but total indentation in $ is not 8. + * foo: { indentation: 0, delta: 4 } + * bar: { indentation: foo.indentation + foo.delta = 4, delta: 4} however 'foo' and 'bar' are on the same line + * so bar inherits indentation from foo and bar.delta will be 4 + * */ getDelta(): number; recomputeIndentation(lineAddedByFormatting: boolean): void; @@ -290,11 +299,10 @@ module ts.formatting { startLine: number, inheritedIndentation: number, parent: Node, - parentIndentation: DynamicIndentation, + parentDynamicIndentation: DynamicIndentation, effectiveParentStartLine: number): Indentation { var indentation = inheritedIndentation; - var delta = 0; if (indentation === Constants.Unknown) { if (isSomeBlock(node.kind)) { // blocks should be indented in @@ -306,32 +314,30 @@ module ts.formatting { parent.kind === SyntaxKind.CaseClause || parent.kind === SyntaxKind.DefaultClause) { - indentation = parentIndentation.getIndentation() + parentIndentation.getDelta(); + indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); } else { - indentation = parentIndentation.getIndentation(); + indentation = parentDynamicIndentation.getIndentation(); } } else { if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { - indentation = parentIndentation.getIndentation(); + indentation = parentDynamicIndentation.getIndentation(); } else { - indentation = parentIndentation.getIndentation() + parentIndentation.getDelta(); + indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); } } } - if (SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown)) { - delta = options.IndentSize; - } + var delta = SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown) ? options.IndentSize : 0; if (effectiveParentStartLine === startLine) { // if node is located on the same line with the parent // - inherit indentation from the parent // - push children if either parent of node itself has non-zero delta - indentation = parentIndentation.getIndentation(); - delta = Math.min(options.IndentSize, parentIndentation.getDelta() + delta); + indentation = parentDynamicIndentation.getIndentation(); + delta = Math.min(options.IndentSize, parentDynamicIndentation.getDelta() + delta); } return { indentation: indentation, @@ -394,19 +400,22 @@ module ts.formatting { return; } - var nodeIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta); + var nodeDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta); var childContextNode = contextNode; + + // if there are any tokens that logically belong to node and interleave child nodes + // such tokens will be consumed in processChildNode for for the child that follows them forEachChild( node, child => { - processChildNode(child, Constants.Unknown, nodeIndentation, nodeStartLine, /*isListElement*/ false) + processChildNode(child, /*inheritedIndentation*/ Constants.Unknown, nodeDynamicIndentation, nodeStartLine, /*isListElement*/ false) }, (nodes: NodeArray) => { var listStartToken = getOpenTokenForList(node, nodes); var listEndToken = getCloseTokenForOpenToken(listStartToken); - var listIndentation = nodeIndentation; + var listDynamicIndentation = nodeDynamicIndentation; var startLine = nodeStartLine; if (listStartToken !== SyntaxKind.Unknown) { @@ -420,21 +429,21 @@ module ts.formatting { // consume list start token startLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; var indentation = - computeIndentation(tokenInfo.token, startLine, Constants.Unknown, node, nodeIndentation, startLine); + computeIndentation(tokenInfo.token, startLine, Constants.Unknown, node, nodeDynamicIndentation, startLine); - listIndentation = getDynamicIndentation(node, nodeStartLine, indentation.indentation, indentation.delta); - consumeTokenAndAdvanceScanner(tokenInfo, node, listIndentation); + listDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation.indentation, indentation.delta); + consumeTokenAndAdvanceScanner(tokenInfo, node, listDynamicIndentation); } else { // consume any tokens that precede the list as child elements of 'node' using its indentation scope - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); } } } var inheritedIndentation = Constants.Unknown; for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, listIndentation, startLine, /*isListElement*/ true) + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, listDynamicIndentation, startLine, /*isListElement*/ true) } if (listEndToken !== SyntaxKind.Unknown) { @@ -442,7 +451,7 @@ module ts.formatting { var tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.kind === listEndToken) { // consume list end token - consumeTokenAndAdvanceScanner(tokenInfo, node, listIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, listDynamicIndentation); } } } @@ -454,13 +463,13 @@ module ts.formatting { if (tokenInfo.token.end > node.end) { break; } - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); } function processChildNode( child: Node, inheritedIndentation: number, - nodeIndentation: DynamicIndentation, + nodeDynamicIndentation: DynamicIndentation, parentStartLine: number, isListItem: boolean): number { @@ -491,7 +500,7 @@ module ts.formatting { break; } - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); } if (!formattingScanner.isOnToken()) { @@ -502,11 +511,11 @@ module ts.formatting { // if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); return inheritedIndentation; } - var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, nodeIndentation, parentStartLine); + var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, nodeDynamicIndentation, parentStartLine); processNode(child, childContextNode, childStart.line, childIndentation.indentation, childIndentation.delta); @@ -515,14 +524,14 @@ module ts.formatting { return inheritedIndentation; } - function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, indentation: DynamicIndentation): void { + function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, dynamicIndentation: DynamicIndentation): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); var lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); var indentToken = false; if (currentTokenInfo.leadingTrivia) { - processTrivia(currentTokenInfo.leadingTrivia, parent, childContextNode, indentation); + processTrivia(currentTokenInfo.leadingTrivia, parent, childContextNode, dynamicIndentation); } var lineAdded: boolean; @@ -532,7 +541,7 @@ module ts.formatting { if (isTokenInRange) { // save prevStartLine since processRange will overwrite this value with current ones var prevStartLine = previousRangeStartLine; - lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, childContextNode, indentation); + lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, childContextNode, dynamicIndentation); if (lineAdded !== undefined) { indentToken = lineAdded; } @@ -542,7 +551,7 @@ module ts.formatting { } if (currentTokenInfo.trailingTrivia) { - processTrivia(currentTokenInfo.trailingTrivia, parent, childContextNode, indentation); + processTrivia(currentTokenInfo.trailingTrivia, parent, childContextNode, dynamicIndentation); } if (indentToken) { @@ -557,13 +566,13 @@ module ts.formatting { var triviaStartLine = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos).line; switch (triviaItem.kind) { case SyntaxKind.MultiLineCommentTrivia: - var commentIndentation = indentation.getIndentationForComment(currentTokenInfo.token.kind); + var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); indentMultilineComment(triviaItem, commentIndentation, /*firstLineIsIndented*/ !indentNextTokenOrTrivia); indentNextTokenOrTrivia = false; break; case SyntaxKind.SingleLineCommentTrivia: if (indentNextTokenOrTrivia) { - var commentIndentation = indentation.getIndentationForComment(currentTokenInfo.token.kind); + var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); insertIndentation(triviaItem.pos, commentIndentation, /*lineAdded*/ false); indentNextTokenOrTrivia = false; } @@ -577,7 +586,7 @@ module ts.formatting { // indent token only if is it is in target range and does not overlap with any error ranges if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { - var tokenIndentation = indentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind); + var tokenIndentation = dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind); insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAdded); } } @@ -588,17 +597,22 @@ module ts.formatting { } } - function processTrivia(trivia: TextRangeWithKind[], parent: Node, contextNode: Node, indentation: DynamicIndentation): void { + function processTrivia(trivia: TextRangeWithKind[], parent: Node, contextNode: Node, dynamicIndentation: DynamicIndentation): void { for (var i = 0, len = trivia.length; i < len; ++i) { var triviaItem = trivia[i]; if (isComment(triviaItem.kind) && rangeContainsRange(originalRange, triviaItem)) { var triviaItemStart = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos); - processRange(triviaItem, triviaItemStart, parent, contextNode, indentation); + processRange(triviaItem, triviaItemStart, parent, contextNode, dynamicIndentation); } } } - function processRange(range: TextRangeWithKind, rangeStart: LineAndCharacter, parent: Node, contextNode: Node, indentation: DynamicIndentation): boolean { + function processRange(range: TextRangeWithKind, + rangeStart: LineAndCharacter, + parent: Node, + contextNode: Node, + dynamicIndentation: DynamicIndentation): boolean { + var rangeHasError = rangeContainsError(range); var lineAdded: boolean; if (!rangeHasError && !previousRangeHasError) { @@ -609,7 +623,7 @@ module ts.formatting { } else { lineAdded = - processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, indentation) + processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, dynamicIndentation) } } @@ -628,7 +642,7 @@ module ts.formatting { previousStartLine: number, previousParent: Node, contextNode: Node, - indentation: DynamicIndentation): boolean { + dynamicIndentation: DynamicIndentation): boolean { formattingContext.updateContext(previousItem, previousParent, currentItem, currentParent, contextNode); @@ -656,7 +670,7 @@ module ts.formatting { } if (lineAdded !== undefined) { - indentation.recomputeIndentation(lineAdded); + dynamicIndentation.recomputeIndentation(lineAdded); } // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line From 29497b893341353aafb0d12274c2d8c3cecf9402 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 10 Nov 2014 19:04:57 -0800 Subject: [PATCH 078/154] add comments, update fourslash tests --- src/services/formatting.ts | 32 +++++++++++++++++-- .../formattingAfterMultiLineIfCondition.ts | 2 +- .../multilineCommentBeforeOpenBrace.ts | 4 +-- .../semicolonFormattingNestedStatements.ts | 4 +-- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/services/formatting.ts b/src/services/formatting.ts index 6aacb78d445..df0555c3181 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -226,6 +226,21 @@ module ts.formatting { } } + /** + * Start of the original range might fall inside the comment - scanner will not yield appropriate results + * This function will look for token that is located before the start of target range + * and return its end as start position for the scanner. + */ + function getScanStartPosition(enclosingNode: Node, originalRange: TextRange, sourceFile: SourceFile): number { + var start = enclosingNode.getStart(sourceFile); + if (start === originalRange.pos && enclosingNode.end === originalRange.end) { + return start; + } + + var precedingToken = findPrecedingToken(enclosingNode.pos, sourceFile); + return precedingToken ? precedingToken.end : originalRange.pos; + } + function formatSpan(originalRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions, @@ -237,10 +252,11 @@ module ts.formatting { // formatting context is used by rules provider var formattingContext = new FormattingContext(sourceFile, requestKind); - var formattingScanner = getFormattingScanner(sourceFile, originalRange.pos, originalRange.end); - // find the smallest node that fully wraps the range and compute the initial indentation for the node var enclosingNode = findEnclosingNode(originalRange, sourceFile); + + var formattingScanner = getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end); + var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); var previousRangeHasError: boolean; @@ -402,6 +418,18 @@ module ts.formatting { var nodeDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta); + // a useful observations when tracking context node + // / + // [a] + // / | \ + // [b] [c] [d] + // node 'a' is a context node for nodes 'b', 'c', 'd' + // except for the leftmost leaf token in [b] - in this case context node ('e') is located somewhere above 'a' + // this rule can be applied recursively to child nodes of 'a'. + // + // context node is set to parent node value after processing every child node + // context node is set to parent of the token after processing every token + var childContextNode = contextNode; // if there are any tokens that logically belong to node and interleave child nodes diff --git a/tests/cases/fourslash/formattingAfterMultiLineIfCondition.ts b/tests/cases/fourslash/formattingAfterMultiLineIfCondition.ts index 843eea5155b..21812b0b2b3 100644 --- a/tests/cases/fourslash/formattingAfterMultiLineIfCondition.ts +++ b/tests/cases/fourslash/formattingAfterMultiLineIfCondition.ts @@ -11,4 +11,4 @@ goTo.marker(); edit.insert('}'); goTo.marker('comment'); // Comment below multi-line 'if' condition formatting -verify.currentLineContentIs(' // This is a comment'); \ No newline at end of file +verify.currentLineContentIs(' // This is a comment'); \ No newline at end of file diff --git a/tests/cases/fourslash/multilineCommentBeforeOpenBrace.ts b/tests/cases/fourslash/multilineCommentBeforeOpenBrace.ts index 792691d9418..63813c12288 100644 --- a/tests/cases/fourslash/multilineCommentBeforeOpenBrace.ts +++ b/tests/cases/fourslash/multilineCommentBeforeOpenBrace.ts @@ -11,8 +11,8 @@ debugger; format.document(); goTo.marker('1'); -verify.currentLineContentIs('function test() /* %^ */'); +verify.currentLineContentIs('function test() /* %^ */ {'); goTo.marker('2'); -verify.currentLineContentIs(' if (true) /* %^ */'); +verify.currentLineContentIs(' if (true) /* %^ */ {'); goTo.marker('3'); verify.currentLineContentIs('}'); \ No newline at end of file diff --git a/tests/cases/fourslash/semicolonFormattingNestedStatements.ts b/tests/cases/fourslash/semicolonFormattingNestedStatements.ts index 87cdebb3c9b..20d49a35f47 100644 --- a/tests/cases/fourslash/semicolonFormattingNestedStatements.ts +++ b/tests/cases/fourslash/semicolonFormattingNestedStatements.ts @@ -12,11 +12,11 @@ goTo.marker("innermost"); edit.insert(";"); // Adding smicolon should format the innermost statement -verify.currentLineContentIs(' var x = 0;'); +verify.currentLineContentIs(' var x = 0;'); // Also should format any parent statement that is terminated by the semicolon goTo.marker("directParent"); -verify.currentLineContentIs(' if (true)'); +verify.currentLineContentIs(' if (true)'); // But not parents that are not terminated by it goTo.marker("parentOutsideBlock"); From 1bf7ecac7a80caeac280ef94215cbcc36650bad6 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 11 Nov 2014 11:01:12 -0800 Subject: [PATCH 079/154] Find all reference for short-hand property assignment --- src/services/services.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/services/services.ts b/src/services/services.ts index a85824f873b..43b9e96b2ca 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -4061,6 +4061,14 @@ module ts { if (referenceSymbol && isRelatableToSearchSet(searchSymbols, referenceSymbol, referenceLocation)) { result.push(getReferenceEntryFromNode(referenceLocation)); } + // TODO (yuisu): Comment + else if (referenceSymbol && referenceSymbol.declarations[0].kind === SyntaxKind.ShortHandPropertyAssignment) { + var referenceSymbolDeclName = referenceSymbol.declarations[0].name; + if (searchSymbols.indexOf(typeInfoResolver.resolveEntityNameForShortHandPropertyAssignment(referenceSymbolDeclName)) >= 0 && + !(referenceSymbol).target) { + result.push(getReferenceEntryFromNode(referenceSymbolDeclName)); + } + } }); } @@ -4227,6 +4235,8 @@ module ts { forEach(getPropertySymbolsFromContextualType(location), contextualSymbol => { result.push.apply(result, typeInfoResolver.getRootSymbols(contextualSymbol)); }); + + // Add the symbol in the case of short-hand property assignment if (location.kind === SyntaxKind.Identifier && location.parent.kind === SyntaxKind.ShortHandPropertyAssignment) { result.push(typeInfoResolver.resolveEntityNameForShortHandPropertyAssignment(location)); } From 680999fe3f556c607f9d1f6dd5de8770e20a79de Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 11 Nov 2014 11:30:16 -0800 Subject: [PATCH 080/154] Move short-hand property tests to conformace folder --- .../objectLiteralShorthandProperties.ts | 19 ------------------- .../objectLiteralShorthandProperties2.ts | 18 ------------------ .../objectLiteralShorthandProperties3.ts | 13 ------------- .../objectLiteralShorthandProperties4.ts | 4 ---- 4 files changed, 54 deletions(-) delete mode 100644 tests/cases/compiler/objectLiteralShorthandProperties.ts delete mode 100644 tests/cases/compiler/objectLiteralShorthandProperties2.ts delete mode 100644 tests/cases/compiler/objectLiteralShorthandProperties3.ts delete mode 100644 tests/cases/compiler/objectLiteralShorthandProperties4.ts diff --git a/tests/cases/compiler/objectLiteralShorthandProperties.ts b/tests/cases/compiler/objectLiteralShorthandProperties.ts deleted file mode 100644 index 95b380308e9..00000000000 --- a/tests/cases/compiler/objectLiteralShorthandProperties.ts +++ /dev/null @@ -1,19 +0,0 @@ -var a, b, c; - -var x1 = { - a -}; - -var x2 = { - a, -} - -var x3 = { - a: 0, - b, - c, - d() { }, - x3, - parent: x3 -}; - diff --git a/tests/cases/compiler/objectLiteralShorthandProperties2.ts b/tests/cases/compiler/objectLiteralShorthandProperties2.ts deleted file mode 100644 index 38081e7d691..00000000000 --- a/tests/cases/compiler/objectLiteralShorthandProperties2.ts +++ /dev/null @@ -1,18 +0,0 @@ -// errors -var y = { - "stringLiteral", - 42, - get e, - set f, - this, - super, - var, - class, - typeof -}; - -var x = { - a.b, - a["ss"], - a[1], -}; \ No newline at end of file diff --git a/tests/cases/compiler/objectLiteralShorthandProperties3.ts b/tests/cases/compiler/objectLiteralShorthandProperties3.ts deleted file mode 100644 index 005885bb901..00000000000 --- a/tests/cases/compiler/objectLiteralShorthandProperties3.ts +++ /dev/null @@ -1,13 +0,0 @@ -// module export - -module m { - export var x; -} - -module m { - var z = x; - var y = { - a: x, - x - }; -} diff --git a/tests/cases/compiler/objectLiteralShorthandProperties4.ts b/tests/cases/compiler/objectLiteralShorthandProperties4.ts deleted file mode 100644 index 1f44dc18ae8..00000000000 --- a/tests/cases/compiler/objectLiteralShorthandProperties4.ts +++ /dev/null @@ -1,4 +0,0 @@ -var x = { - x, // OK - undefinedVariable // Error -} From bb7a0aa9d9123a10c0c181398cfdd45ff2859cf2 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 11 Nov 2014 11:31:45 -0800 Subject: [PATCH 081/154] Add conformance tests --- .../objectLiteralShorthandProperties.js | 39 ++++++++++ .../objectLiteralShorthandProperties.types | 50 ++++++++++++ ...jectLiteralShorthandProperties2.errors.txt | 72 +++++++++++++++++ .../objectLiteralShorthandProperties3.js | 30 ++++++++ .../objectLiteralShorthandProperties3.types | 31 ++++++++ ...jectLiteralShorthandProperties4.errors.txt | 11 +++ .../objectLiteralShorthandProperties4.js | 12 +++ ...ectLiteralShorthandPropertiesAssignment.js | 11 +++ ...LiteralShorthandPropertiesAssignment.types | 15 ++++ ...lShorthandPropertiesAssignment2.errors.txt | 13 ++++ ...ctLiteralShorthandPropertiesAssignment2.js | 11 +++ ...eralShorthandPropertiesFunctionArgument.js | 20 +++++ ...lShorthandPropertiesFunctionArgument.types | 33 ++++++++ ...handPropertiesFunctionArgument2.errors.txt | 14 ++++ ...ralShorthandPropertiesFunctionArgument2.js | 17 ++++ ...jectLiteralShorthandPropertiesTargetES6.js | 62 +++++++++++++++ ...tLiteralShorthandPropertiesTargetES6.types | 77 +++++++++++++++++++ .../objectLiteralShorthandProperties.ts | 20 +++++ .../objectLiteralShorthandProperties2.ts | 18 +++++ .../objectLiteralShorthandProperties3.ts | 13 ++++ .../objectLiteralShorthandProperties4.ts | 4 + ...ectLiteralShorthandPropertiesAssignment.ts | 4 + ...ctLiteralShorthandPropertiesAssignment2.ts | 4 + ...eralShorthandPropertiesFunctionArgument.ts | 10 +++ ...ralShorthandPropertiesFunctionArgument2.ts | 7 ++ ...jectLiteralShorthandPropertiesTargetES6.ts | 31 ++++++++ 26 files changed, 629 insertions(+) create mode 100644 tests/baselines/reference/objectLiteralShorthandProperties.js create mode 100644 tests/baselines/reference/objectLiteralShorthandProperties.types create mode 100644 tests/baselines/reference/objectLiteralShorthandProperties2.errors.txt create mode 100644 tests/baselines/reference/objectLiteralShorthandProperties3.js create mode 100644 tests/baselines/reference/objectLiteralShorthandProperties3.types create mode 100644 tests/baselines/reference/objectLiteralShorthandProperties4.errors.txt create mode 100644 tests/baselines/reference/objectLiteralShorthandProperties4.js create mode 100644 tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js create mode 100644 tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types create mode 100644 tests/baselines/reference/objectLiteralShorthandPropertiesAssignment2.errors.txt create mode 100644 tests/baselines/reference/objectLiteralShorthandPropertiesAssignment2.js create mode 100644 tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js create mode 100644 tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types create mode 100644 tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt create mode 100644 tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js create mode 100644 tests/baselines/reference/objectLiteralShorthandPropertiesTargetES6.js create mode 100644 tests/baselines/reference/objectLiteralShorthandPropertiesTargetES6.types create mode 100644 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties.ts create mode 100644 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties2.ts create mode 100644 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties3.ts create mode 100644 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties4.ts create mode 100644 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment.ts create mode 100644 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment2.ts create mode 100644 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument.ts create mode 100644 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts create mode 100644 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesTargetES6.ts diff --git a/tests/baselines/reference/objectLiteralShorthandProperties.js b/tests/baselines/reference/objectLiteralShorthandProperties.js new file mode 100644 index 00000000000..31e9eabb0a9 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandProperties.js @@ -0,0 +1,39 @@ +//// [objectLiteralShorthandProperties.ts] +var a, b, c; + +var x1 = { + a +}; + +var x2 = { + a, +} + +var x3 = { + a: 0, + b, + c, + d() { }, + x3, + parent: x3 +}; + + + +//// [objectLiteralShorthandProperties.js] +var a, b, c; +var x1 = { + a: a +}; +var x2 = { + a: a +}; +var x3 = { + a: 0, + b: b, + c: c, + d: function () { + }, + x3: x3, + parent: x3 +}; diff --git a/tests/baselines/reference/objectLiteralShorthandProperties.types b/tests/baselines/reference/objectLiteralShorthandProperties.types new file mode 100644 index 00000000000..2f4e17be239 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandProperties.types @@ -0,0 +1,50 @@ +=== tests/cases/compiler/objectLiteralShorthandProperties.ts === +var a, b, c; +>a : any +>b : any +>c : any + +var x1 = { +>x1 : { a: any; } +>{ a} : { a: any; } + + a +>a : any + +}; + +var x2 = { +>x2 : { a: any; } +>{ a,} : { a: any; } + + a, +>a : any +} + +var x3 = { +>x3 : any +>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d: () => void; x3: any; parent: any; } + + a: 0, +>a : number + + b, +>b : any + + c, +>c : any + + d() { }, +>d : () => void +>d() { } : () => void + + x3, +>x3 : any + + parent: x3 +>parent : any +>x3 : any + +}; + + diff --git a/tests/baselines/reference/objectLiteralShorthandProperties2.errors.txt b/tests/baselines/reference/objectLiteralShorthandProperties2.errors.txt new file mode 100644 index 00000000000..814bbf18422 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandProperties2.errors.txt @@ -0,0 +1,72 @@ +tests/cases/compiler/objectLiteralShorthandProperties2.ts(3,20): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(4,7): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(5,10): error TS1005: '(' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(6,10): error TS1005: '(' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(7,9): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(8,10): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(9,8): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(10,10): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(12,1): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(15,6): error TS1005: ',' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(16,6): error TS1005: ',' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(17,6): error TS1005: '=' expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(18,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(5,9): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(15,5): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(15,7): error TS2304: Cannot find name 'b'. +tests/cases/compiler/objectLiteralShorthandProperties2.ts(16,5): error TS2300: Duplicate identifier 'a'. + + +==== tests/cases/compiler/objectLiteralShorthandProperties2.ts (17 errors) ==== + // errors + var y = { + "stringLiteral", + ~ +!!! error TS1005: ':' expected. + 42, + ~ +!!! error TS1005: ':' expected. + get e, + ~ +!!! error TS1005: '(' expected. + ~ +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. + set f, + ~ +!!! error TS1005: '(' expected. + this, + ~ +!!! error TS1005: ':' expected. + super, + ~ +!!! error TS1005: ':' expected. + var, + ~ +!!! error TS1005: ':' expected. + class, + ~ +!!! error TS1005: ':' expected. + typeof + }; + ~ +!!! error TS1005: ':' expected. + + var x = { + a.b, + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS2304: Cannot find name 'b'. + a["ss"], + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS2300: Duplicate identifier 'a'. + a[1], + ~ +!!! error TS1005: '=' expected. + }; + ~ +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandProperties3.js b/tests/baselines/reference/objectLiteralShorthandProperties3.js new file mode 100644 index 00000000000..b3e567bebc8 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandProperties3.js @@ -0,0 +1,30 @@ +//// [objectLiteralShorthandProperties3.ts] +// module export + +module m { + export var x; +} + +module m { + var z = x; + var y = { + a: x, + x + }; +} + + +//// [objectLiteralShorthandProperties3.js] +// module export +var m; +(function (m) { + m.x; +})(m || (m = {})); +var m; +(function (m) { + var z = m.x; + var y = { + a: m.x, + m.x: m.x + }; +})(m || (m = {})); diff --git a/tests/baselines/reference/objectLiteralShorthandProperties3.types b/tests/baselines/reference/objectLiteralShorthandProperties3.types new file mode 100644 index 00000000000..0ca744aaf88 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandProperties3.types @@ -0,0 +1,31 @@ +=== tests/cases/compiler/objectLiteralShorthandProperties3.ts === +// module export + +module m { +>m : typeof m + + export var x; +>x : any +} + +module m { +>m : typeof m + + var z = x; +>z : any +>x : any + + var y = { +>y : { a: any; x: any; } +>{ a: x, x } : { a: any; x: any; } + + a: x, +>a : any +>x : any + + x +>x : any + + }; +} + diff --git a/tests/baselines/reference/objectLiteralShorthandProperties4.errors.txt b/tests/baselines/reference/objectLiteralShorthandProperties4.errors.txt new file mode 100644 index 00000000000..0928d8f2d94 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandProperties4.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/objectLiteralShorthandProperties4.ts(3,5): error TS2304: Cannot find name 'undefinedVariable'. + + +==== tests/cases/compiler/objectLiteralShorthandProperties4.ts (1 errors) ==== + var x = { + x, // OK + undefinedVariable // Error + ~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'undefinedVariable'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandProperties4.js b/tests/baselines/reference/objectLiteralShorthandProperties4.js new file mode 100644 index 00000000000..ed8ee494b17 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandProperties4.js @@ -0,0 +1,12 @@ +//// [objectLiteralShorthandProperties4.ts] +var x = { + x, // OK + undefinedVariable // Error +} + + +//// [objectLiteralShorthandProperties4.js] +var x = { + x: x, + undefinedVariable: undefinedVariable // Error +}; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js new file mode 100644 index 00000000000..6af0a69a304 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js @@ -0,0 +1,11 @@ +//// [objectLiteralShorthandPropertiesAssignment.ts] +var id: number = 10000; +var name: string = "my name"; + +var person: { name: string; id: number } = { name, id }; + + +//// [objectLiteralShorthandPropertiesAssignment.js] +var id = 10000; +var name = "my name"; +var person = { name: name, id: id }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types new file mode 100644 index 00000000000..f7f18c8f0c4 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types @@ -0,0 +1,15 @@ +=== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment.ts === +var id: number = 10000; +>id : number + +var name: string = "my name"; +>name : string + +var person: { name: string; id: number } = { name, id }; +>person : { name: string; id: number; } +>name : string +>id : number +>{ name, id } : { name: string; id: number; } +>name : string +>id : number + diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment2.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment2.errors.txt new file mode 100644 index 00000000000..a3ae961f6ea --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment2.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment2.ts(4,5): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. + Property 'b' is missing in type '{ name: string; id: number; }'. + + +==== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment2.ts (1 errors) ==== + var id: number = 10000; + var name: string = "my name"; + + var person: { b: string; id: number } = { name, id }; // error + ~~~~~~ +!!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. +!!! error TS2322: Property 'b' is missing in type '{ name: string; id: number; }'. + \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment2.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment2.js new file mode 100644 index 00000000000..f37bb1cd525 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment2.js @@ -0,0 +1,11 @@ +//// [objectLiteralShorthandPropertiesAssignment2.ts] +var id: number = 10000; +var name: string = "my name"; + +var person: { b: string; id: number } = { name, id }; // error + + +//// [objectLiteralShorthandPropertiesAssignment2.js] +var id = 10000; +var name = "my name"; +var person = { name: name, id: id }; // error diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js new file mode 100644 index 00000000000..f6e20b605b6 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js @@ -0,0 +1,20 @@ +//// [objectLiteralShorthandPropertiesFunctionArgument.ts] +var id: number = 10000; +var name: string = "my name"; + +var person = { name, id }; + +function foo(p: { name: string; id: number }) { } +foo(person); + + +var obj = { name: name, id: id }; + +//// [objectLiteralShorthandPropertiesFunctionArgument.js] +var id = 10000; +var name = "my name"; +var person = { name: name, id: id }; +function foo(p) { +} +foo(person); +var obj = { name: name, id: id }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types new file mode 100644 index 00000000000..9b4261a74be --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types @@ -0,0 +1,33 @@ +=== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument.ts === +var id: number = 10000; +>id : number + +var name: string = "my name"; +>name : string + +var person = { name, id }; +>person : { name: string; id: number; } +>{ name, id } : { name: string; id: number; } +>name : string +>id : number + +function foo(p: { name: string; id: number }) { } +>foo : (p: { name: string; id: number; }) => void +>p : { name: string; id: number; } +>name : string +>id : number + +foo(person); +>foo(person) : void +>foo : (p: { name: string; id: number; }) => void +>person : { name: string; id: number; } + + +var obj = { name: name, id: id }; +>obj : { name: string; id: number; } +>{ name: name, id: id } : { name: string; id: number; } +>name : string +>name : string +>id : number +>id : number + diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt new file mode 100644 index 00000000000..44426a8afb0 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt @@ -0,0 +1,14 @@ +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts(7,5): error TS2345: Argument of type '{ name: string; id: number; }' is not assignable to parameter of type '{ a: string; id: number; }'. + + +==== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts (1 errors) ==== + var id: number = 10000; + var name: string = "my name"; + + var person = { name, id }; + + function foo(p: { a: string; id: number }) { } + foo(person); // error + ~~~~~~ +!!! error TS2345: Argument of type '{ name: string; id: number; }' is not assignable to parameter of type '{ a: string; id: number; }'. + \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js new file mode 100644 index 00000000000..2f3535ef78a --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js @@ -0,0 +1,17 @@ +//// [objectLiteralShorthandPropertiesFunctionArgument2.ts] +var id: number = 10000; +var name: string = "my name"; + +var person = { name, id }; + +function foo(p: { a: string; id: number }) { } +foo(person); // error + + +//// [objectLiteralShorthandPropertiesFunctionArgument2.js] +var id = 10000; +var name = "my name"; +var person = { name: name, id: id }; +function foo(p) { +} +foo(person); // error diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesTargetES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesTargetES6.js new file mode 100644 index 00000000000..c02911c4993 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesTargetES6.js @@ -0,0 +1,62 @@ +//// [objectLiteralShorthandPropertiesTargetES6.ts] +var a, b, c; + +var x1 = { + a +}; + +var x2 = { + a, +} + +var x3 = { + a: 0, + b, + c, + d() { }, + x3, + parent: x3 +}; + +module m { + export var x; +} + +module m { + var z = x; + var y = { + a: x, + x + }; +} + + +//// [objectLiteralShorthandPropertiesTargetES6.js] +var a, b, c; +var x1 = { + a +}; +var x2 = { + a, +}; +var x3 = { + a: 0, + b, + c, + d: function () { + }, + x3, + parent: x3 +}; +var m; +(function (m) { + m.x; +})(m || (m = {})); +var m; +(function (m) { + var z = m.x; + var y = { + a: m.x, + m.x + }; +})(m || (m = {})); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesTargetES6.types b/tests/baselines/reference/objectLiteralShorthandPropertiesTargetES6.types new file mode 100644 index 00000000000..560ae4af4c0 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesTargetES6.types @@ -0,0 +1,77 @@ +=== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesTargetES6.ts === +var a, b, c; +>a : any +>b : any +>c : any + +var x1 = { +>x1 : { a: any; } +>{ a} : { a: any; } + + a +>a : any + +}; + +var x2 = { +>x2 : { a: any; } +>{ a,} : { a: any; } + + a, +>a : any +} + +var x3 = { +>x3 : any +>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d: () => void; x3: any; parent: any; } + + a: 0, +>a : number + + b, +>b : any + + c, +>c : any + + d() { }, +>d : () => void +>d() { } : () => void + + x3, +>x3 : any + + parent: x3 +>parent : any +>x3 : any + +}; + +module m { +>m : typeof m + + export var x; +>x : any +} + +module m { +>m : typeof m + + var z = x; +>z : any +>x : any + + var y = { +>y : { a: any; x: any; } +>{ a: x, x } : { a: any; x: any; } + + a: x, +>a : any +>x : any + + x +>x : any + + }; +} + diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties.ts new file mode 100644 index 00000000000..ffeab289584 --- /dev/null +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties.ts @@ -0,0 +1,20 @@ +// @target: es5 +var a, b, c; + +var x1 = { + a +}; + +var x2 = { + a, +} + +var x3 = { + a: 0, + b, + c, + d() { }, + x3, + parent: x3 +}; + diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties2.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties2.ts new file mode 100644 index 00000000000..38081e7d691 --- /dev/null +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties2.ts @@ -0,0 +1,18 @@ +// errors +var y = { + "stringLiteral", + 42, + get e, + set f, + this, + super, + var, + class, + typeof +}; + +var x = { + a.b, + a["ss"], + a[1], +}; \ No newline at end of file diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties3.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties3.ts new file mode 100644 index 00000000000..005885bb901 --- /dev/null +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties3.ts @@ -0,0 +1,13 @@ +// module export + +module m { + export var x; +} + +module m { + var z = x; + var y = { + a: x, + x + }; +} diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties4.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties4.ts new file mode 100644 index 00000000000..1f44dc18ae8 --- /dev/null +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties4.ts @@ -0,0 +1,4 @@ +var x = { + x, // OK + undefinedVariable // Error +} diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment.ts new file mode 100644 index 00000000000..44448a26a9b --- /dev/null +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment.ts @@ -0,0 +1,4 @@ +var id: number = 10000; +var name: string = "my name"; + +var person: { name: string; id: number } = { name, id }; diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment2.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment2.ts new file mode 100644 index 00000000000..a3f88036dd8 --- /dev/null +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment2.ts @@ -0,0 +1,4 @@ +var id: number = 10000; +var name: string = "my name"; + +var person: { b: string; id: number } = { name, id }; // error diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument.ts new file mode 100644 index 00000000000..c50c4e3fbdf --- /dev/null +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument.ts @@ -0,0 +1,10 @@ +var id: number = 10000; +var name: string = "my name"; + +var person = { name, id }; + +function foo(p: { name: string; id: number }) { } +foo(person); + + +var obj = { name: name, id: id }; \ No newline at end of file diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts new file mode 100644 index 00000000000..45c248a5911 --- /dev/null +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts @@ -0,0 +1,7 @@ +var id: number = 10000; +var name: string = "my name"; + +var person = { name, id }; + +function foo(p: { a: string; id: number }) { } +foo(person); // error diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesTargetES6.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesTargetES6.ts new file mode 100644 index 00000000000..21351372de2 --- /dev/null +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesTargetES6.ts @@ -0,0 +1,31 @@ +// @target: es6 +var a, b, c; + +var x1 = { + a +}; + +var x2 = { + a, +} + +var x3 = { + a: 0, + b, + c, + d() { }, + x3, + parent: x3 +}; + +module m { + export var x; +} + +module m { + var z = x; + var y = { + a: x, + x + }; +} From 4c5d1fb2d60040903cebc0c697cbd16fffd899bc Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 11 Nov 2014 13:05:49 -0800 Subject: [PATCH 082/154] code cleanup: move code from lambda into separate functon --- src/services/formatting.ts | 94 +++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 43 deletions(-) diff --git a/src/services/formatting.ts b/src/services/formatting.ts index df0555c3181..b722d3c8d9a 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -440,49 +440,7 @@ module ts.formatting { processChildNode(child, /*inheritedIndentation*/ Constants.Unknown, nodeDynamicIndentation, nodeStartLine, /*isListElement*/ false) }, (nodes: NodeArray) => { - var listStartToken = getOpenTokenForList(node, nodes); - var listEndToken = getCloseTokenForOpenToken(listStartToken); - - var listDynamicIndentation = nodeDynamicIndentation; - var startLine = nodeStartLine; - - if (listStartToken !== SyntaxKind.Unknown) { - // introduce a new indentation scope for lists (including list start and end tokens) - while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > nodes.pos) { - break; - } - else if (tokenInfo.token.kind === listStartToken) { - // consume list start token - startLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; - var indentation = - computeIndentation(tokenInfo.token, startLine, Constants.Unknown, node, nodeDynamicIndentation, startLine); - - listDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation.indentation, indentation.delta); - consumeTokenAndAdvanceScanner(tokenInfo, node, listDynamicIndentation); - } - else { - // consume any tokens that precede the list as child elements of 'node' using its indentation scope - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); - } - } - } - - var inheritedIndentation = Constants.Unknown; - for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, listDynamicIndentation, startLine, /*isListElement*/ true) - } - - if (listEndToken !== SyntaxKind.Unknown) { - if (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.kind === listEndToken) { - // consume list end token - consumeTokenAndAdvanceScanner(tokenInfo, node, listDynamicIndentation); - } - } - } + processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); }); // proceed any tokens in the node that are located after child nodes @@ -552,6 +510,56 @@ module ts.formatting { return inheritedIndentation; } + function processChildNodes(nodes: NodeArray, + parent: Node, + parentStartLine: number, + parentDynamicIndentation: DynamicIndentation): void { + + var listStartToken = getOpenTokenForList(parent, nodes); + var listEndToken = getCloseTokenForOpenToken(listStartToken); + + var listDynamicIndentation = parentDynamicIndentation; + var startLine = parentStartLine; + + if (listStartToken !== SyntaxKind.Unknown) { + // introduce a new indentation scope for lists (including list start and end tokens) + while (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(parent); + if (tokenInfo.token.end > nodes.pos) { + break; + } + else if (tokenInfo.token.kind === listStartToken) { + // consume list start token + startLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; + var indentation = + computeIndentation(tokenInfo.token, startLine, Constants.Unknown, parent, parentDynamicIndentation, startLine); + + listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation.indentation, indentation.delta); + consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + } + else { + // consume any tokens that precede the list as child elements of 'node' using its indentation scope + consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation); + } + } + } + + var inheritedIndentation = Constants.Unknown; + for (var i = 0, len = nodes.length; i < len; ++i) { + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, listDynamicIndentation, startLine, /*isListElement*/ true) + } + + if (listEndToken !== SyntaxKind.Unknown) { + if (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(parent); + if (tokenInfo.token.kind === listEndToken) { + // consume list end token + consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + } + } + } + } + function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, dynamicIndentation: DynamicIndentation): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); From 31763a31d39c9a5e852ea6883fa99a7891f4e7c6 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 11 Nov 2014 13:17:57 -0800 Subject: [PATCH 083/154] code cleanup: moved captured locals to parameters --- src/services/formatting.ts | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/services/formatting.ts b/src/services/formatting.ts index b722d3c8d9a..93a5c9ec31b 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -437,7 +437,7 @@ module ts.formatting { forEachChild( node, child => { - processChildNode(child, /*inheritedIndentation*/ Constants.Unknown, nodeDynamicIndentation, nodeStartLine, /*isListElement*/ false) + processChildNode(child, /*inheritedIndentation*/ Constants.Unknown, node, nodeDynamicIndentation, nodeStartLine, /*isListElement*/ false) }, (nodes: NodeArray) => { processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); @@ -455,19 +455,22 @@ module ts.formatting { function processChildNode( child: Node, inheritedIndentation: number, - nodeDynamicIndentation: DynamicIndentation, + parent: Node, + parentDynamicIndentation: DynamicIndentation, parentStartLine: number, isListItem: boolean): number { var childStartPos = child.getStart(sourceFile); var childStart = sourceFile.getLineAndCharacterFromPosition(childStartPos); - var childIndentationAmount = isListItem - ? tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation) - : Constants.Unknown; - if (isListItem && childIndentationAmount !== Constants.Unknown) { - inheritedIndentation = childIndentationAmount; + // if child is a list item - try to get its indentation + var childIndentationAmount = Constants.Unknown; + if (isListItem) { + childIndentationAmount = tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation); + if (childIndentationAmount !== Constants.Unknown) { + inheritedIndentation = childIndentationAmount; + } } // child node is outside the target range - do not dive inside @@ -486,7 +489,7 @@ module ts.formatting { break; } - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); } if (!formattingScanner.isOnToken()) { @@ -497,11 +500,11 @@ module ts.formatting { // if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules var tokenInfo = formattingScanner.readTokenInfo(node); Debug.assert(tokenInfo.token.end === child.end); - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); + consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); return inheritedIndentation; } - var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, nodeDynamicIndentation, parentStartLine); + var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, parentDynamicIndentation, parentStartLine); processNode(child, childContextNode, childStart.line, childIndentation.indentation, childIndentation.delta); @@ -546,7 +549,7 @@ module ts.formatting { var inheritedIndentation = Constants.Unknown; for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, listDynamicIndentation, startLine, /*isListElement*/ true) + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, node, listDynamicIndentation, startLine, /*isListElement*/ true) } if (listEndToken !== SyntaxKind.Unknown) { From f53254b538a401720149f63eff9ae9de50c23bb3 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 11 Nov 2014 13:25:54 -0800 Subject: [PATCH 084/154] if preceding token cannot be found - scan from the beginning of enclosing node --- src/services/formatting.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/formatting.ts b/src/services/formatting.ts index 93a5c9ec31b..85d11117ea6 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -238,7 +238,8 @@ module ts.formatting { } var precedingToken = findPrecedingToken(enclosingNode.pos, sourceFile); - return precedingToken ? precedingToken.end : originalRange.pos; + // no preceding token found - start from the beginning of enclosing node + return precedingToken ? precedingToken.end : enclosingNode.pos; } function formatSpan(originalRange: TextRange, From 95a7437ba0ca633b34fb7a8a9fbded64c63866e8 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 11 Nov 2014 13:30:25 -0800 Subject: [PATCH 085/154] Clean up function names. --- src/services/syntax/parser.ts | 50 +++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index 4fe8a92c5d5..b0340b27d34 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -1967,7 +1967,7 @@ module TypeScript.Parser { return new OmittedExpressionSyntax(parseNodeData); } - return allowInAnd(tryParseAssignmentExpressionOrHigher_NoForce); + return allowInAnd(tryParseAssignmentExpressionOrHigher); } function isExpression(currentToken: ISyntaxToken): boolean { @@ -2191,7 +2191,8 @@ module TypeScript.Parser { // = AssignmentExpression[?In, ?Yield] return new EqualsValueClauseSyntax(parseNodeData, - eatToken(SyntaxKind.EqualsToken), tryParseAssignmentExpressionOrHigher(/*force:*/ true)); + eatToken(SyntaxKind.EqualsToken), + parseAssignmentExpressionOrHigher()); } function parseExpression(): IExpressionSyntax { @@ -2199,33 +2200,35 @@ module TypeScript.Parser { // AssignmentExpression[in] // Expression[in] , AssignmentExpression[in] - var leftOperand = tryParseAssignmentExpressionOrHigher(/*force:*/ true); + var leftOperand = parseAssignmentExpressionOrHigher(); while (true) { var _currentToken = currentToken(); if (_currentToken.kind !== SyntaxKind.CommaToken) { break; } - leftOperand = new BinaryExpressionSyntax(parseNodeData, leftOperand, consumeToken(_currentToken), - tryParseAssignmentExpressionOrHigher(/*force:*/ true)); + leftOperand = new BinaryExpressionSyntax(parseNodeData, + leftOperand, + consumeToken(_currentToken), + parseAssignmentExpressionOrHigher()); } return leftOperand; } - function tryParseAssignmentExpressionOrHigher_NoForce(): IExpressionSyntax { - return tryParseAssignmentExpressionOrHigher(/*force:*/ false); + function tryParseAssignmentExpressionOrHigher(): IExpressionSyntax { + return tryParseAssignmentExpressionOrHigherWorker(/*force:*/ false); } - function tryParseAssignmentExpressionOrHigher_Force(): IExpressionSyntax { - return tryParseAssignmentExpressionOrHigher(/*force:*/ true); + function parseAssignmentExpressionOrHigher(): IExpressionSyntax { + return tryParseAssignmentExpressionOrHigherWorker(/*force:*/ true); } // Called when you need to parse an expression, but you do not want to allow 'CommaExpressions'. // i.e. if you have "var a = 1, b = 2" then when we parse '1' we want to parse with higher // precedence than 'comma'. Otherwise we'll get: "var a = (1, (b = 2))", instead of // "var a = (1), b = (2)"); - function tryParseAssignmentExpressionOrHigher(force: boolean): IExpressionSyntax { + function tryParseAssignmentExpressionOrHigherWorker(force: boolean): IExpressionSyntax { // Augmented by TypeScript: // // AssignmentExpression[in]: @@ -2278,8 +2281,10 @@ module TypeScript.Parser { // Check for recursive assignment expressions. if (SyntaxFacts.isAssignmentOperatorToken(operatorToken.kind)) { - return new BinaryExpressionSyntax(parseNodeData, leftOperand, consumeToken(operatorToken), - tryParseAssignmentExpressionOrHigher(/*force:*/ true)); + return new BinaryExpressionSyntax(parseNodeData, + leftOperand, + consumeToken(operatorToken), + parseAssignmentExpressionOrHigher()); } } @@ -2340,12 +2345,15 @@ module TypeScript.Parser { return leftOperand; } - // Note: we explicitly do *not* pass 'allowIn' to the whenTrue part. An 'in' expression is always - // allowed in the 'true' part of a conditional expression. + // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and + // we do not that for the 'whenFalse' part. return new ConditionalExpressionSyntax(parseNodeData, - leftOperand, consumeToken(_currentToken), allowInAnd(tryParseAssignmentExpressionOrHigher_Force), - eatToken(SyntaxKind.ColonToken), tryParseAssignmentExpressionOrHigher(/*force:*/ true)); + leftOperand, + consumeToken(_currentToken), + allowInAnd(parseAssignmentExpressionOrHigher), + eatToken(SyntaxKind.ColonToken), + parseAssignmentExpressionOrHigher()); } function parseBinaryExpressionRest(precedence: BinaryExpressionPrecedence, leftOperand: IExpressionSyntax): IExpressionSyntax { @@ -2695,7 +2703,7 @@ module TypeScript.Parser { // cause a missing identiifer to be created), so that we will then consume the // comma and the following list items). var force = currentToken().kind === SyntaxKind.CommaToken; - return allowInAnd(force ? tryParseAssignmentExpressionOrHigher_Force : tryParseAssignmentExpressionOrHigher_NoForce); + return allowInAnd(force ? parseAssignmentExpressionOrHigher : tryParseAssignmentExpressionOrHigher); } function parseElementAccessArgumentExpression(openBracketToken: ISyntaxToken, inObjectCreation: boolean) { @@ -2973,7 +2981,7 @@ module TypeScript.Parser { return parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ true, /*checkForStrictMode:*/ false); } - return tryParseAssignmentExpressionOrHigher(/*force:*/ true); + return parseAssignmentExpressionOrHigher(); } function isSimpleArrowFunctionExpression(_currentToken: ISyntaxToken): boolean { @@ -3218,7 +3226,9 @@ module TypeScript.Parser { // Also, if we have an identifier and it is followed by a colon then this is // definitely a simple property assignment. return new SimplePropertyAssignmentSyntax(parseNodeData, - propertyName, eatToken(SyntaxKind.ColonToken), allowInAnd(tryParseAssignmentExpressionOrHigher_Force)); + propertyName, + eatToken(SyntaxKind.ColonToken), + allowInAnd(parseAssignmentExpressionOrHigher)); } } @@ -3291,7 +3301,7 @@ module TypeScript.Parser { return new ComputedPropertyNameSyntax(parseNodeData, consumeToken(openBracketToken), - allowInAnd(tryParseAssignmentExpressionOrHigher_Force), + allowInAnd(parseAssignmentExpressionOrHigher), eatToken(SyntaxKind.CloseBracketToken)); } From be202a4e718210b419bba09bfb1c162d420ef807 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 11 Nov 2014 14:24:41 -0800 Subject: [PATCH 086/154] Spec conformance for function blocks versus statement blocks. --- src/services/syntax/parser.ts | 55 ++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index b0340b27d34..4770047f18c 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -1027,34 +1027,34 @@ module TypeScript.Parser { return isPropertyName(/*peekIndex:*/ modifierCount + 1, inErrorRecovery); } - function parseAccessor(checkForStrictMode: boolean): IAccessorSyntax { + function parseAccessor(): IAccessorSyntax { var modifiers = parseModifiers(); var _currenToken = currentToken(); var tokenKind = _currenToken.kind; if (tokenKind === SyntaxKind.GetKeyword) { - return parseGetMemberAccessorDeclaration(modifiers, _currenToken, checkForStrictMode); + return parseGetAccessor(modifiers, _currenToken); } else if (tokenKind === SyntaxKind.SetKeyword) { - return parseSetMemberAccessorDeclaration(modifiers, _currenToken, checkForStrictMode); + return parseSetccessor(modifiers, _currenToken); } else { throw Errors.invalidOperation(); } } - function parseGetMemberAccessorDeclaration(modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, checkForStrictMode: boolean): GetAccessorSyntax { + function parseGetAccessor(modifiers: ISyntaxToken[], getKeyword: ISyntaxToken): GetAccessorSyntax { return new GetAccessorSyntax(parseNodeData, modifiers, consumeToken(getKeyword), parsePropertyName(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, checkForStrictMode)); + parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false)); } - function parseSetMemberAccessorDeclaration(modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, checkForStrictMode: boolean): SetAccessorSyntax { + function parseSetccessor(modifiers: ISyntaxToken[], setKeyword: ISyntaxToken): SetAccessorSyntax { return new SetAccessorSyntax(parseNodeData, modifiers, consumeToken(setKeyword), parsePropertyName(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, checkForStrictMode)); + parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false)); } function isClassElement(inErrorRecovery: boolean): boolean { @@ -1127,7 +1127,7 @@ module TypeScript.Parser { return parseIndexMemberDeclaration(); } else if (isAccessor(_modifierCount, inErrorRecovery)) { - return parseAccessor(/*checkForStrictMode:*/ false); + return parseAccessor(); } else if (isMemberVariableOrFunctionDeclaration(/*peekIndex:*/ _modifierCount, inErrorRecovery)) { var modifiers = parseModifiers(); @@ -1159,7 +1159,7 @@ module TypeScript.Parser { eatToken(SyntaxKind.ConstructorKeyword), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), isBlock() - ? parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ true) + ? parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false) : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } @@ -1170,7 +1170,7 @@ module TypeScript.Parser { // open brace. var parseBlockEvenWithNoOpenBrace = tryAddUnexpectedEqualsGreaterThanToken(callSignature); var blockOrSemicolonToken = parseBlockEvenWithNoOpenBrace || isBlock() - ? parseBlock(parseBlockEvenWithNoOpenBrace, /*checkForStrictMode:*/ true) + ? parseFunctionBlock(parseBlockEvenWithNoOpenBrace) : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false); return new MemberFunctionDeclarationSyntax(parseNodeData, modifiers, propertyName, callSignature, blockOrSemicolonToken); @@ -1237,7 +1237,7 @@ module TypeScript.Parser { // Parse a block if we're on a bock, or if we saw a '=>' var blockOrSemicolonToken = parseBlockEvenWithNoOpenBrace || isBlock() - ? parseBlock(parseBlockEvenWithNoOpenBrace, /*checkForStrictMode:*/ true) + ? parseFunctionBlock(parseBlockEvenWithNoOpenBrace) : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false); return new FunctionDeclarationSyntax(parseNodeData, modifiers, functionKeyword, identifier, callSignature, blockOrSemicolonToken); @@ -1591,7 +1591,7 @@ module TypeScript.Parser { } case SyntaxKind.IfKeyword: return parseIfStatement(_currentToken); - case SyntaxKind.OpenBraceToken: return parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ false); + case SyntaxKind.OpenBraceToken: return parseStatementBlock(); case SyntaxKind.ReturnKeyword: return parseReturnStatement(_currentToken); case SyntaxKind.SwitchKeyword: return parseSwitchStatement(_currentToken); case SyntaxKind.ThrowKeyword: return parseThrowStatement(_currentToken); @@ -1663,7 +1663,7 @@ module TypeScript.Parser { var savedListParsingState = listParsingState; listParsingState |= (1 << ListParsingState.TryBlock_Statements); - var block = parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ false); + var block = parseStatementBlock(); listParsingState = savedListParsingState; var catchClause: CatchClauseSyntax = undefined; @@ -1684,7 +1684,7 @@ module TypeScript.Parser { function parseCatchClauseBlock(): BlockSyntax { var savedListParsingState = listParsingState; listParsingState |= (1 << ListParsingState.CatchBlock_Statements); - var block = parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ false); + var block = parseStatementBlock(); listParsingState = savedListParsingState; return block; @@ -1698,7 +1698,8 @@ module TypeScript.Parser { function parseFinallyClause(): FinallyClauseSyntax { return new FinallyClauseSyntax(parseNodeData, - eatToken(SyntaxKind.FinallyKeyword), parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ false)); + eatToken(SyntaxKind.FinallyKeyword), + parseStatementBlock()); } function parseWithStatement(withKeyword: ISyntaxToken): WithStatementSyntax { @@ -2825,7 +2826,7 @@ module TypeScript.Parser { return new FunctionExpressionSyntax(parseNodeData, consumeToken(functionKeyword), eatOptionalIdentifierToken(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ true)); + parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false)); } function parseObjectCreationExpression(newKeyword: ISyntaxToken): ObjectCreationExpressionSyntax { @@ -2959,7 +2960,7 @@ module TypeScript.Parser { // { FunctionBody } if (isBlock()) { - return parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ false); + return parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false); } // We didn't have a block. However, we may be in an error situation. For example, @@ -2978,7 +2979,7 @@ module TypeScript.Parser { !isFunctionDeclaration(_modifierCount)) { // We've seen a statement (and it isn't an expressionStatement like 'foo()'), // so treat this like a block with a missing open brace. - return parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ true, /*checkForStrictMode:*/ false); + return parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ true); } return parseAssignmentExpressionOrHigher(); @@ -3179,7 +3180,7 @@ module TypeScript.Parser { // Debug.assert(isPropertyAssignment(/*inErrorRecovery:*/ false)); if (isAccessor(modifierCount(), inErrorRecovery)) { - return parseAccessor(/*checkForStrictMode:*/ true); + return parseAccessor(); } // Note: we don't want to call parsePropertyName here yet as it will convert a keyword @@ -3308,7 +3309,7 @@ module TypeScript.Parser { function parseFunctionPropertyAssignment(propertyName: IPropertyNameSyntax): FunctionPropertyAssignmentSyntax { return new FunctionPropertyAssignmentSyntax(parseNodeData, propertyName, parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseBlock(/*parseBlockEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ true)); + parseFunctionBlock(/*parseBlockEvenWithNoOpenBrace:*/ false)); } function parseArrayLiteralExpression(openBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax { @@ -3319,6 +3320,20 @@ module TypeScript.Parser { eatToken(SyntaxKind.CloseBracketToken)); } + function parseFunctionBlock(parseBlockEvenWithNoOpenBrace: boolean): BlockSyntax { + return parseBlock(parseBlockEvenWithNoOpenBrace, /*checkForStrictMode:*/ true); + } + + function parseStatementBlock(): BlockSyntax { + // Different from function blocks in that we don't check for strict mode, nor do accept + // a block without an open curly. + var openBraceToken: ISyntaxToken; + return new BlockSyntax(parseNodeData, + openBraceToken = eatToken(SyntaxKind.OpenBraceToken), + openBraceToken.fullWidth() > 0 ? parseSyntaxList(ListParsingState.Block_Statements) : [], + eatToken(SyntaxKind.CloseBraceToken)); + } + function parseBlock(parseBlockEvenWithNoOpenBrace: boolean, checkForStrictMode: boolean): BlockSyntax { var openBraceToken = eatToken(SyntaxKind.OpenBraceToken); var statements: IStatementSyntax[]; From e5b997c53000bf58e45bf96a4e5066be2eb3062f Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 11 Nov 2014 14:55:44 -0800 Subject: [PATCH 087/154] Provide more consistent behavior in how parseFunctionBlock works. --- src/services/syntax/parser.ts | 173 ++++++++++++++++++---------------- 1 file changed, 93 insertions(+), 80 deletions(-) diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index 4770047f18c..7386e6f2f3a 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -1047,14 +1047,14 @@ module TypeScript.Parser { return new GetAccessorSyntax(parseNodeData, modifiers, consumeToken(getKeyword), parsePropertyName(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false)); + parseFunctionBlock()); } function parseSetccessor(modifiers: ISyntaxToken[], setKeyword: ISyntaxToken): SetAccessorSyntax { return new SetAccessorSyntax(parseNodeData, modifiers, consumeToken(setKeyword), parsePropertyName(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false)); + parseFunctionBlock()); } function isClassElement(inErrorRecovery: boolean): boolean { @@ -1154,26 +1154,25 @@ module TypeScript.Parser { } function parseConstructorDeclaration(): ConstructorDeclarationSyntax { + // Note: if we see an arrow after the close paren, then try to parse out a function + // block anyways. It's likely the user just though '=> expr' was legal anywhere a + // block was legal. return new ConstructorDeclarationSyntax(parseNodeData, parseModifiers(), eatToken(SyntaxKind.ConstructorKeyword), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - isBlock() - ? parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false) - : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); + isBlockOrArrow() ? parseFunctionBlock() : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } function parseMemberFunctionDeclaration(modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax): MemberFunctionDeclarationSyntax { - var callSignature = parseCallSignature(/*requireCompleteTypeParameterList:*/ false); - - // If we got an errant => then we want to parse what's coming up without requiring an - // open brace. - var parseBlockEvenWithNoOpenBrace = tryAddUnexpectedEqualsGreaterThanToken(callSignature); - var blockOrSemicolonToken = parseBlockEvenWithNoOpenBrace || isBlock() - ? parseFunctionBlock(parseBlockEvenWithNoOpenBrace) - : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false); - - return new MemberFunctionDeclarationSyntax(parseNodeData, modifiers, propertyName, callSignature, blockOrSemicolonToken); + // Note: if we see an arrow after the close paren, then try to parse out a function + // block anyways. It's likely the user just though '=> expr' was legal anywhere a + // block was legal. + return new MemberFunctionDeclarationSyntax(parseNodeData, + modifiers, + propertyName, + parseCallSignature(/*requireCompleteTypeParameterList:*/ false), + isBlockOrArrow() ? parseFunctionBlock() : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } function parseMemberVariableDeclaration(modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax): MemberVariableDeclarationSyntax { @@ -1194,53 +1193,20 @@ module TypeScript.Parser { parseModifiers(), parseIndexSignature(), eatExplicitOrAutomaticSemicolon(/*allowWithoutNewLine:*/ false)); } - function tryAddUnexpectedEqualsGreaterThanToken(callSignature: CallSignatureSyntax): boolean { - var token0 = currentToken(); - - var hasEqualsGreaterThanToken = token0.kind === SyntaxKind.EqualsGreaterThanToken; - if (hasEqualsGreaterThanToken) { - // We can only do this if the call signature actually contains a final token that we - // could add the => to. - var _lastToken = lastToken(callSignature); - if (_lastToken && _lastToken.fullWidth() > 0) { - // Previously the language allowed "function f() => expr;" as a shorthand for - // "function f() { return expr; }. - // - // Detect if the user is typing this and attempt recovery. - var diagnostic = new Diagnostic(fileName, source.text.lineMap(), - start(token0, source.text), width(token0), DiagnosticCode.Unexpected_token_0_expected, [SyntaxFacts.getText(SyntaxKind.OpenBraceToken)]); - addDiagnostic(diagnostic); - - // Skip over the => It will get attached to whatever comes next. - skipToken(token0); - return true; - } - } - - - return false; - } - function isFunctionDeclaration(modifierCount: number): boolean { return peekToken(modifierCount).kind === SyntaxKind.FunctionKeyword; } function parseFunctionDeclaration(): FunctionDeclarationSyntax { - var modifiers = parseModifiers(); - var functionKeyword = eatToken(SyntaxKind.FunctionKeyword); - var identifier = eatIdentifierToken(); - var callSignature = parseCallSignature(/*requireCompleteTypeParameterList:*/ false); - - // If we got an errant => then we want to parse what's coming up without requiring an - // open brace. - var parseBlockEvenWithNoOpenBrace = tryAddUnexpectedEqualsGreaterThanToken(callSignature); - - // Parse a block if we're on a bock, or if we saw a '=>' - var blockOrSemicolonToken = parseBlockEvenWithNoOpenBrace || isBlock() - ? parseFunctionBlock(parseBlockEvenWithNoOpenBrace) - : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false); - - return new FunctionDeclarationSyntax(parseNodeData, modifiers, functionKeyword, identifier, callSignature, blockOrSemicolonToken); + // Note: if we see an arrow after the close paren, then try to parse out a function + // block anyways. It's likely the user just though '=> expr' was legal anywhere a + // block was legal. + return new FunctionDeclarationSyntax(parseNodeData, + parseModifiers(), + eatToken(SyntaxKind.FunctionKeyword), + eatIdentifierToken(), + parseCallSignature(/*requireCompleteTypeParameterList:*/ false), + isBlockOrArrow() ? parseFunctionBlock() : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } function parseModuleName(): INameSyntax { @@ -2826,7 +2792,7 @@ module TypeScript.Parser { return new FunctionExpressionSyntax(parseNodeData, consumeToken(functionKeyword), eatOptionalIdentifierToken(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false)); + parseFunctionBlock()); } function parseObjectCreationExpression(newKeyword: ISyntaxToken): ObjectCreationExpressionSyntax { @@ -2960,7 +2926,7 @@ module TypeScript.Parser { // { FunctionBody } if (isBlock()) { - return parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false); + return parseFunctionBlock(); } // We didn't have a block. However, we may be in an error situation. For example, @@ -2975,11 +2941,14 @@ module TypeScript.Parser { // up preemptively closing the containing construct. var _modifierCount = modifierCount(); if (isStatement(_modifierCount, /*inErrorRecovery:*/ false) && - !isExpressionStatement(currentToken()) && - !isFunctionDeclaration(_modifierCount)) { - // We've seen a statement (and it isn't an expressionStatement like 'foo()'), - // so treat this like a block with a missing open brace. - return parseFunctionBlock(/*parseStatementsEvenWithNoOpenBrace:*/ true); + !isExpression(currentToken())) { + // We've seen a statement (and it isn't an expressionStatement like 'foo()'), so + // treat this like a block with a missing open brace. + + return new BlockSyntax(parseNodeData, + eatToken(SyntaxKind.OpenBraceToken), + parseFunctionBlockStatements(), + eatToken(SyntaxKind.CloseBraceToken)); } return parseAssignmentExpressionOrHigher(); @@ -3009,6 +2978,11 @@ module TypeScript.Parser { return currentToken().kind === SyntaxKind.OpenBraceToken; } + function isBlockOrArrow(): boolean { + var _currentToken = currentToken(); + return _currentToken.kind === SyntaxKind.OpenBraceToken || _currentToken.kind === SyntaxKind.EqualsGreaterThanToken; + } + function isDefinitelyArrowFunctionExpression(): boolean { var token0 = currentToken(); if (token0.kind !== SyntaxKind.OpenParenToken) { @@ -3308,8 +3282,9 @@ module TypeScript.Parser { function parseFunctionPropertyAssignment(propertyName: IPropertyNameSyntax): FunctionPropertyAssignmentSyntax { return new FunctionPropertyAssignmentSyntax(parseNodeData, - propertyName, parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseFunctionBlock(/*parseBlockEvenWithNoOpenBrace:*/ false)); + propertyName, + parseCallSignature(/*requireCompleteTypeParameterList:*/ false), + parseFunctionBlock()); } function parseArrayLiteralExpression(openBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax { @@ -3320,34 +3295,72 @@ module TypeScript.Parser { eatToken(SyntaxKind.CloseBracketToken)); } - function parseFunctionBlock(parseBlockEvenWithNoOpenBrace: boolean): BlockSyntax { - return parseBlock(parseBlockEvenWithNoOpenBrace, /*checkForStrictMode:*/ true); + function tryAddUnexpectedEqualsGreaterThanToken(callSignature: CallSignatureSyntax): boolean { + var token0 = currentToken(); + + var hasEqualsGreaterThanToken = token0.kind === SyntaxKind.EqualsGreaterThanToken; + if (hasEqualsGreaterThanToken) { + // We can only do this if the call signature actually contains a final token that we + // could add the => to. + var _lastToken = lastToken(callSignature); + if (_lastToken && _lastToken.fullWidth() > 0) { + // Previously the language allowed "function f() => expr;" as a shorthand for + // "function f() { return expr; }. + // + // Detect if the user is typing this and attempt recovery. + var diagnostic = new Diagnostic(fileName, source.text.lineMap(), + start(token0, source.text), width(token0), DiagnosticCode.Unexpected_token_0_expected, [SyntaxFacts.getText(SyntaxKind.OpenBraceToken)]); + addDiagnostic(diagnostic); + + // Skip over the => It will get attached to whatever comes next. + skipToken(token0); + return true; + } + } + + + return false; } function parseStatementBlock(): BlockSyntax { // Different from function blocks in that we don't check for strict mode, nor do accept // a block without an open curly. var openBraceToken: ISyntaxToken; - return new BlockSyntax(parseNodeData, - openBraceToken = eatToken(SyntaxKind.OpenBraceToken), + return new BlockSyntax(parseNodeData, + openBraceToken = eatToken(SyntaxKind.OpenBraceToken), openBraceToken.fullWidth() > 0 ? parseSyntaxList(ListParsingState.Block_Statements) : [], eatToken(SyntaxKind.CloseBraceToken)); } - function parseBlock(parseBlockEvenWithNoOpenBrace: boolean, checkForStrictMode: boolean): BlockSyntax { - var openBraceToken = eatToken(SyntaxKind.OpenBraceToken); - var statements: IStatementSyntax[]; + function parseFunctionBlock(): BlockSyntax { + // If we got an errant => then we want to parse what's coming up without requiring an + // open brace. ItWe do this because it's not uncommon for people to get confused as to + // where/when they can use an => and we want to have good error recovery here. + var token0 = currentToken(); - if (parseBlockEvenWithNoOpenBrace || openBraceToken.fullWidth() > 0) { - var savedIsInStrictMode = strictMode; - - var processItems = checkForStrictMode ? updateStrictModeState : undefined; - var statements = parseSyntaxList(ListParsingState.Block_Statements, processItems); + var hasEqualsGreaterThanToken = token0.kind === SyntaxKind.EqualsGreaterThanToken; + if (hasEqualsGreaterThanToken) { + addDiagnostic(new Diagnostic(fileName, source.text.lineMap(), + start(token0, source.text), width(token0), DiagnosticCode.Unexpected_token_0_expected, [SyntaxFacts.getText(SyntaxKind.OpenBraceToken)])); - setStrictMode(savedIsInStrictMode); + // Skip over the => It will get attached to whatever comes next. + skipToken(token0); } - return new BlockSyntax(parseNodeData, openBraceToken, statements || [], eatToken(SyntaxKind.CloseBraceToken)); + var openBraceToken = eatToken(SyntaxKind.OpenBraceToken); + var statements = hasEqualsGreaterThanToken || openBraceToken.fullWidth() > 0 + ? parseFunctionBlockStatements() + : []; + + return new BlockSyntax(parseNodeData, openBraceToken, statements, eatToken(SyntaxKind.CloseBraceToken)); + } + + function parseFunctionBlockStatements() { + var savedIsInStrictMode = strictMode; + var statements = parseSyntaxList(ListParsingState.Block_Statements, updateStrictModeState); + setStrictMode(savedIsInStrictMode); + + return statements; } function parseCallSignature(requireCompleteTypeParameterList: boolean): CallSignatureSyntax { From ecfc60ff16adc4acc1b40cd14a3483b43db7ef7d Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 11 Nov 2014 15:50:24 -0800 Subject: [PATCH 088/154] Update comment --- src/services/syntax/parser.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index 7386e6f2f3a..7249afd7328 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -154,6 +154,13 @@ module TypeScript.Parser { // TODO: do we need to store/restore this when speculative parsing? I don't think so. The // parsing logic already handles storing/restoring this and should work properly even if we're // speculative parsing. + // + // When adding more parser context flags, consider which is the more common case that the + // flag will be in. This should be hte 'false' state for that flag. The reason for this is + // that we don't store data in our nodes unless the value is in the *non-default* state. So, + // for example, more often than code 'allows-in' (or doesn't 'disallow-in'). We opt for + // 'disallow-in' set to 'false'. Otherwise, if we had 'allowsIn' set to 'true', then almost + // all nodes would need extra state on them to store this info. var strictMode: boolean = false; var disallowIn: boolean = false; From e0c93a1c088aebe17a579be2d63d48b24cb04a00 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 11 Nov 2014 16:27:29 -0800 Subject: [PATCH 089/154] Add support for parsing generator declarations. Conflicts: src/services/syntax/SyntaxGenerator.js.map --- src/services/syntax/SyntaxGenerator.js | 41 +++++++++------- src/services/syntax/SyntaxGenerator.js.map | 4 ++ src/services/syntax/parser.ts | 49 ++++++++++++++++--- src/services/syntax/syntaxGenerator.ts | 42 ++++++++-------- .../syntax/syntaxInterfaces.generated.ts | 9 ++-- .../syntax/syntaxNodes.concrete.generated.ts | 39 +++++++++------ src/services/syntax/syntaxWalker.generated.ts | 3 ++ 7 files changed, 122 insertions(+), 65 deletions(-) diff --git a/src/services/syntax/SyntaxGenerator.js b/src/services/syntax/SyntaxGenerator.js index 93d47e209b5..df5916efb44 100644 --- a/src/services/syntax/SyntaxGenerator.js +++ b/src/services/syntax/SyntaxGenerator.js @@ -910,9 +910,9 @@ var definitions = [ baseType: 'ISyntaxNode', interfaces: ['IModuleReferenceSyntax'], children: [ - { name: 'requireKeyword', isToken: true, tokenKinds: ['RequireKeyword'], excludeFromAST: true }, + { name: 'requireKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, - { name: 'stringLiteral', isToken: true, tokenKinds: ['StringLiteral'] }, + { name: 'stringLiteral', isToken: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true } ], isTypeScriptSpecific: true @@ -933,7 +933,7 @@ var definitions = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'importKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'equalsToken', isToken: true, excludeFromAST: true }, { name: 'moduleReference', type: 'IModuleReferenceSyntax' }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } @@ -947,7 +947,7 @@ var definitions = [ children: [ { name: 'exportKeyword', isToken: true, excludeFromAST: true }, { name: 'equalsToken', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ], isTypeScriptSpecific: true @@ -959,7 +959,7 @@ var definitions = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'classKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeParameterList', type: 'TypeParameterListSyntax', isOptional: true }, { name: 'heritageClauses', isList: true, elementType: 'HeritageClauseSyntax' }, { name: 'openBraceToken', isToken: true, excludeFromAST: true }, @@ -975,7 +975,7 @@ var definitions = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'interfaceKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeParameterList', type: 'TypeParameterListSyntax', isOptional: true }, { name: 'heritageClauses', isList: true, elementType: 'HeritageClauseSyntax' }, { name: 'body', type: 'ObjectTypeSyntax' } @@ -1012,7 +1012,8 @@ var definitions = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true }, { name: 'functionKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'identifier', isToken: true }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'body', type: 'BlockSyntax | ISyntaxToken', isOptional: true } ] @@ -1116,7 +1117,7 @@ var definitions = [ children: [ { name: 'left', type: 'INameSyntax' }, { name: 'dotToken', isToken: true, excludeFromAST: true }, - { name: 'right', isToken: true, tokenKinds: ['IdentifierName'] } + { name: 'right', isToken: true } ], isTypeScriptSpecific: true }, @@ -1255,7 +1256,7 @@ var definitions = [ children: [ { name: 'dotDotDotToken', isToken: true, isOptional: true, isTypeScriptSpecific: true }, { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'questionToken', isToken: true, isOptional: true, isTypeScriptSpecific: true }, { name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecific: true }, { name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true, isTypeScriptSpecific: true } @@ -1268,7 +1269,7 @@ var definitions = [ children: [ { name: 'expression', type: 'ILeftHandSideExpressionSyntax' }, { name: 'dotToken', isToken: true, excludeFromAST: true }, - { name: 'name', isToken: true, tokenKinds: ['IdentifierName'] } + { name: 'name', isToken: true } ] }, { @@ -1434,7 +1435,7 @@ var definitions = [ name: 'TypeParameterSyntax', baseType: 'ISyntaxNode', children: [ - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'constraint', type: 'ConstraintSyntax', isOptional: true } ], isTypeScriptSpecific: true @@ -1496,6 +1497,7 @@ var definitions = [ interfaces: ['IMemberDeclarationSyntax'], children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, + { name: 'asterixToken', isToken: true, isOptional: true }, { name: 'propertyName', type: 'IPropertyNameSyntax' }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'body', type: 'BlockSyntax | ISyntaxToken', isOptional: true } @@ -1620,7 +1622,7 @@ var definitions = [ interfaces: ['IStatementSyntax'], children: [ { name: 'breakKeyword', isToken: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ] }, @@ -1630,7 +1632,7 @@ var definitions = [ interfaces: ['IStatementSyntax'], children: [ { name: 'continueKeyword', isToken: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ] }, @@ -1642,9 +1644,9 @@ var definitions = [ { name: 'forKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, { name: 'initializer', type: 'VariableDeclarationSyntax | IExpressionSyntax', isOptional: true }, - { name: 'firstSemicolonToken', isToken: true, tokenKinds: ['SemicolonToken'], excludeFromAST: true }, + { name: 'firstSemicolonToken', isToken: true, excludeFromAST: true }, { name: 'condition', type: 'IExpressionSyntax', isOptional: true }, - { name: 'secondSemicolonToken', isToken: true, tokenKinds: ['SemicolonToken'], excludeFromAST: true }, + { name: 'secondSemicolonToken', isToken: true, excludeFromAST: true }, { name: 'incrementor', type: 'IExpressionSyntax', isOptional: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true }, { name: 'statement', type: 'IStatementSyntax' } @@ -1695,7 +1697,7 @@ var definitions = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'enumKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'openBraceToken', isToken: true, excludeFromAST: true }, { name: 'enumElements', isSeparatedList: true, elementType: 'EnumElementSyntax' }, { name: 'closeBraceToken', isToken: true, excludeFromAST: true } @@ -1768,7 +1770,8 @@ var definitions = [ interfaces: ['IPrimaryExpressionSyntax'], children: [ { name: 'functionKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'block', type: 'BlockSyntax' } ] @@ -1798,7 +1801,7 @@ var definitions = [ children: [ { name: 'catchKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecified: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true }, { name: 'block', type: 'BlockSyntax' } @@ -1817,7 +1820,7 @@ var definitions = [ baseType: 'ISyntaxNode', interfaces: ['IStatementSyntax'], children: [ - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'colonToken', isToken: true, excludeFromAST: true }, { name: 'statement', type: 'IStatementSyntax' } ] diff --git a/src/services/syntax/SyntaxGenerator.js.map b/src/services/syntax/SyntaxGenerator.js.map index 25ccc01b526..73ac977c065 100644 --- a/src/services/syntax/SyntaxGenerator.js.map +++ b/src/services/syntax/SyntaxGenerator.js.map @@ -3,6 +3,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< Updated upstream {"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACnDA,UAAUA,CAACA,IAAIA,GAAGA,CAACA,CAAUA;QAE7BA,IAAIA,YAAYA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACrDA,YAAYA,CAACA,IAAIA,GAAGA,CAACA,CAAYA;QAEjCA,IAAIA,IAAIA,GAAaA,EAAEA,CAACA;QACxBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChDA,IAAIA,CAACA,CAACA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACxCA,CAACA;QAEDA,SAASA,QAAQA,CAACA,QAAgBA,EAAEA,QAAiBA;YACjDC,EAAEA,CAACA,CAACA,CAACA,GAAGA,CAACA,UAAUA,CAACA,QAAQA,CAACA,CAACA,CAACA,CAACA;gBAC5BA,MAAMA,CAACA,SAASA,CAACA;YACrBA,CAACA;YACDA,UAAUA,CAACA,I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CAACA,MAAMA,CAACA;YACxBA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,CAACA,CAACA,CAACA;gBAGvDA,GAAGA,IAAIA,CAACA,CAACA,CAACA;gBACVA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,GAAGA,EAAEA,CAACA,IAAIA,CAACA,EAAEA,CAACA;oBAC9BA,IAAIA,IAAIA,GAAGA,MAAMA,CAACA,CAACA,CAACA,CAACA;oBACrBA,MAAMA,CAACA,CAACA,CAACA,GAAGA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA;oBAC1BA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,IAAIA,CAACA;gBACzBA,CAACA;gBACDA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,SAASA,EAAEA,CAACA,CAACA,CAACA;YACzCA,CAACA;YACDA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,CAACA,CAACA,CAACA;gBAEvDA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,SAASA,EAAEA,CAACA,CAACA,CAACA;YACzCA,CAACA;YACDA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,CAACA,CAACA,CAACA;gBAE7EA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,MAAMA,EAAEA,CAACA,CAACA,CAACA;YACtCA,CAACA;YAEDA,MAAM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AC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,oDAAoD,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/G,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,qDAAqD,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} ======= @@ -23,3 +24,6 @@ ======= {"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACnDA,UAAUA,CAACA,IAAIA,GAAGA,CAACA,CA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4DAA4D,EAAE,mBAAmB,EAAE,KAAK,CAAC,CAAC;AACpI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,oDAAoD,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/G,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,qDAAqD,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} >>>>>>> 6d94dc3... Body is optional. +======= +{"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA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BA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,MAAMA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;oBACrCA,EAAEA,CAACA,CAACA,QAAQA,CAACA,MAAMA,CAACA,CAACA,CAACA,EAAEA,OAAOA,CAACA,CAACA,CAACA,CAACA;wBAC/BA,KAAKA,CAACA;oBACVA,CAACA;gBACLA,CAACA;gBAEDA,EAAEA,CAACA,CAACA,CAACA,KAAKA,MAAMA,CAACA,MAAMA,CAACA,CAACA,CAACA;oBACtBA,MAAMA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA;gBACzBA,CAACA;YACLA,CAACA;YAEDA,MAAMA,CAACA,MAAMA,CAACA;QAClBA,CAACA;QAEaJ,mBAAIA,GAAlBA,UAAsBA,KAAUA;YAC5BK,EAAEA,CAACA,CAACA,KAAKA,CAACA,MAAMA,KAAKA,CAACA,CAACA,CAACA,CAACA;gBACrBA,MAAMA,iBAAMA,CAACA,kBAAkBA,CAACA,OAAOA,CAACA,CAACA;YAC7CA,CAACA;YAEDA,MAAMA,CAACA,KAAKA,CAACA,KAAKA,CAACA,MAAMA,GAAGA,CAACA,CAACA,CAACA;QACnCA,CAACA;QAEaL,4BAAaA,GAA3BA,UAA+BA,KAAUA,EAAEA,SAA2CA;YAClFM,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,KAAKA,CAACA,MAAMA,GAAGA,CAACA,EAAEA,CAACA,IAAIA,CAACA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBACzCA,IAAIA,CAACA,GAAGA,KAAKA,CAACA,CAACA,CAACA,CAACA;gBACjBA,EAAEA,CAACA,CAACA,SAASA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA,CAACA,CAACA;oBAClBA,MAAMA,CAACA,CAACA,CAACA;gBACbA,CAACA;YACLA,CAACA;YAEDA,MAAMA,CAACA,SAASA,CAACA;QACrBA,CAACA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,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,qDAAqD,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} +>>>>>>> f4fb252... Add support for parsing generator declarations. diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index 7249afd7328..ee7046a3827 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -163,6 +163,7 @@ module TypeScript.Parser { // all nodes would need extra state on them to store this info. var strictMode: boolean = false; var disallowIn: boolean = false; + var allowYield: boolean = false; // Current state of the parser. If we need to rewind we will store and reset these values as // appropriate. @@ -957,8 +958,9 @@ module TypeScript.Parser { if (isModifierKind(token.kind)) { // These are modifiers only if we see an actual keyword, identifier, string literal // or number following. - // Note: we also allow [ for error conditions. - // [ is for: static [a: number] + // + // [ is for: static [a: number] ... + // [ is for: static [computedProp()] ... var nextToken = peekToken(index + 1); var nextTokenKind = nextToken.kind; @@ -967,6 +969,8 @@ module TypeScript.Parser { case SyntaxKind.OpenBracketToken: case SyntaxKind.NumericLiteral: case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateToken: + case SyntaxKind.AsteriskToken: return true; default: return SyntaxFacts.isAnyKeyword(nextTokenKind); @@ -1079,12 +1083,29 @@ module TypeScript.Parser { } function isMemberVariableOrFunctionDeclaration(peekIndex: number, inErrorRecovery: boolean) { + var tokenN = peekToken(peekIndex); + var tokenNKind = tokenN.kind; + + // If we have a '*', then this is a generator function. + if (tokenNKind === SyntaxKind.AsteriskToken) { + if (inErrorRecovery) { + // If we're in error recovery, we might see a random * that is part of some + // expression. Really, in order to view this as a generator function, we want + // to see at least '*id<' or '*id('. Otherwise, we won't think of this as the + // start of a member variable/function. + return peekToken(peekIndex + 1).kind === SyntaxKind.IdentifierName && + (peekToken(peekIndex + 2).kind === SyntaxKind.LessThanToken || peekToken(peekIndex + 2).kind === SyntaxKind.OpenParenToken); + } + + return true; + } + // Check if its the start of a property or method. Both must start with a property name. if (!isPropertyName(peekIndex, inErrorRecovery)) { return false; } - if (!SyntaxFacts.isAnyKeyword(peekToken(peekIndex).kind)) { + if (!SyntaxFacts.isAnyKeyword(tokenNKind)) { // It wasn't a keyword. So this is definitely a member variable or function. return true; } @@ -1138,10 +1159,15 @@ module TypeScript.Parser { } else if (isMemberVariableOrFunctionDeclaration(/*peekIndex:*/ _modifierCount, inErrorRecovery)) { var modifiers = parseModifiers(); + var asterixToken = tryEatToken(SyntaxKind.AsteriskToken); var propertyName = parsePropertyName(); - if (isCallSignature(/*peekIndex:*/ 0)) { - return parseMemberFunctionDeclaration(modifiers, propertyName); + // If we got a '*', then this is definitely a method. If we didn't get a '*', then + // we must have gotten a property name. And if that's all we have, we have to check + // if we have a call signature. If so, then this is a member function, otherwise + // it's a member variable. + if (asterixToken || isCallSignature(/*peekIndex:*/ 0)) { + return parseMemberFunctionDeclaration(modifiers, asterixToken, propertyName); } else { return parseMemberVariableDeclaration(modifiers, propertyName); @@ -1171,12 +1197,13 @@ module TypeScript.Parser { isBlockOrArrow() ? parseFunctionBlock() : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } - function parseMemberFunctionDeclaration(modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax): MemberFunctionDeclarationSyntax { + function parseMemberFunctionDeclaration(modifiers: ISyntaxToken[], asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax): MemberFunctionDeclarationSyntax { // Note: if we see an arrow after the close paren, then try to parse out a function // block anyways. It's likely the user just though '=> expr' was legal anywhere a // block was legal. return new MemberFunctionDeclarationSyntax(parseNodeData, modifiers, + asterixToken, propertyName, parseCallSignature(/*requireCompleteTypeParameterList:*/ false), isBlockOrArrow() ? parseFunctionBlock() : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); @@ -1211,6 +1238,7 @@ module TypeScript.Parser { return new FunctionDeclarationSyntax(parseNodeData, parseModifiers(), eatToken(SyntaxKind.FunctionKeyword), + tryEatToken(SyntaxKind.AsteriskToken), eatIdentifierToken(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), isBlockOrArrow() ? parseFunctionBlock() : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); @@ -2797,7 +2825,9 @@ module TypeScript.Parser { function parseFunctionExpression(functionKeyword: ISyntaxToken): FunctionExpressionSyntax { return new FunctionExpressionSyntax(parseNodeData, - consumeToken(functionKeyword), eatOptionalIdentifierToken(), + consumeToken(functionKeyword), + tryEatToken(SyntaxKind.AsteriskToken), + eatOptionalIdentifierToken(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), parseFunctionBlock()); } @@ -3271,10 +3301,13 @@ module TypeScript.Parser { // If it was a keyword, convert it to an identifier name. return eatIdentifierNameToken(); } - else { + else if (isLiteralPropertyName(_currentToken)) { // Must have been a literal. return consumeToken(_currentToken); } + else { + return eatIdentifierToken(); + } } function parseComputedPropertyName(openBracketToken: ISyntaxToken): ComputedPropertyNameSyntax { diff --git a/src/services/syntax/syntaxGenerator.ts b/src/services/syntax/syntaxGenerator.ts index ef758782a07..1f20bedd4b5 100644 --- a/src/services/syntax/syntaxGenerator.ts +++ b/src/services/syntax/syntaxGenerator.ts @@ -23,7 +23,6 @@ interface IMemberDefinition { isSeparatedList?: boolean; requiresAtLeastOneItem?: boolean; isOptional?: boolean; - tokenKinds?: string[]; isTypeScriptSpecific: boolean; elementType?: string; } @@ -56,9 +55,9 @@ var definitions:ITypeDefinition[] = [ baseType: 'ISyntaxNode', interfaces: ['IModuleReferenceSyntax'], children: [ - { name: 'requireKeyword', isToken: true, tokenKinds: ['RequireKeyword'], excludeFromAST: true }, + { name: 'requireKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, - { name: 'stringLiteral', isToken: true, tokenKinds: ['StringLiteral'] }, + { name: 'stringLiteral', isToken: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true } ], isTypeScriptSpecific: true @@ -79,7 +78,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'importKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'equalsToken', isToken: true, excludeFromAST: true }, { name: 'moduleReference', type: 'IModuleReferenceSyntax' }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } @@ -93,7 +92,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'exportKeyword', isToken: true, excludeFromAST: true }, { name: 'equalsToken', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ], isTypeScriptSpecific: true @@ -105,7 +104,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'classKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeParameterList', type: 'TypeParameterListSyntax', isOptional: true }, { name: 'heritageClauses', isList: true, elementType: 'HeritageClauseSyntax' }, { name: 'openBraceToken', isToken: true, excludeFromAST: true }, @@ -121,7 +120,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'interfaceKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeParameterList', type: 'TypeParameterListSyntax', isOptional: true }, { name: 'heritageClauses', isList: true, elementType: 'HeritageClauseSyntax' }, { name: 'body', type: 'ObjectTypeSyntax' } @@ -158,7 +157,8 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true }, { name: 'functionKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'identifier', isToken: true }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'body', type: 'BlockSyntax | ISyntaxToken', isOptional: true } ] @@ -262,7 +262,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'left', type: 'INameSyntax' }, { name: 'dotToken', isToken: true, excludeFromAST: true }, - { name: 'right', isToken: true, tokenKinds:['IdentifierName'] } + { name: 'right', isToken: true } ], // Qualified names only show up in Types, which are TypeScript specific. Note that a dotted // expression (like A.B.Foo()) is a MemberAccessExpression, not a QualifiedName. @@ -403,7 +403,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'dotDotDotToken', isToken: true, isOptional: true, isTypeScriptSpecific: true }, { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'questionToken', isToken: true, isOptional: true, isTypeScriptSpecific: true }, { name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecific: true }, { name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true, isTypeScriptSpecific: true } @@ -416,7 +416,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'expression', type: 'ILeftHandSideExpressionSyntax' }, { name: 'dotToken', isToken: true, excludeFromAST: true }, - { name: 'name', isToken: true, tokenKinds: ['IdentifierName'] } + { name: 'name', isToken: true } ] }, { @@ -582,7 +582,7 @@ var definitions:ITypeDefinition[] = [ name: 'TypeParameterSyntax', baseType: 'ISyntaxNode', children: [ - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'constraint', type: 'ConstraintSyntax', isOptional: true } ], isTypeScriptSpecific: true @@ -645,6 +645,7 @@ var definitions:ITypeDefinition[] = [ interfaces: ['IMemberDeclarationSyntax'], children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, + { name: 'asterixToken', isToken: true, isOptional: true }, { name: 'propertyName', type: 'IPropertyNameSyntax' }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'body', type: 'BlockSyntax | ISyntaxToken', isOptional: true } @@ -769,7 +770,7 @@ var definitions:ITypeDefinition[] = [ interfaces: ['IStatementSyntax'], children: [ { name: 'breakKeyword', isToken: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ] }, @@ -779,7 +780,7 @@ var definitions:ITypeDefinition[] = [ interfaces: ['IStatementSyntax'], children: [ { name: 'continueKeyword', isToken: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ] }, @@ -791,9 +792,9 @@ var definitions:ITypeDefinition[] = [ { name: 'forKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, { name: 'initializer', type: 'VariableDeclarationSyntax | IExpressionSyntax', isOptional: true }, - { name: 'firstSemicolonToken', isToken: true, tokenKinds: ['SemicolonToken'], excludeFromAST: true }, + { name: 'firstSemicolonToken', isToken: true, excludeFromAST: true }, { name: 'condition', type: 'IExpressionSyntax', isOptional: true }, - { name: 'secondSemicolonToken', isToken: true, tokenKinds: ['SemicolonToken'], excludeFromAST: true }, + { name: 'secondSemicolonToken', isToken: true, excludeFromAST: true }, { name: 'incrementor', type: 'IExpressionSyntax', isOptional: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true }, { name: 'statement', type: 'IStatementSyntax' } @@ -844,7 +845,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'enumKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'openBraceToken', isToken: true, excludeFromAST: true }, { name: 'enumElements', isSeparatedList: true, elementType: 'EnumElementSyntax' }, { name: 'closeBraceToken', isToken: true, excludeFromAST: true } @@ -917,7 +918,8 @@ var definitions:ITypeDefinition[] = [ interfaces: ['IPrimaryExpressionSyntax'], children: [ { name: 'functionKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'block', type: 'BlockSyntax' }] }, @@ -944,7 +946,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'catchKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecified: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true }, { name: 'block', type: 'BlockSyntax' }] @@ -961,7 +963,7 @@ var definitions:ITypeDefinition[] = [ baseType: 'ISyntaxNode', interfaces: ['IStatementSyntax'], children: [ - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'colonToken', isToken: true, excludeFromAST: true }, { name: 'statement', type: 'IStatementSyntax' }] }, diff --git a/src/services/syntax/syntaxInterfaces.generated.ts b/src/services/syntax/syntaxInterfaces.generated.ts index 256a5aeb1de..930c097c0f7 100644 --- a/src/services/syntax/syntaxInterfaces.generated.ts +++ b/src/services/syntax/syntaxInterfaces.generated.ts @@ -92,11 +92,12 @@ module TypeScript { export interface FunctionDeclarationSyntax extends ISyntaxNode, IStatementSyntax { modifiers: ISyntaxToken[]; functionKeyword: ISyntaxToken; + asterixToken: ISyntaxToken; identifier: ISyntaxToken; callSignature: CallSignatureSyntax; body: BlockSyntax | ISyntaxToken; } - export interface FunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken): FunctionDeclarationSyntax } + export interface FunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, asterixToken: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken): FunctionDeclarationSyntax } export interface ModuleDeclarationSyntax extends ISyntaxNode, IModuleElementSyntax { modifiers: ISyntaxToken[]; @@ -150,11 +151,12 @@ module TypeScript { export interface MemberFunctionDeclarationSyntax extends ISyntaxNode, IMemberDeclarationSyntax { modifiers: ISyntaxToken[]; + asterixToken: ISyntaxToken; propertyName: IPropertyNameSyntax; callSignature: CallSignatureSyntax; body: BlockSyntax | ISyntaxToken; } - export interface MemberFunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken): MemberFunctionDeclarationSyntax } + export interface MemberFunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken): MemberFunctionDeclarationSyntax } export interface MemberVariableDeclarationSyntax extends ISyntaxNode, IMemberDeclarationSyntax { modifiers: ISyntaxToken[]; @@ -498,11 +500,12 @@ module TypeScript { export interface FunctionExpressionSyntax extends ISyntaxNode, IPrimaryExpressionSyntax { functionKeyword: ISyntaxToken; + asterixToken: ISyntaxToken; identifier: ISyntaxToken; callSignature: CallSignatureSyntax; block: BlockSyntax; } - export interface FunctionExpressionConstructor { new (data: number, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionExpressionSyntax } + export interface FunctionExpressionConstructor { new (data: number, functionKeyword: ISyntaxToken, asterixToken: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionExpressionSyntax } export interface OmittedExpressionSyntax extends ISyntaxNode, IExpressionSyntax { } diff --git a/src/services/syntax/syntaxNodes.concrete.generated.ts b/src/services/syntax/syntaxNodes.concrete.generated.ts index b167277a5ec..02e4767ad01 100644 --- a/src/services/syntax/syntaxNodes.concrete.generated.ts +++ b/src/services/syntax/syntaxNodes.concrete.generated.ts @@ -238,28 +238,31 @@ module TypeScript { } } - export var FunctionDeclarationSyntax: FunctionDeclarationConstructor = function(data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken) { + export var FunctionDeclarationSyntax: FunctionDeclarationConstructor = function(data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, asterixToken: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken) { if (data) { this.__data = data; } this.modifiers = modifiers, this.functionKeyword = functionKeyword, + this.asterixToken = asterixToken, this.identifier = identifier, this.callSignature = callSignature, this.body = body, modifiers.parent = this, functionKeyword.parent = this, + asterixToken && (asterixToken.parent = this), identifier.parent = this, callSignature.parent = this, body && (body.parent = this); }; FunctionDeclarationSyntax.prototype.kind = SyntaxKind.FunctionDeclaration; - FunctionDeclarationSyntax.prototype.childCount = 5; + FunctionDeclarationSyntax.prototype.childCount = 6; FunctionDeclarationSyntax.prototype.childAt = function(index: number): ISyntaxElement { switch (index) { case 0: return this.modifiers; case 1: return this.functionKeyword; - case 2: return this.identifier; - case 3: return this.callSignature; - case 4: return this.body; + case 2: return this.asterixToken; + case 3: return this.identifier; + case 4: return this.callSignature; + case 5: return this.body; } } @@ -403,25 +406,28 @@ module TypeScript { } } - export var MemberFunctionDeclarationSyntax: MemberFunctionDeclarationConstructor = function(data: number, modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken) { + export var MemberFunctionDeclarationSyntax: MemberFunctionDeclarationConstructor = function(data: number, modifiers: ISyntaxToken[], asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken) { if (data) { this.__data = data; } this.modifiers = modifiers, + this.asterixToken = asterixToken, this.propertyName = propertyName, this.callSignature = callSignature, this.body = body, modifiers.parent = this, + asterixToken && (asterixToken.parent = this), propertyName.parent = this, callSignature.parent = this, body && (body.parent = this); }; MemberFunctionDeclarationSyntax.prototype.kind = SyntaxKind.MemberFunctionDeclaration; - MemberFunctionDeclarationSyntax.prototype.childCount = 4; + MemberFunctionDeclarationSyntax.prototype.childCount = 5; MemberFunctionDeclarationSyntax.prototype.childAt = function(index: number): ISyntaxElement { switch (index) { case 0: return this.modifiers; - case 1: return this.propertyName; - case 2: return this.callSignature; - case 3: return this.body; + case 1: return this.asterixToken; + case 2: return this.propertyName; + case 3: return this.callSignature; + case 4: return this.body; } } @@ -1355,25 +1361,28 @@ module TypeScript { } } - export var FunctionExpressionSyntax: FunctionExpressionConstructor = function(data: number, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) { + export var FunctionExpressionSyntax: FunctionExpressionConstructor = function(data: number, functionKeyword: ISyntaxToken, asterixToken: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) { if (data) { this.__data = data; } this.functionKeyword = functionKeyword, + this.asterixToken = asterixToken, this.identifier = identifier, this.callSignature = callSignature, this.block = block, functionKeyword.parent = this, + asterixToken && (asterixToken.parent = this), identifier && (identifier.parent = this), callSignature.parent = this, block.parent = this; }; FunctionExpressionSyntax.prototype.kind = SyntaxKind.FunctionExpression; - FunctionExpressionSyntax.prototype.childCount = 4; + FunctionExpressionSyntax.prototype.childCount = 5; FunctionExpressionSyntax.prototype.childAt = function(index: number): ISyntaxElement { switch (index) { case 0: return this.functionKeyword; - case 1: return this.identifier; - case 2: return this.callSignature; - case 3: return this.block; + case 1: return this.asterixToken; + case 2: return this.identifier; + case 3: return this.callSignature; + case 4: return this.block; } } diff --git a/src/services/syntax/syntaxWalker.generated.ts b/src/services/syntax/syntaxWalker.generated.ts index ae28243793a..9ece5bd680f 100644 --- a/src/services/syntax/syntaxWalker.generated.ts +++ b/src/services/syntax/syntaxWalker.generated.ts @@ -97,6 +97,7 @@ module TypeScript { public visitFunctionDeclaration(node: FunctionDeclarationSyntax): void { this.visitList(node.modifiers); this.visitToken(node.functionKeyword); + this.visitOptionalToken(node.asterixToken); this.visitToken(node.identifier); visitNodeOrToken(this, node.callSignature); visitNodeOrToken(this, node.body); @@ -149,6 +150,7 @@ module TypeScript { public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void { this.visitList(node.modifiers); + this.visitOptionalToken(node.asterixToken); visitNodeOrToken(this, node.propertyName); visitNodeOrToken(this, node.callSignature); visitNodeOrToken(this, node.body); @@ -451,6 +453,7 @@ module TypeScript { public visitFunctionExpression(node: FunctionExpressionSyntax): void { this.visitToken(node.functionKeyword); + this.visitOptionalToken(node.asterixToken); this.visitOptionalToken(node.identifier); visitNodeOrToken(this, node.callSignature); visitNodeOrToken(this, node.block); From 6895efc7c551e5a4f70b4aae1b161e14dfa66cba Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 11 Nov 2014 17:04:18 -0800 Subject: [PATCH 090/154] Function property assignments can also be generators. Conflicts: src/services/syntax/SyntaxGenerator.js.map --- src/services/syntax/SyntaxGenerator.js | 1 + src/services/syntax/SyntaxGenerator.js.map | 4 ++++ src/services/syntax/parser.ts | 15 ++++++++++----- src/services/syntax/syntaxGenerator.ts | 1 + src/services/syntax/syntaxInterfaces.generated.ts | 3 ++- .../syntax/syntaxNodes.concrete.generated.ts | 13 ++++++++----- src/services/syntax/syntaxWalker.generated.ts | 1 + 7 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/services/syntax/SyntaxGenerator.js b/src/services/syntax/SyntaxGenerator.js index df5916efb44..9e53d216b1d 100644 --- a/src/services/syntax/SyntaxGenerator.js +++ b/src/services/syntax/SyntaxGenerator.js @@ -1759,6 +1759,7 @@ var definitions = [ baseType: 'ISyntaxNode', interfaces: ['IPropertyAssignmentSyntax'], children: [ + { name: 'asterixToken', isToken: true, isOptional: true }, { name: 'propertyName', type: 'IPropertyNameSyntax' }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'block', type: 'BlockSyntax' } diff --git a/src/services/syntax/SyntaxGenerator.js.map b/src/services/syntax/SyntaxGenerator.js.map index 73ac977c065..13be58b4e41 100644 --- a/src/services/syntax/SyntaxGenerator.js.map +++ b/src/services/syntax/SyntaxGenerator.js.map @@ -4,6 +4,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< Updated upstream {"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,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S,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} ======= @@ -27,3 +28,6 @@ ======= {"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACnDA,UAAUA,CAACA,IAAIA,GAAGA,CAACA,CAAUA;QAE7BA,IAAIA,YAAYA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACrDA,YAAYA,CAACA,IAAIA,GAAGA,CAACA,CAAYA;QAEjCA,IAAIA,IAAIA,GAAaA,EAAEA,CAACA;QACxBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChDA,IAAIA,CAACA,CAACA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACxCA,CAACA;QAEDA,SAAS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UA,CAACA,QAAQA,CAACA,CAACA,CAACA,CAACA;gBAC5BA,MAAMA,CAACA,SAASA,CAACA;YACrBA,CAACA;YACDA,IAAIA,MAAMA,GAAGA,GAAGA,CAACA,YAAYA,CAACA,QAAQA,CAACA,CAACA;YACxCA,IAAIA,GAAGA,GAAGA,MAAMA,CAACA,MAAMA,CAACA;YACxBA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,CAACA,CAACA,CAACA;gBAGvDA,GAAGA,IAAIA,CAACA,CAACA,CAACA;gBACVA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,GAAGA,EAAEA,CAACA,IAAIA,CAACA,EAAEA,CAACA;oBAC9BA,IAAIA,IAAIA,GAAGA,MAAMA,CAACA,CAACA,CAACA,CAACA;oBACrBA,MAAMA,CAACA,CAACA,CAACA,GAAGA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA;oBAC1BA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,IAAIA,CAACA;gBACzBA,CAACA;gBACDA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,SAASA,EAAEA,CAACA,CAACA,CAACA;YACzCA,CAACA;YACDA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,CAACA,CAACA,CAACA;gBAEvDA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,SAASA,EAAEA,CAACA,CAACA,CAACA;YACzCA,CAACA;YACDA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,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I,mBAAmB,GAAG,aAAa,EAAE,CAAC;AAC1C,IAAI,gBAAgB,GAAG,wBAAwB,EAAE,CAAC;AAClD,IAAI,MAAM,GAAG,cAAc,EAAE,CAAC;AAC9B,IAAI,gBAAgB,GAAG,wBAAwB,EAAE,CAAC;AAClD,IAAI,OAAO,GAAG,eAAe,EAAE,CAAC;AAChC,IAAI,SAAS,GAAG,iBAAiB,EAAE,CAAC;AAEpC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,4DAA4D,EAAE,mBAAmB,EAAE,KAAK,CAAC,CAAC;AACpI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,oDAAoD,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/G,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,qDAAqD,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} >>>>>>> f4fb252... Add support for parsing generator declarations. +======= +{"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACnDA,UAAUA,CAACA,IAAIA,GAAGA,CAACA,CAAUA;QAE7BA,IAAIA,YAAYA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACrDA,YAAYA,CAACA,IAAIA,GAAGA,CAACA,CAAYA;QAEjCA,IAAIA,IAAIA,GAAaA,EAAEA,CAACA;QACxBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChDA,IAAIA,CAACA,CAACA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACxCA,CAACA;QAEDA,SAASA,QAAQA,CAACA,QAAgBA,EAAEA,QAAiBA;YACjDC,EAAEA,CAACA,CAACA,CAACA,GAAGA,CAACA,UAAUA,CAACA,QAAQA,CAACA,CAACA,CAACA,CAACA;gBAC5BA,MAAMA,CAACA,SAASA,CAACA;YACrBA,CAACA;YACDA,UAAUA,CAACA,IAAIA,EAAEA,CAACA;YAClBA,IAAAA,CAACA;gBACGA,EAAEA,CAACA,CAACA,QAAQA,CAACA,CAACA,CAACA;oBACXA,UAAUA,CAACA,OAAOA,GAAGA,QAAQA,CAACA;oBAC9BA,UAAUA,CAACA,YAAYA,CAACA,QAAQA,CAACA,CAACA;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IAAIA,CAACA,CAACA,CAACA;gBACVA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,GAAGA,EAAEA,CAACA,IAAIA,CAACA,EAAEA,CAACA;oBAC9BA,IAAIA,IAAIA,GAAGA,MAAMA,CAACA,CAACA,CAACA,CAACA;oBACrBA,MAAMA,CAACA,CAACA,CAACA,GAAGA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA;oBAC1BA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,IAAIA,CAACA;gBACzBA,CAACA;gBACDA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,SAASA,EAAEA,CAACA,CAACA,CAACA;YACzCA,CAACA;YACDA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,CAACA,CAACA,CAACA;gBAEvDA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,SAASA,EAAEA,CAACA,CAACA,CAACA;YACzCA,CAACA;YACDA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,CAACA,CAACA,CAACA;gBAE7EA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,MAAMA,EAAEA,CAACA,CAACA,CAACA;YACtCA,CAACA;YAEDA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,MAAMA,CAACA,CAACA;QACnCA,CAACA;QAEDD,SAASA,SAASA,CAACA,QAAgBA,EAAEA,IAAYA,EAAEA,kBAA4BA;YAE3EE,EAAEA,CAACA,CAACA,kBAAkBA,CAACA,CAACA,CAACA;gBACrBA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B,EAAE,GAAG,4DAA4D,EAAE,mBAAmB,EAAE,KAAK,CAAC,CAAC;AACpI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,oDAAoD,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/G,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,qDAAqD,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} +>>>>>>> a5407f9... Function property assignments can also be generators. diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index ee7046a3827..ac89ca4fce9 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -3217,16 +3217,19 @@ module TypeScript.Parser { } } - // All the rest of the property assignments start with property names. They are: + // All the rest of the property assignments start with property names or an asterix token. They are: // id: e // [e1]: e2 // id() { } // [e]() { } - if (isPropertyName(/*peekIndex:*/ 0, inErrorRecovery)) { + // *id() { } + // *[e]() { } + if (_currentToken.kind === SyntaxKind.AsteriskToken || isPropertyName(/*peekIndex:*/ 0, inErrorRecovery)) { + var asterixToken = tryEatToken(SyntaxKind.AsteriskToken); var propertyName = parsePropertyName(); - if (isCallSignature(/*peekIndex:*/ 0)) { - return parseFunctionPropertyAssignment(propertyName); + if (asterixToken !== undefined || isCallSignature(/*peekIndex:*/ 0)) { + return parseFunctionPropertyAssignment(asterixToken, propertyName); } else { // PropertyName[?Yield] : AssignmentExpression[In, ?Yield] @@ -3249,6 +3252,7 @@ module TypeScript.Parser { function isPropertyAssignment(inErrorRecovery: boolean): boolean { return isAccessor(modifierCount(), inErrorRecovery) || + currentToken().kind === SyntaxKind.AsteriskToken || isPropertyName(/*peekIndex:*/ 0, inErrorRecovery); } @@ -3320,8 +3324,9 @@ module TypeScript.Parser { eatToken(SyntaxKind.CloseBracketToken)); } - function parseFunctionPropertyAssignment(propertyName: IPropertyNameSyntax): FunctionPropertyAssignmentSyntax { + function parseFunctionPropertyAssignment(asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax): FunctionPropertyAssignmentSyntax { return new FunctionPropertyAssignmentSyntax(parseNodeData, + asterixToken, propertyName, parseCallSignature(/*requireCompleteTypeParameterList:*/ false), parseFunctionBlock()); diff --git a/src/services/syntax/syntaxGenerator.ts b/src/services/syntax/syntaxGenerator.ts index 1f20bedd4b5..02906241902 100644 --- a/src/services/syntax/syntaxGenerator.ts +++ b/src/services/syntax/syntaxGenerator.ts @@ -907,6 +907,7 @@ var definitions:ITypeDefinition[] = [ baseType: 'ISyntaxNode', interfaces: ['IPropertyAssignmentSyntax'], children: [ + { name: 'asterixToken', isToken: true, isOptional: true }, { name: 'propertyName', type: 'IPropertyNameSyntax' }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'block', type: 'BlockSyntax' } diff --git a/src/services/syntax/syntaxInterfaces.generated.ts b/src/services/syntax/syntaxInterfaces.generated.ts index 930c097c0f7..566de200a55 100644 --- a/src/services/syntax/syntaxInterfaces.generated.ts +++ b/src/services/syntax/syntaxInterfaces.generated.ts @@ -640,11 +640,12 @@ module TypeScript { export interface SimplePropertyAssignmentConstructor { new (data: number, propertyName: IPropertyNameSyntax, colonToken: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax } export interface FunctionPropertyAssignmentSyntax extends ISyntaxNode, IPropertyAssignmentSyntax { + asterixToken: ISyntaxToken; propertyName: IPropertyNameSyntax; callSignature: CallSignatureSyntax; block: BlockSyntax; } - export interface FunctionPropertyAssignmentConstructor { new (data: number, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax } + export interface FunctionPropertyAssignmentConstructor { new (data: number, asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax } export interface ParameterSyntax extends ISyntaxNode { dotDotDotToken: ISyntaxToken; diff --git a/src/services/syntax/syntaxNodes.concrete.generated.ts b/src/services/syntax/syntaxNodes.concrete.generated.ts index 02e4767ad01..16122835335 100644 --- a/src/services/syntax/syntaxNodes.concrete.generated.ts +++ b/src/services/syntax/syntaxNodes.concrete.generated.ts @@ -1741,22 +1741,25 @@ module TypeScript { } } - export var FunctionPropertyAssignmentSyntax: FunctionPropertyAssignmentConstructor = function(data: number, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax) { + export var FunctionPropertyAssignmentSyntax: FunctionPropertyAssignmentConstructor = function(data: number, asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax) { if (data) { this.__data = data; } + this.asterixToken = asterixToken, this.propertyName = propertyName, this.callSignature = callSignature, this.block = block, + asterixToken && (asterixToken.parent = this), propertyName.parent = this, callSignature.parent = this, block.parent = this; }; FunctionPropertyAssignmentSyntax.prototype.kind = SyntaxKind.FunctionPropertyAssignment; - FunctionPropertyAssignmentSyntax.prototype.childCount = 3; + FunctionPropertyAssignmentSyntax.prototype.childCount = 4; FunctionPropertyAssignmentSyntax.prototype.childAt = function(index: number): ISyntaxElement { switch (index) { - case 0: return this.propertyName; - case 1: return this.callSignature; - case 2: return this.block; + case 0: return this.asterixToken; + case 1: return this.propertyName; + case 2: return this.callSignature; + case 3: return this.block; } } diff --git a/src/services/syntax/syntaxWalker.generated.ts b/src/services/syntax/syntaxWalker.generated.ts index 9ece5bd680f..f37dbbe87db 100644 --- a/src/services/syntax/syntaxWalker.generated.ts +++ b/src/services/syntax/syntaxWalker.generated.ts @@ -572,6 +572,7 @@ module TypeScript { } public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): void { + this.visitOptionalToken(node.asterixToken); visitNodeOrToken(this, node.propertyName); visitNodeOrToken(this, node.callSignature); visitNodeOrToken(this, node.block); From 7ab80d260edcc36a3f5ce3c0a0e11e896f0fb640 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 11 Nov 2014 18:50:19 -0800 Subject: [PATCH 091/154] Add support for parsing yield expressions. Conflicts: src/services/syntax/SyntaxGenerator.js.map --- .../resources/diagnosticCode.generated.ts | 1 + .../diagnosticInformationMap.generated.ts | 1 + .../resources/diagnosticMessages.json | 4 + src/services/syntax/SyntaxGenerator.js | 59 +++-- src/services/syntax/SyntaxGenerator.js.map | 4 + src/services/syntax/constants.ts | 7 +- src/services/syntax/parser.ts | 213 +++++++++++++----- src/services/syntax/prettyPrinter.ts | 6 + src/services/syntax/syntaxElement.ts | 9 + src/services/syntax/syntaxGenerator.ts | 9 + .../syntax/syntaxInterfaces.generated.ts | 7 + src/services/syntax/syntaxKind.ts | 1 + .../syntax/syntaxNodes.concrete.generated.ts | 19 ++ src/services/syntax/syntaxTree.ts | 11 +- .../syntax/syntaxVisitor.generated.ts | 2 + src/services/syntax/syntaxWalker.generated.ts | 6 + 16 files changed, 279 insertions(+), 80 deletions(-) diff --git a/src/services/resources/diagnosticCode.generated.ts b/src/services/resources/diagnosticCode.generated.ts index 04359272698..1b140105b16 100644 --- a/src/services/resources/diagnosticCode.generated.ts +++ b/src/services/resources/diagnosticCode.generated.ts @@ -96,6 +96,7 @@ module TypeScript { Type_expected: "Type expected.", Template_literal_cannot_be_used_as_an_element_name: "Template literal cannot be used as an element name.", Computed_property_names_cannot_be_used_here: "Computed property names cannot be used here.", + yield_expression_must_be_contained_within_a_generator_declaration: "'yield' expression must be contained within a generator declaration.", Duplicate_identifier_0: "Duplicate identifier '{0}'.", The_name_0_does_not_exist_in_the_current_scope: "The name '{0}' does not exist in the current scope.", The_name_0_does_not_refer_to_a_value: "The name '{0}' does not refer to a value.", diff --git a/src/services/resources/diagnosticInformationMap.generated.ts b/src/services/resources/diagnosticInformationMap.generated.ts index d772d2ced82..8e911f469ef 100644 --- a/src/services/resources/diagnosticInformationMap.generated.ts +++ b/src/services/resources/diagnosticInformationMap.generated.ts @@ -98,6 +98,7 @@ module TypeScript { "Type expected.": { "code": 1110, "category": DiagnosticCategory.Error }, "Template literal cannot be used as an element name.": { "code": 1111, "category": DiagnosticCategory.Error }, "Computed property names cannot be used here.": { "code": 1112, "category": DiagnosticCategory.Error }, + "'yield' expression must be contained within a generator declaration.": { "code": 1113, "category": DiagnosticCategory.Error }, "Duplicate identifier '{0}'.": { "code": 2000, "category": DiagnosticCategory.Error }, "The name '{0}' does not exist in the current scope.": { "code": 2001, "category": DiagnosticCategory.Error }, "The name '{0}' does not refer to a value.": { "code": 2002, "category": DiagnosticCategory.Error }, diff --git a/src/services/resources/diagnosticMessages.json b/src/services/resources/diagnosticMessages.json index 06be87b172a..c238568eac6 100644 --- a/src/services/resources/diagnosticMessages.json +++ b/src/services/resources/diagnosticMessages.json @@ -379,6 +379,10 @@ "category": "Error", "code": 1112 }, + "'yield' expression must be contained within a generator declaration.": { + "category": "Error", + "code": 1113 + }, "Duplicate identifier '{0}'.": { "category": "Error", "code": 2000 diff --git a/src/services/syntax/SyntaxGenerator.js b/src/services/syntax/SyntaxGenerator.js index 9e53d216b1d..0937947c80f 100644 --- a/src/services/syntax/SyntaxGenerator.js +++ b/src/services/syntax/SyntaxGenerator.js @@ -599,30 +599,31 @@ var TypeScript; SyntaxKind[SyntaxKind["OmittedExpression"] = 187] = "OmittedExpression"; SyntaxKind[SyntaxKind["TemplateExpression"] = 188] = "TemplateExpression"; SyntaxKind[SyntaxKind["TemplateAccessExpression"] = 189] = "TemplateAccessExpression"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 190] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarator"] = 191] = "VariableDeclarator"; - SyntaxKind[SyntaxKind["ArgumentList"] = 192] = "ArgumentList"; - SyntaxKind[SyntaxKind["ParameterList"] = 193] = "ParameterList"; - SyntaxKind[SyntaxKind["TypeArgumentList"] = 194] = "TypeArgumentList"; - SyntaxKind[SyntaxKind["TypeParameterList"] = 195] = "TypeParameterList"; - SyntaxKind[SyntaxKind["HeritageClause"] = 196] = "HeritageClause"; - SyntaxKind[SyntaxKind["EqualsValueClause"] = 197] = "EqualsValueClause"; - SyntaxKind[SyntaxKind["CaseSwitchClause"] = 198] = "CaseSwitchClause"; - SyntaxKind[SyntaxKind["DefaultSwitchClause"] = 199] = "DefaultSwitchClause"; - SyntaxKind[SyntaxKind["ElseClause"] = 200] = "ElseClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 201] = "CatchClause"; - SyntaxKind[SyntaxKind["FinallyClause"] = 202] = "FinallyClause"; - SyntaxKind[SyntaxKind["TemplateClause"] = 203] = "TemplateClause"; - SyntaxKind[SyntaxKind["TypeParameter"] = 204] = "TypeParameter"; - SyntaxKind[SyntaxKind["Constraint"] = 205] = "Constraint"; - SyntaxKind[SyntaxKind["SimplePropertyAssignment"] = 206] = "SimplePropertyAssignment"; - SyntaxKind[SyntaxKind["FunctionPropertyAssignment"] = 207] = "FunctionPropertyAssignment"; - SyntaxKind[SyntaxKind["Parameter"] = 208] = "Parameter"; - SyntaxKind[SyntaxKind["EnumElement"] = 209] = "EnumElement"; - SyntaxKind[SyntaxKind["TypeAnnotation"] = 210] = "TypeAnnotation"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 211] = "ComputedPropertyName"; - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 212] = "ExternalModuleReference"; - SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 213] = "ModuleNameModuleReference"; + SyntaxKind[SyntaxKind["YieldExpression"] = 190] = "YieldExpression"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 191] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarator"] = 192] = "VariableDeclarator"; + SyntaxKind[SyntaxKind["ArgumentList"] = 193] = "ArgumentList"; + SyntaxKind[SyntaxKind["ParameterList"] = 194] = "ParameterList"; + SyntaxKind[SyntaxKind["TypeArgumentList"] = 195] = "TypeArgumentList"; + SyntaxKind[SyntaxKind["TypeParameterList"] = 196] = "TypeParameterList"; + SyntaxKind[SyntaxKind["HeritageClause"] = 197] = "HeritageClause"; + SyntaxKind[SyntaxKind["EqualsValueClause"] = 198] = "EqualsValueClause"; + SyntaxKind[SyntaxKind["CaseSwitchClause"] = 199] = "CaseSwitchClause"; + SyntaxKind[SyntaxKind["DefaultSwitchClause"] = 200] = "DefaultSwitchClause"; + SyntaxKind[SyntaxKind["ElseClause"] = 201] = "ElseClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 202] = "CatchClause"; + SyntaxKind[SyntaxKind["FinallyClause"] = 203] = "FinallyClause"; + SyntaxKind[SyntaxKind["TemplateClause"] = 204] = "TemplateClause"; + SyntaxKind[SyntaxKind["TypeParameter"] = 205] = "TypeParameter"; + SyntaxKind[SyntaxKind["Constraint"] = 206] = "Constraint"; + SyntaxKind[SyntaxKind["SimplePropertyAssignment"] = 207] = "SimplePropertyAssignment"; + SyntaxKind[SyntaxKind["FunctionPropertyAssignment"] = 208] = "FunctionPropertyAssignment"; + SyntaxKind[SyntaxKind["Parameter"] = 209] = "Parameter"; + SyntaxKind[SyntaxKind["EnumElement"] = 210] = "EnumElement"; + SyntaxKind[SyntaxKind["TypeAnnotation"] = 211] = "TypeAnnotation"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 212] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 213] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 214] = "ModuleNameModuleReference"; SyntaxKind[SyntaxKind["FirstStandardKeyword"] = SyntaxKind.BreakKeyword] = "FirstStandardKeyword"; SyntaxKind[SyntaxKind["LastStandardKeyword"] = SyntaxKind.WithKeyword] = "LastStandardKeyword"; SyntaxKind[SyntaxKind["FirstFutureReservedKeyword"] = SyntaxKind.ClassKeyword] = "FirstFutureReservedKeyword"; @@ -1867,6 +1868,16 @@ var definitions = [ { name: 'expression', type: 'IUnaryExpressionSyntax' } ] }, + { + name: 'YieldExpressionSyntax', + baseType: 'ISyntaxNode', + interfaces: ['IExpressionSyntax'], + children: [ + { name: 'yieldKeyword', isToken: true }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'expression', type: 'IExpressionSyntax', isOptional: true } + ] + }, { name: 'DebuggerStatementSyntax', baseType: 'ISyntaxNode', diff --git a/src/services/syntax/SyntaxGenerator.js.map b/src/services/syntax/SyntaxGenerator.js.map index 13be58b4e41..bd5d7bd6cb3 100644 --- a/src/services/syntax/SyntaxGenerator.js.map +++ b/src/services/syntax/SyntaxGenerator.js.map @@ -5,6 +5,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< Updated upstream {"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4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,OAAOA,GAAGA,KAAKA,CAACA,CAACA,CAACA,CAACA;gBACvBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,MAAMA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;oBACrCA,EAAEA,CAACA,CAACA,QAAQA,CAACA,MAAMA,CAACA,CAACA,CAACA,EAAEA,OAAOA,CAACA,CAACA,CAACA,CAACA;wBAC/BA,KAAKA,CAACA;oBACVA,CAACA;gBACLA,CAACA;gBAEDA,EAAEA,CAACA,CAACA,CAACA,KAAKA,MAAMA,CAACA,MAAMA,CAACA,CAACA,CAACA;oBACtBA,MAAMA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA;gBACzBA,CAACA;YACLA,CAACA;YAEDA,MAAMA,CAACA,MAAMA,CAACA;QAClBA,CAACA;QAEaJ,mBAAIA,GAAlBA,UAAsBA,KAAUA;YAC5BK,EAAEA,CAACA,CAACA,KAAKA,CAACA,MAAMA,KAAKA,CAACA,CAACA,CAACA,CAACA;gBACrBA,MAAMA,iBAAMA,CAACA,kBAAkBA,CAACA,OAAOA,CAACA,CAACA;YAC7CA,CAACA;YAEDA,MAAMA,CAACA,KAAKA,CAACA,KAAKA,CAACA,MAAMA,GAAGA,CAACA,CAACA,CAACA;QACnCA,CAACA;QAEaL,4BAAaA,GAA3BA,UAA+BA,KAAUA,EAAEA,SAA2CA;YAClFM,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,KAAKA,CAACA,MAAMA,GAAGA,CAACA,EAAEA,CAACA,IAAIA,CAACA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBACzCA,IAAIA,CAACA,GAAGA,KAAKA,CAACA,CAACA,CAACA,CAACA;gBACjBA,EAAEA,CAACA,CAACA,SAASA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA,CAACA,CAACA;oBAClBA,MAAMA,CAACA,CAACA,CAACA;gBACbA,CAACA;YACLA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iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} ======= @@ -31,3 +32,6 @@ ======= {"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACnDA,UAAUA,CAACA,IAAIA,GAAGA,CAACA,CAAUA;QAE7BA,IAAIA,YAAYA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACrDA,YAAYA,CAACA,IAAIA,GAAGA,CAACA,CAAYA;QAEjCA,IAAIA,IAAIA,GAAaA,EAAEA,CAACA;QACxBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChDA,IAAIA,CAACA,CAACA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACxCA,CAACA;QAEDA,SAASA,QAAQA,CAACA,QAAgBA,EAAEA,QAAiBA;Y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A,CAACA,MAAMA,CAACA;AAClBA,CAACA;AAED,IAAI,mBAAmB,GAAG,aAAa,EAAE,CAAC;AAC1C,IAAI,gBAAgB,GAAG,wBAAwB,EAAE,CAAC;AAClD,IAAI,MAAM,GAAG,cAAc,EAAE,CAAC;AAC9B,IAAI,gBAAgB,GAAG,wBAAwB,EAAE,CAAC;AAClD,IAAI,OAAO,GAAG,eAAe,EAAE,CAAC;AAChC,IAAI,SAAS,GAAG,iBAAiB,EAAE,CAAC;AAEpC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,4DAA4D,EAAE,mBAAmB,EAAE,KAAK,CAAC,CAAC;AACpI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,oDAAoD,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/G,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,qDAAqD,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} >>>>>>> a5407f9... Function property assignments can also be generators. +======= +{"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACnDA,UAAUA,CAACA,IAAIA,GAAGA,CAACA,CAAUA;QAE7BA,IAAIA,YAAYA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACrDA,YAAYA,CAACA,IAAIA,GAAGA,CAACA,CAAYA;QAEjCA,IAAIA,IAAIA,GAAaA,EAAEA,CAACA;QACxBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChDA,IAAIA,CAACA,CAACA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACxCA,CAACA;QAEDA,SAASA,QAAQA,CAACA,QAAgBA,EAAEA,QAAiBA;YACjDC,EAAEA,CAACA,CAACA,CAACA,GAAGA,CAACA,UAAUA,CAACA,QAAQA,CAACA,CAACA,CAACA,CAACA;gBAC5BA,MAAMA,CAACA,SAASA,CAACA;YACrBA,CAACA;YACDA,UAAUA,CAACA,IAAIA,EAAEA,CAACA;YAClBA,IAAAA,CAACA;gBACGA,EAAEA,CAACA,CAACA,QAAQA,CAACA,CAACA,CAACA;oBACXA,UAAUA,CAACA,OAAOA,GAAGA,QAAQA,CAACA;oBAC9BA,UAA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IAAIA,CAACA,CAACA,CAACA;gBAGvDA,GAAGA,IAAIA,CAACA,CAACA,CAACA;gBACVA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,GAAGA,EAAEA,CAACA,IAAIA,CAACA,EAAEA,CAACA;oBAC9BA,IAAIA,IAAIA,GAAGA,MAAMA,CAACA,CAACA,CAACA,CAACA;oBACrBA,MAAMA,CAACA,CAACA,CAACA,GAAGA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA;oBAC1BA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,IAAIA,CAACA;gBACzBA,CAACA;gBACDA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,SAASA,EAAEA,CAACA,CAACA,CAACA;YACzCA,CAACA;YACDA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,CAACA,CAACA,CAACA;gBAEvDA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,SAASA,EAAEA,CAACA,CAACA,CAACA;YACzCA,CAACA;YACDA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,IAAIA,MAAMA,CAACA,CAACA,CAACA,KAAKA,IAAIA,CAACA,CAACA,CAACA;gBAE7EA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,MAAMA,EAAEA,CAACA,CAACA,CAACA;YACtCA,CAACA;YAEDA,MAAMA,CAACA,MAAMA,CAACA,QAAQA,CAACA,MAAMA,CAACA,CAACA;QACnCA,CAACA;QAEDD,SAASA,SAASA,CAACA,QAAgBA,EAAEA,IAAYA,EAAEA,kBAA4BA;YAE3EE,EAAEA,CAACA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OAAOA,CAACA;IAElBA,MAAMA,IAAIA,OAAOA,CAACA;IAElBA,MAAMA,CAACA,MAAMA,CAACA;AAClBA,CAACA;AAED,IAAI,mBAAmB,GAAG,aAAa,EAAE,CAAC;AAC1C,IAAI,gBAAgB,GAAG,wBAAwB,EAAE,CAAC;AAClD,IAAI,MAAM,GAAG,cAAc,EAAE,CAAC;AAC9B,IAAI,gBAAgB,GAAG,wBAAwB,EAAE,CAAC;AAClD,IAAI,OAAO,GAAG,eAAe,EAAE,CAAC;AAChC,IAAI,SAAS,GAAG,iBAAiB,EAAE,CAAC;AAEpC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,4DAA4D,EAAE,mBAAmB,EAAE,KAAK,CAAC,CAAC;AACpI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,oDAAoD,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/G,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,qDAAqD,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} +>>>>>>> 99981aa... Add support for parsing yield expressions. diff --git a/src/services/syntax/constants.ts b/src/services/syntax/constants.ts index 31b4e952824..f29e1d74bd1 100644 --- a/src/services/syntax/constants.ts +++ b/src/services/syntax/constants.ts @@ -15,13 +15,14 @@ module TypeScript { // only be used by the incremental parser if it is parsed in the same strict context as before. // last masks off the part of the int // - // The width of the node is stored in the remainder of the int. This allows us up to 256MB - // for a node by using all 28 bits. However, in the common case, we'll use less than 28 bits + // The width of the node is stored in the remainder of the int. This allows us up to 128MB + // for a node by using all 27 bits. However, in the common case, we'll use less than 27 bits // for the width. Thus, the info will be stored in a single int in chakra. NodeDataComputed = 0x00000001, // 0000 0000 0000 0000 0000 0000 0000 0001 NodeIncrementallyUnusableMask = 0x00000002, // 0000 0000 0000 0000 0000 0000 0000 0010 NodeParsedInStrictModeMask = 0x00000004, // 0000 0000 0000 0000 0000 0000 0000 0100 NodeParsedInDisallowInMask = 0x00000008, // 0000 0000 0000 0000 0000 0000 0000 1000 - NodeFullWidthShift = 4, // 1111 1111 1111 1111 1111 1111 1111 0000 + NodeParsedInAllowYieldMask = 0x00000010, // 0000 0000 0000 0000 0000 0000 0001 0000 + NodeFullWidthShift = 5, // 1111 1111 1111 1111 1111 1111 1110 0000 } } \ No newline at end of file diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index ac89ca4fce9..83344ca4b20 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -161,6 +161,9 @@ module TypeScript.Parser { // for example, more often than code 'allows-in' (or doesn't 'disallow-in'). We opt for // 'disallow-in' set to 'false'. Otherwise, if we had 'allowsIn' set to 'true', then almost // all nodes would need extra state on them to store this info. + // + // Note: 'allowIn' and 'allowYield' track 1:1 with the [in] and [yield] concepts in the ES6 + // grammar specification. var strictMode: boolean = false; var disallowIn: boolean = false; var allowYield: boolean = false; @@ -237,26 +240,28 @@ module TypeScript.Parser { // TODO(cyrusn): This may be too conservative. Perhaps we could reuse hte node and // attach the skipped tokens in front? For now though, being conservative is nice and // safe, and likely won't ever affect perf. - if (_skippedTokens) { - return null; + if (!_skippedTokens) { + var node = source.currentNode(); + + // We can only reuse a node if it was parsed under the same strict mode that we're + // currently in. i.e. if we originally parsed a node in non-strict mode, but then + // the user added 'using strict' at the top of the file, then we can't use that node + // again as the presense of strict mode may cause us to parse the tokens in the file + // differetly. + // + // Note: we *can* reuse tokens when the strict mode changes. That's because tokens + // are unaffected by strict mode. It's just the parser will decide what to do with it + // differently depending on what mode it is in. + if (node && + parsedInStrictMode(node) === strictMode && + parsedInDisallowInMode(node) === disallowIn && + parsedInAllowYieldMode(node) === allowYield) { + + return node; + } } - var node = source.currentNode(); - - // We can only reuse a node if it was parsed under the same strict mode that we're - // currently in. i.e. if we originally parsed a node in non-strict mode, but then - // the user added 'using strict' at the top of the file, then we can't use that node - // again as the presense of strict mode may cause us to parse the tokens in the file - // differetly. - // - // Note: we *can* reuse tokens when the strict mode changes. That's because tokens - // are unaffected by strict mode. It's just the parser will decide what to do with it - // differently depending on what mode it is in. - if (!node || parsedInStrictMode(node) !== strictMode || parsedInDisallowInMode(node) !== disallowIn) { - return undefined; - } - - return node; + return undefined; } function currentToken(): ISyntaxToken { @@ -382,6 +387,12 @@ module TypeScript.Parser { return true; } + // If we have a 'yield' keyword, and we're in the [yield] context, then 'yield' is + // considered a keyword and is not an identifier. + if (tokenKind === SyntaxKind.YieldKeyword && allowYield) { + return false; + } + // Keywords are only identifiers if they're FutureReservedStrictWords and we're in // strict mode. *Or* if it's a typescript 'keyword'. if (tokenKind >= SyntaxKind.FirstFutureReservedStrictKeyword) { @@ -575,7 +586,8 @@ module TypeScript.Parser { function updateParseNodeData() { parseNodeData = (strictMode ? SyntaxConstants.NodeParsedInStrictModeMask : 0) | - (disallowIn ? SyntaxConstants.NodeParsedInDisallowInMask : 0); + (disallowIn ? SyntaxConstants.NodeParsedInDisallowInMask : 0) | + (allowYield ? SyntaxConstants.NodeParsedInAllowYieldMask : 0); } function setStrictMode(val: boolean) { @@ -588,6 +600,11 @@ module TypeScript.Parser { updateParseNodeData(); } + function setAllowYield(val: boolean) { + allowYield = val; + updateParseNodeData(); + } + function parseSourceUnit(): SourceUnitSyntax { // Note: saving and restoring the 'isInStrictMode' state is not really necessary here // (as it will never be read afterwards). However, for symmetry with the rest of the @@ -921,6 +938,30 @@ module TypeScript.Parser { setDisallowIn(false); return result; } + + function allowYieldAnd(func: () => T): T { + if (allowYield) { + // no need to do anything special if 'yield' is already allowed. + return func(); + } + + setAllowYield(true); + var result = func(); + setAllowYield(false); + return result; + } + + function disallowYieldAnd(func: () => T): T { + if (allowYield) { + setAllowYield(false); + var result = func(); + setAllowYield(true); + return result; + } + + // no need to do anything special if 'yield' is already disallowed. + return func(); + } function tryParseEnumElementEqualsValueClause(): EqualsValueClauseSyntax { return isEqualsValueClause(/*inParameter*/ false) ? allowInAnd(parseEqualsValueClause) : undefined; @@ -1047,7 +1088,7 @@ module TypeScript.Parser { return parseGetAccessor(modifiers, _currenToken); } else if (tokenKind === SyntaxKind.SetKeyword) { - return parseSetccessor(modifiers, _currenToken); + return parseSetAccessor(modifiers, _currenToken); } else { throw Errors.invalidOperation(); @@ -1058,14 +1099,14 @@ module TypeScript.Parser { return new GetAccessorSyntax(parseNodeData, modifiers, consumeToken(getKeyword), parsePropertyName(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseFunctionBlock()); + parseFunctionBlock(/*allowYield:*/ false)); } - function parseSetccessor(modifiers: ISyntaxToken[], setKeyword: ISyntaxToken): SetAccessorSyntax { + function parseSetAccessor(modifiers: ISyntaxToken[], setKeyword: ISyntaxToken): SetAccessorSyntax { return new SetAccessorSyntax(parseNodeData, modifiers, consumeToken(setKeyword), parsePropertyName(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseFunctionBlock()); + parseFunctionBlock(/*allowYield:*/ false)); } function isClassElement(inErrorRecovery: boolean): boolean { @@ -1194,7 +1235,7 @@ module TypeScript.Parser { parseModifiers(), eatToken(SyntaxKind.ConstructorKeyword), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - isBlockOrArrow() ? parseFunctionBlock() : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); + isBlockOrArrow() ? parseFunctionBlock(/*allowYield:*/ false) : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } function parseMemberFunctionDeclaration(modifiers: ISyntaxToken[], asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax): MemberFunctionDeclarationSyntax { @@ -1206,7 +1247,9 @@ module TypeScript.Parser { asterixToken, propertyName, parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - isBlockOrArrow() ? parseFunctionBlock() : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); + isBlockOrArrow() + ? parseFunctionBlock(/*allowYield:*/ asterixToken !== undefined) + : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } function parseMemberVariableDeclaration(modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax): MemberVariableDeclarationSyntax { @@ -1235,13 +1278,16 @@ module TypeScript.Parser { // Note: if we see an arrow after the close paren, then try to parse out a function // block anyways. It's likely the user just though '=> expr' was legal anywhere a // block was legal. + var asterixToken: ISyntaxToken; return new FunctionDeclarationSyntax(parseNodeData, parseModifiers(), eatToken(SyntaxKind.FunctionKeyword), - tryEatToken(SyntaxKind.AsteriskToken), + asterixToken = tryEatToken(SyntaxKind.AsteriskToken), eatIdentifierToken(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - isBlockOrArrow() ? parseFunctionBlock() : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); + isBlockOrArrow() + ? parseFunctionBlock(/*allowYield:*/ asterixToken !== undefined) + : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } function parseModuleName(): INameSyntax { @@ -2038,6 +2084,12 @@ module TypeScript.Parser { // For function expressions. case SyntaxKind.FunctionKeyword: return true; + + case SyntaxKind.YieldKeyword: + // Yield always starts an expression. Either it is an identifier (in which case + // it is definitely an expression). Or it's a keyword (either because we're in + // a generator, or in strict mode (or both)) and it started a yield expression. + return true; } return isIdentifier(currentToken); @@ -2233,21 +2285,12 @@ module TypeScript.Parser { function tryParseAssignmentExpressionOrHigherWorker(force: boolean): IExpressionSyntax { // Augmented by TypeScript: // - // AssignmentExpression[in]: - // 1) ConditionalExpression[in] - // 2) LeftHandSideExpression = AssignmentExpression[in] - // 3) LeftHandSideExpression AssignmentOperator AssignmentExpression[in] - // 4) ArrowFunctionExpression <-- added by TypeScript - // - // Open spec question. Right now, there is no 'ArrowFunctionExpression[in]' variant. - // Thus, if the user has: - // - // for (var a = () => b in c) {} - // - // Then we will fail to parse (because the 'in' will be consumed as part of the body of - // the lambda, and not as part of the 'for' statement). This is likely not an issue - // whatsoever as there seems to be no good reason why anyone would ever write code like - // the above. + // AssignmentExpression[in,yield]: + // 1) ConditionalExpression[?in,?yield] + // 2) LeftHandSideExpression = AssignmentExpression[?in,?yield] + // 3) LeftHandSideExpression AssignmentOperator AssignmentExpression[?in,?yield] + // 4) ArrowFunctionExpression[?in,?yield] + // 5) [+Yield] YieldExpression[?In] // // Note: for ease of implementation we treat productions '2' and '3' as the same thing. // (i.e. they're both BinaryExpressions with an assignment operator in it). @@ -2257,6 +2300,10 @@ module TypeScript.Parser { // LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done // with AssignmentExpression if we see one. var _currentToken = currentToken(); + if (isYieldExpression(_currentToken)) { + return parseYieldExpression(_currentToken); + } + var arrowFunction = tryParseAnyArrowFunctionExpression(_currentToken); if (arrowFunction) { return arrowFunction; @@ -2294,6 +2341,64 @@ module TypeScript.Parser { return parseConditionalExpressionRest(leftOperand); } + function isYieldExpression(_currentToken: ISyntaxToken): boolean { + if (_currentToken.kind === SyntaxKind.YieldKeyword) { + // If we have a 'yield' keyword, and htis is a context where yield expressions are + // allowed, then definitely parse out a yield expression. + if (allowYield) { + return true; + } + + if (strictMode) { + // If we're in strict mode, then 'yield' is a keyword, could only ever start + // a yield expression. + return true; + } + + // We're in a context where 'yield expr' is not allowed. However, if we can + // definitely tell that the user was trying to parse a 'yield expr' and not + // just a normal expr that start with a 'yield' identifier, then parse out + // a 'yield expr'. We can then report an error later that they are only + // allowed in generator expressions. + // + // for example, if we see 'yield(foo)', then we'll have to treat that as an + // invocation expression of something called 'yield'. However, if we have + // 'yield foo' then that is not legal as a normal expression, so we can + // definitely recognize this as a yield expression. + // + // for now we just check if the next token is an identifier. More heuristics + // can be added here later as necessary. We just need to make sure that we + // don't accidently consume something legal. + var token1 = peekToken(1); + if (!isOnDifferentLineThanPreviousToken(token1) && isIdentifier(token1)) { + return true; + } + } + + return false; + } + + function parseYieldExpression(yieldKeyword: ISyntaxToken): YieldExpressionSyntax { + // YieldExpression[In] : + // yield + // yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] + // yield [no LineTerminator here] * [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] + + yieldKeyword = consumeToken(yieldKeyword); + var _currentToken = currentToken(); + + if (!isOnDifferentLineThanPreviousToken(_currentToken) && + (_currentToken.kind === SyntaxKind.AsteriskToken || isExpression(_currentToken))) { + + return new YieldExpressionSyntax(parseNodeData, yieldKeyword, tryEatToken(SyntaxKind.AsteriskToken), parseAssignmentExpressionOrHigher()); + } + else { + // if the next token is not on the same line as yield. or we don't have an '*' or + // the start of an expressin, then this is just a simple "yield" expression. + return new YieldExpressionSyntax(parseNodeData, yieldKeyword, /*asterixToken:*/ undefined, /*expression;*/ undefined); + } + } + function tryParseAnyArrowFunctionExpression(_currentToken: ISyntaxToken): IExpressionSyntax { return isSimpleArrowFunctionExpression(_currentToken) ? parseSimpleArrowFunctionExpression() @@ -2824,12 +2929,13 @@ module TypeScript.Parser { } function parseFunctionExpression(functionKeyword: ISyntaxToken): FunctionExpressionSyntax { + var asterixToken: ISyntaxToken; return new FunctionExpressionSyntax(parseNodeData, consumeToken(functionKeyword), - tryEatToken(SyntaxKind.AsteriskToken), + asterixToken = tryEatToken(SyntaxKind.AsteriskToken), eatOptionalIdentifierToken(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseFunctionBlock()); + parseFunctionBlock(/*allowYield:*/ asterixToken !== undefined)); } function parseObjectCreationExpression(newKeyword: ISyntaxToken): ObjectCreationExpressionSyntax { @@ -2963,7 +3069,7 @@ module TypeScript.Parser { // { FunctionBody } if (isBlock()) { - return parseFunctionBlock(); + return parseFunctionBlock(/*allowYield:*/ false); } // We didn't have a block. However, we may be in an error situation. For example, @@ -3217,7 +3323,8 @@ module TypeScript.Parser { } } - // All the rest of the property assignments start with property names or an asterix token. They are: + // All the rest of the property assignments start with property names or an asterix. + // They are: // id: e // [e1]: e2 // id() { } @@ -3329,7 +3436,7 @@ module TypeScript.Parser { asterixToken, propertyName, parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseFunctionBlock()); + parseFunctionBlock(/*allowYield:*/ asterixToken !== undefined)); } function parseArrayLiteralExpression(openBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax { @@ -3377,7 +3484,7 @@ module TypeScript.Parser { eatToken(SyntaxKind.CloseBraceToken)); } - function parseFunctionBlock(): BlockSyntax { + function parseFunctionBlock(_allowYield: boolean): BlockSyntax { // If we got an errant => then we want to parse what's coming up without requiring an // open brace. ItWe do this because it's not uncommon for people to get confused as to // where/when they can use an => and we want to have good error recovery here. @@ -3393,11 +3500,13 @@ module TypeScript.Parser { } var openBraceToken = eatToken(SyntaxKind.OpenBraceToken); - var statements = hasEqualsGreaterThanToken || openBraceToken.fullWidth() > 0 - ? parseFunctionBlockStatements() - : []; + var statements: IStatementSyntax[]; - return new BlockSyntax(parseNodeData, openBraceToken, statements, eatToken(SyntaxKind.CloseBraceToken)); + if (hasEqualsGreaterThanToken || openBraceToken.fullWidth() > 0) { + statements = _allowYield ? allowYieldAnd(parseFunctionBlockStatements) : disallowYieldAnd(parseFunctionBlockStatements); + } + + return new BlockSyntax(parseNodeData, openBraceToken, statements || [], eatToken(SyntaxKind.CloseBraceToken)); } function parseFunctionBlockStatements() { diff --git a/src/services/syntax/prettyPrinter.ts b/src/services/syntax/prettyPrinter.ts index eeb2a8861d0..4bd57ffb62f 100644 --- a/src/services/syntax/prettyPrinter.ts +++ b/src/services/syntax/prettyPrinter.ts @@ -1018,6 +1018,12 @@ module TypeScript.PrettyPrinter { visitNodeOrToken(this, node.expression); } + public visitYieldExpression(node: YieldExpressionSyntax): void { + this.appendToken(node.yieldKeyword); + this.ensureSpace(); + visitNodeOrToken(this, node.expression); + } + public visitDebuggerStatement(node: DebuggerStatementSyntax): void { this.appendToken(node.debuggerKeyword); this.appendToken(node.semicolonToken); diff --git a/src/services/syntax/syntaxElement.ts b/src/services/syntax/syntaxElement.ts index 6e05cb89587..75386b20b07 100644 --- a/src/services/syntax/syntaxElement.ts +++ b/src/services/syntax/syntaxElement.ts @@ -35,6 +35,15 @@ module TypeScript { return (info & SyntaxConstants.NodeParsedInDisallowInMask) !== 0; } + export function parsedInAllowYieldMode(node: ISyntaxNode): boolean { + var info = node.__data; + if (info === undefined) { + return false; + } + + return (info & SyntaxConstants.NodeParsedInAllowYieldMask) !== 0; + } + export function previousToken(token: ISyntaxToken): ISyntaxToken { var start = token.fullStart(); if (start === 0) { diff --git a/src/services/syntax/syntaxGenerator.ts b/src/services/syntax/syntaxGenerator.ts index 02906241902..99218a04920 100644 --- a/src/services/syntax/syntaxGenerator.ts +++ b/src/services/syntax/syntaxGenerator.ts @@ -1005,6 +1005,15 @@ var definitions:ITypeDefinition[] = [ { name: 'voidKeyword', isToken: true, excludeFromAST: true }, { name: 'expression', type: 'IUnaryExpressionSyntax' }] }, + { + name: 'YieldExpressionSyntax', + baseType: 'ISyntaxNode', + interfaces: ['IExpressionSyntax'], + children: [ + { name: 'yieldKeyword', isToken: true }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'expression', type: 'IExpressionSyntax', isOptional: true }] + }, { name: 'DebuggerStatementSyntax', baseType: 'ISyntaxNode', diff --git a/src/services/syntax/syntaxInterfaces.generated.ts b/src/services/syntax/syntaxInterfaces.generated.ts index 566de200a55..acb2f283902 100644 --- a/src/services/syntax/syntaxInterfaces.generated.ts +++ b/src/services/syntax/syntaxInterfaces.generated.ts @@ -523,6 +523,13 @@ module TypeScript { } export interface TemplateAccessExpressionConstructor { new (data: number, expression: ILeftHandSideExpressionSyntax, templateExpression: IPrimaryExpressionSyntax): TemplateAccessExpressionSyntax } + export interface YieldExpressionSyntax extends ISyntaxNode, IExpressionSyntax { + yieldKeyword: ISyntaxToken; + asterixToken: ISyntaxToken; + expression: IExpressionSyntax; + } + export interface YieldExpressionConstructor { new (data: number, yieldKeyword: ISyntaxToken, asterixToken: ISyntaxToken, expression: IExpressionSyntax): YieldExpressionSyntax } + export interface VariableDeclarationSyntax extends ISyntaxNode { varKeyword: ISyntaxToken; variableDeclarators: ISeparatedSyntaxList; diff --git a/src/services/syntax/syntaxKind.ts b/src/services/syntax/syntaxKind.ts index a2100aabff9..947f23b137f 100644 --- a/src/services/syntax/syntaxKind.ts +++ b/src/services/syntax/syntaxKind.ts @@ -234,6 +234,7 @@ module TypeScript { OmittedExpression, TemplateExpression, TemplateAccessExpression, + YieldExpression, // Variable declarations VariableDeclaration, diff --git a/src/services/syntax/syntaxNodes.concrete.generated.ts b/src/services/syntax/syntaxNodes.concrete.generated.ts index 16122835335..e87e7e1e2b7 100644 --- a/src/services/syntax/syntaxNodes.concrete.generated.ts +++ b/src/services/syntax/syntaxNodes.concrete.generated.ts @@ -1427,6 +1427,25 @@ module TypeScript { } } + export var YieldExpressionSyntax: YieldExpressionConstructor = function(data: number, yieldKeyword: ISyntaxToken, asterixToken: ISyntaxToken, expression: IExpressionSyntax) { + if (data) { this.__data = data; } + this.yieldKeyword = yieldKeyword, + this.asterixToken = asterixToken, + this.expression = expression, + yieldKeyword.parent = this, + asterixToken && (asterixToken.parent = this), + expression && (expression.parent = this); + }; + YieldExpressionSyntax.prototype.kind = SyntaxKind.YieldExpression; + YieldExpressionSyntax.prototype.childCount = 3; + YieldExpressionSyntax.prototype.childAt = function(index: number): ISyntaxElement { + switch (index) { + case 0: return this.yieldKeyword; + case 1: return this.asterixToken; + case 2: return this.expression; + } + } + export var VariableDeclarationSyntax: VariableDeclarationConstructor = function(data: number, varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList) { if (data) { this.__data = data; } this.varKeyword = varKeyword, diff --git a/src/services/syntax/syntaxTree.ts b/src/services/syntax/syntaxTree.ts index b222da20538..9f7c0b1efd9 100644 --- a/src/services/syntax/syntaxTree.ts +++ b/src/services/syntax/syntaxTree.ts @@ -1555,13 +1555,22 @@ module TypeScript { public visitDeleteExpression(node: DeleteExpressionSyntax): void { if (parsedInStrictMode(node) && node.expression.kind === SyntaxKind.IdentifierName) { - this.pushDiagnostic(firstToken(node), DiagnosticCode.delete_cannot_be_called_on_an_identifier_in_strict_mode); + this.pushDiagnostic(node.deleteKeyword, DiagnosticCode.delete_cannot_be_called_on_an_identifier_in_strict_mode); return; } super.visitDeleteExpression(node); } + public visitYieldExpression(node: YieldExpressionSyntax): void { + if (!parsedInAllowYieldMode(node)) { + this.pushDiagnostic(node.yieldKeyword, DiagnosticCode.yield_expression_must_be_contained_within_a_generator_declaration); + return; + } + + super.visitYieldExpression(node); + } + private checkIllegalAssignment(node: BinaryExpressionSyntax): boolean { if (parsedInStrictMode(node) && SyntaxFacts.isAssignmentOperatorToken(node.operatorToken.kind) && this.isEvalOrArguments(node.left)) { this.pushDiagnostic(node.operatorToken, DiagnosticCode.Invalid_use_of_0_in_strict_mode, [this.getEvalOrArguments(node.left)]); diff --git a/src/services/syntax/syntaxVisitor.generated.ts b/src/services/syntax/syntaxVisitor.generated.ts index 7900aaad1dc..57cea0cbe95 100644 --- a/src/services/syntax/syntaxVisitor.generated.ts +++ b/src/services/syntax/syntaxVisitor.generated.ts @@ -72,6 +72,7 @@ module TypeScript { case SyntaxKind.OmittedExpression: return visitor.visitOmittedExpression(element); case SyntaxKind.TemplateExpression: return visitor.visitTemplateExpression(element); case SyntaxKind.TemplateAccessExpression: return visitor.visitTemplateAccessExpression(element); + case SyntaxKind.YieldExpression: return visitor.visitYieldExpression(element); case SyntaxKind.VariableDeclaration: return visitor.visitVariableDeclaration(element); case SyntaxKind.VariableDeclarator: return visitor.visitVariableDeclarator(element); case SyntaxKind.ArgumentList: return visitor.visitArgumentList(element); @@ -170,6 +171,7 @@ module TypeScript { visitOmittedExpression(node: OmittedExpressionSyntax): any; visitTemplateExpression(node: TemplateExpressionSyntax): any; visitTemplateAccessExpression(node: TemplateAccessExpressionSyntax): any; + visitYieldExpression(node: YieldExpressionSyntax): any; visitVariableDeclaration(node: VariableDeclarationSyntax): any; visitVariableDeclarator(node: VariableDeclaratorSyntax): any; visitArgumentList(node: ArgumentListSyntax): any; diff --git a/src/services/syntax/syntaxWalker.generated.ts b/src/services/syntax/syntaxWalker.generated.ts index f37dbbe87db..7a095aec157 100644 --- a/src/services/syntax/syntaxWalker.generated.ts +++ b/src/services/syntax/syntaxWalker.generated.ts @@ -472,6 +472,12 @@ module TypeScript { visitNodeOrToken(this, node.templateExpression); } + public visitYieldExpression(node: YieldExpressionSyntax): void { + this.visitToken(node.yieldKeyword); + this.visitOptionalToken(node.asterixToken); + visitNodeOrToken(this, node.expression); + } + public visitVariableDeclaration(node: VariableDeclarationSyntax): void { this.visitToken(node.varKeyword); this.visitList(node.variableDeclarators); From 9c48b23f431050e2156b55a73e54c2f3602bb4f5 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 11 Nov 2014 19:19:05 -0800 Subject: [PATCH 092/154] Fix spelling mistakes, and remove unused function. --- src/services/syntax/parser.ts | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index 83344ca4b20..4477f11ef74 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -1081,14 +1081,14 @@ module TypeScript.Parser { function parseAccessor(): IAccessorSyntax { var modifiers = parseModifiers(); - var _currenToken = currentToken(); - var tokenKind = _currenToken.kind; + var _currentToken = currentToken(); + var tokenKind = _currentToken.kind; if (tokenKind === SyntaxKind.GetKeyword) { - return parseGetAccessor(modifiers, _currenToken); + return parseGetAccessor(modifiers, _currentToken); } else if (tokenKind === SyntaxKind.SetKeyword) { - return parseSetAccessor(modifiers, _currenToken); + return parseSetAccessor(modifiers, _currentToken); } else { throw Errors.invalidOperation(); @@ -3447,33 +3447,6 @@ module TypeScript.Parser { eatToken(SyntaxKind.CloseBracketToken)); } - function tryAddUnexpectedEqualsGreaterThanToken(callSignature: CallSignatureSyntax): boolean { - var token0 = currentToken(); - - var hasEqualsGreaterThanToken = token0.kind === SyntaxKind.EqualsGreaterThanToken; - if (hasEqualsGreaterThanToken) { - // We can only do this if the call signature actually contains a final token that we - // could add the => to. - var _lastToken = lastToken(callSignature); - if (_lastToken && _lastToken.fullWidth() > 0) { - // Previously the language allowed "function f() => expr;" as a shorthand for - // "function f() { return expr; }. - // - // Detect if the user is typing this and attempt recovery. - var diagnostic = new Diagnostic(fileName, source.text.lineMap(), - start(token0, source.text), width(token0), DiagnosticCode.Unexpected_token_0_expected, [SyntaxFacts.getText(SyntaxKind.OpenBraceToken)]); - addDiagnostic(diagnostic); - - // Skip over the => It will get attached to whatever comes next. - skipToken(token0); - return true; - } - } - - - return false; - } - function parseStatementBlock(): BlockSyntax { // Different from function blocks in that we don't check for strict mode, nor do accept // a block without an open curly. From 122cf8a52c2c3e89ae3bc567fd3f57c614ac82ca Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 11 Nov 2014 21:18:42 -0800 Subject: [PATCH 093/154] Add clarifying comments. --- src/services/syntax/parser.ts | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index 4477f11ef74..19937cef80a 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -163,7 +163,36 @@ module TypeScript.Parser { // all nodes would need extra state on them to store this info. // // Note: 'allowIn' and 'allowYield' track 1:1 with the [in] and [yield] concepts in the ES6 - // grammar specification. + // grammar specification. + // + // An important thing about these context concepts. By default they are effectively inherited + // while parsing through every grammar production. i.e. if you don't change them, then when + // you parse a sub-production, it will have the same context values as hte parent production. + // This is great most of the time. After all, consider all the 'expression' grammar productions + // and how nearly all of them pass along the 'in' and 'yield' context values: + // + // EqualityExpression[In, Yield] : + // RelationalExpression[?In, ?Yield] + // EqualityExpression[?In, ?Yield] == RelationalExpression[?In, ?Yield] + // EqualityExpression[?In, ?Yield] != RelationalExpression[?In, ?Yield] + // EqualityExpression[?In, ?Yield] === RelationalExpression[?In, ?Yield] + // EqualityExpression[?In, ?Yield] !== RelationalExpression[?In, ?Yield] + // + // Where you have to be careful is then understanding what the points are in the grammar + // where the values are *not* passed along. For example: + // + // PropertyName[Yield,GeneratorParameter] : + // LiteralPropertyName + // [+GeneratorParameter]ComputedPropertyName + // [~GeneratorParameter]ComputedPropertyName[?Yield] + // + // Here this is saying that if the GeneratorParameter context flag is set, that we should + // explicitly set the 'yield' context flag to false before calling into the ComputedPropertyName + // production. Conversely, if the GeneratorParameter context flag is not set, then we + // should leave the 'yield' context flag alone. + // + // Getting this all correct is tricky and requires careful reading of the grammar to + // understand when these values should be changed versus when they should be inherited. var strictMode: boolean = false; var disallowIn: boolean = false; var allowYield: boolean = false; From ce51343e73949a7384a65316744c63de4b0627c7 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 11 Nov 2014 23:38:18 -0800 Subject: [PATCH 094/154] Adding testcase for the incorrect eliding of the import declarations --- .../baselines/reference/elidingImportNames.js | 26 +++++++++++++++++ .../reference/elidingImportNames.types | 29 +++++++++++++++++++ tests/cases/compiler/elidingImportNames.ts | 15 ++++++++++ 3 files changed, 70 insertions(+) create mode 100644 tests/baselines/reference/elidingImportNames.js create mode 100644 tests/baselines/reference/elidingImportNames.types create mode 100644 tests/cases/compiler/elidingImportNames.ts diff --git a/tests/baselines/reference/elidingImportNames.js b/tests/baselines/reference/elidingImportNames.js new file mode 100644 index 00000000000..f14999f2412 --- /dev/null +++ b/tests/baselines/reference/elidingImportNames.js @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/elidingImportNames.ts] //// + +//// [elidingImportNames_test.ts] + +import a = require('elidingImportNames_main'); // alias used in typeof +var b = a; +var x: typeof a; +import a2 = require('elidingImportNames_main1'); // alias not used in typeof +var b2 = a2; + + +//// [elidingImportNames_main.ts] +export var main = 10; + +//// [elidingImportNames_main1.ts] +export var main = 10; + +//// [elidingImportNames_main.js] +exports.main = 10; +//// [elidingImportNames_main1.js] +exports.main = 10; +//// [elidingImportNames_test.js] +var b = a; +var x; +var a2 = require('elidingImportNames_main1'); // alias not used in typeof +var b2 = a2; diff --git a/tests/baselines/reference/elidingImportNames.types b/tests/baselines/reference/elidingImportNames.types new file mode 100644 index 00000000000..ad93c72860b --- /dev/null +++ b/tests/baselines/reference/elidingImportNames.types @@ -0,0 +1,29 @@ +=== tests/cases/compiler/elidingImportNames_test.ts === + +import a = require('elidingImportNames_main'); // alias used in typeof +>a : typeof a + +var b = a; +>b : typeof a +>a : typeof a + +var x: typeof a; +>x : typeof a +>a : typeof a + +import a2 = require('elidingImportNames_main1'); // alias not used in typeof +>a2 : typeof a2 + +var b2 = a2; +>b2 : typeof a2 +>a2 : typeof a2 + + +=== tests/cases/compiler/elidingImportNames_main.ts === +export var main = 10; +>main : number + +=== tests/cases/compiler/elidingImportNames_main1.ts === +export var main = 10; +>main : number + diff --git a/tests/cases/compiler/elidingImportNames.ts b/tests/cases/compiler/elidingImportNames.ts new file mode 100644 index 00000000000..b5893461664 --- /dev/null +++ b/tests/cases/compiler/elidingImportNames.ts @@ -0,0 +1,15 @@ +// @module: commonjs + +// @Filename: elidingImportNames_test.ts +import a = require('elidingImportNames_main'); // alias used in typeof +var b = a; +var x: typeof a; +import a2 = require('elidingImportNames_main1'); // alias not used in typeof +var b2 = a2; + + +// @Filename: elidingImportNames_main.ts +export var main = 10; + +// @Filename: elidingImportNames_main1.ts +export var main = 10; \ No newline at end of file From b1297b2b6588419ed56346c93983c8f0f49cf1d7 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 11 Nov 2014 23:49:57 -0800 Subject: [PATCH 095/154] Instead of setting fresh value, or the value with existing one of if alias is referenced in value position Fixes #1130 --- src/compiler/checker.ts | 2 +- tests/baselines/reference/aliasUsageInIndexerOfClass.js | 1 + tests/baselines/reference/elidingImportNames.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 825570c2eb9..5a990d4e9db 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4474,7 +4474,7 @@ module ts { if (symbol.flags & SymbolFlags.Import) { // Mark the import as referenced so that we emit it in the final .js file. // exception: identifiers that appear in type queries, const enums, modules that contain only const enums - getSymbolLinks(symbol).referenced = !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol)); + getSymbolLinks(symbol).referenced = getSymbolLinks(symbol).referenced || (!isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol))); } checkCollisionWithCapturedSuperVariable(node, node); diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index dfbb1982ca9..7b2907681e0 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -50,6 +50,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsageInIndexerOfClass_main.js] +var moduleA = require("aliasUsageInIndexerOfClass_moduleA"); var N = (function () { function N() { this.x = moduleA; diff --git a/tests/baselines/reference/elidingImportNames.js b/tests/baselines/reference/elidingImportNames.js index f14999f2412..3c61789a1a7 100644 --- a/tests/baselines/reference/elidingImportNames.js +++ b/tests/baselines/reference/elidingImportNames.js @@ -20,6 +20,7 @@ exports.main = 10; //// [elidingImportNames_main1.js] exports.main = 10; //// [elidingImportNames_test.js] +var a = require('elidingImportNames_main'); // alias used in typeof var b = a; var x; var a2 = require('elidingImportNames_main1'); // alias not used in typeof From 2302bd23abf6e2a53280fd18828034dd25713911 Mon Sep 17 00:00:00 2001 From: Gabriel Isenberg Date: Wed, 12 Nov 2014 11:45:43 -0800 Subject: [PATCH 096/154] Initial support for named AMD modules. --- src/compiler/emitter.ts | 10 +++++++++- src/compiler/parser.ts | 12 +++++++++++- src/compiler/types.ts | 1 + src/services/services.ts | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index f61d4403eec..fe98d308b86 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2096,7 +2096,15 @@ module ts { function emitAMDModule(node: SourceFile, startIndex: number) { var imports = getExternalImportDeclarations(node); writeLine(); - write("define([\"require\", \"exports\""); + write("define("); + + if(node.amdModuleName) { + write("\"" + node.amdModuleName + "\""); + write(", "); + } + + write("[\"require\", \"exports\""); + forEach(imports, imp => { write(", "); emitLiteral(imp.externalModuleName); diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 4849cb8c89e..429ee5570ce 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -20,6 +20,7 @@ module ts { interface ReferenceComments { referencedFiles: FileReference[]; amdDependencies: string[]; + amdModuleName: string; } export function getSourceFileOfNode(node: Node): SourceFile { @@ -4218,6 +4219,7 @@ module ts { function processReferenceComments(): ReferenceComments { var referencedFiles: FileReference[] = []; var amdDependencies: string[] = []; + var amdModuleName: string; commentRanges = []; token = scanner.scan(); @@ -4237,6 +4239,12 @@ module ts { } } else { + var amdModuleNameRegEx = /^\/\/\/\s* Date: Wed, 12 Nov 2014 12:36:06 -0800 Subject: [PATCH 097/154] Add test case for instance of type guard with interface with prototype property --- .../typeGuardOfFormInstanceOfOnInterface.js | 62 +++++++ ...typeGuardOfFormInstanceOfOnInterface.types | 162 ++++++++++++++++++ .../typeGuardOfFormInstanceOfOnInterface.ts | 38 ++++ 3 files changed, 262 insertions(+) create mode 100644 tests/baselines/reference/typeGuardOfFormInstanceOfOnInterface.js create mode 100644 tests/baselines/reference/typeGuardOfFormInstanceOfOnInterface.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOfOnInterface.ts diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOfOnInterface.js b/tests/baselines/reference/typeGuardOfFormInstanceOfOnInterface.js new file mode 100644 index 00000000000..2f40be79ac4 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormInstanceOfOnInterface.js @@ -0,0 +1,62 @@ +//// [typeGuardOfFormInstanceOfOnInterface.ts] +// A type guard of the form x instanceof C, where C is of a subtype of the global type 'Function' +// and C has a property named 'prototype' +// - when true, narrows the type of x to the type of the 'prototype' property in C provided +// it is a subtype of the type of x, or +// - when false, has no effect on the type of x. + +interface C1 { + (): C1; + prototype: C1; + p1: string; +} +interface C2 { + (): C2; + prototype: C2; + p2: number; +} +interface D1 extends C1 { + prototype: D1; + p3: number; +} +var str: string; +var num: number; +var strOrNum: string | number; + +var c1: C1; +var c2: C2; +var d1: D1; +var c1Orc2: C1 | C2; +str = c1Orc2 instanceof c1 && c1Orc2.p1; // C1 +num = c1Orc2 instanceof c2 && c1Orc2.p2; // C2 +str = c1Orc2 instanceof d1 && c1Orc2.p1; // C1 +num = c1Orc2 instanceof d1 && c1Orc2.p3; // D1 + +var c2Ord1: C2 | D1; +num = c2Ord1 instanceof c2 && c2Ord1.p2; // C2 +num = c2Ord1 instanceof d1 && c2Ord1.p3; // D1 +str = c2Ord1 instanceof d1 && c2Ord1.p1; // D1 +var r2: D1 | C2 = c2Ord1 instanceof c1 && c2Ord1; // C2 | D1 + +//// [typeGuardOfFormInstanceOfOnInterface.js] +// A type guard of the form x instanceof C, where C is of a subtype of the global type 'Function' +// and C has a property named 'prototype' +// - when true, narrows the type of x to the type of the 'prototype' property in C provided +// it is a subtype of the type of x, or +// - when false, has no effect on the type of x. +var str; +var num; +var strOrNum; +var c1; +var c2; +var d1; +var c1Orc2; +str = c1Orc2 instanceof c1 && c1Orc2.p1; // C1 +num = c1Orc2 instanceof c2 && c1Orc2.p2; // C2 +str = c1Orc2 instanceof d1 && c1Orc2.p1; // C1 +num = c1Orc2 instanceof d1 && c1Orc2.p3; // D1 +var c2Ord1; +num = c2Ord1 instanceof c2 && c2Ord1.p2; // C2 +num = c2Ord1 instanceof d1 && c2Ord1.p3; // D1 +str = c2Ord1 instanceof d1 && c2Ord1.p1; // D1 +var r2 = c2Ord1 instanceof c1 && c2Ord1; // C2 | D1 diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOfOnInterface.types b/tests/baselines/reference/typeGuardOfFormInstanceOfOnInterface.types new file mode 100644 index 00000000000..7bf67da1500 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormInstanceOfOnInterface.types @@ -0,0 +1,162 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOfOnInterface.ts === +// A type guard of the form x instanceof C, where C is of a subtype of the global type 'Function' +// and C has a property named 'prototype' +// - when true, narrows the type of x to the type of the 'prototype' property in C provided +// it is a subtype of the type of x, or +// - when false, has no effect on the type of x. + +interface C1 { +>C1 : C1 + + (): C1; +>C1 : C1 + + prototype: C1; +>prototype : C1 +>C1 : C1 + + p1: string; +>p1 : string +} +interface C2 { +>C2 : C2 + + (): C2; +>C2 : C2 + + prototype: C2; +>prototype : C2 +>C2 : C2 + + p2: number; +>p2 : number +} +interface D1 extends C1 { +>D1 : D1 +>C1 : C1 + + prototype: D1; +>prototype : D1 +>D1 : D1 + + p3: number; +>p3 : number +} +var str: string; +>str : string + +var num: number; +>num : number + +var strOrNum: string | number; +>strOrNum : string | number + +var c1: C1; +>c1 : C1 +>C1 : C1 + +var c2: C2; +>c2 : C2 +>C2 : C2 + +var d1: D1; +>d1 : D1 +>D1 : D1 + +var c1Orc2: C1 | C2; +>c1Orc2 : C1 | C2 +>C1 : C1 +>C2 : C2 + +str = c1Orc2 instanceof c1 && c1Orc2.p1; // C1 +>str = c1Orc2 instanceof c1 && c1Orc2.p1 : string +>str : string +>c1Orc2 instanceof c1 && c1Orc2.p1 : string +>c1Orc2 instanceof c1 : boolean +>c1Orc2 : C1 | C2 +>c1 : C1 +>c1Orc2.p1 : string +>c1Orc2 : C1 +>p1 : string + +num = c1Orc2 instanceof c2 && c1Orc2.p2; // C2 +>num = c1Orc2 instanceof c2 && c1Orc2.p2 : number +>num : number +>c1Orc2 instanceof c2 && c1Orc2.p2 : number +>c1Orc2 instanceof c2 : boolean +>c1Orc2 : C1 | C2 +>c2 : C2 +>c1Orc2.p2 : number +>c1Orc2 : C2 +>p2 : number + +str = c1Orc2 instanceof d1 && c1Orc2.p1; // C1 +>str = c1Orc2 instanceof d1 && c1Orc2.p1 : string +>str : string +>c1Orc2 instanceof d1 && c1Orc2.p1 : string +>c1Orc2 instanceof d1 : boolean +>c1Orc2 : C1 | C2 +>d1 : D1 +>c1Orc2.p1 : string +>c1Orc2 : D1 +>p1 : string + +num = c1Orc2 instanceof d1 && c1Orc2.p3; // D1 +>num = c1Orc2 instanceof d1 && c1Orc2.p3 : number +>num : number +>c1Orc2 instanceof d1 && c1Orc2.p3 : number +>c1Orc2 instanceof d1 : boolean +>c1Orc2 : C1 | C2 +>d1 : D1 +>c1Orc2.p3 : number +>c1Orc2 : D1 +>p3 : number + +var c2Ord1: C2 | D1; +>c2Ord1 : C2 | D1 +>C2 : C2 +>D1 : D1 + +num = c2Ord1 instanceof c2 && c2Ord1.p2; // C2 +>num = c2Ord1 instanceof c2 && c2Ord1.p2 : number +>num : number +>c2Ord1 instanceof c2 && c2Ord1.p2 : number +>c2Ord1 instanceof c2 : boolean +>c2Ord1 : C2 | D1 +>c2 : C2 +>c2Ord1.p2 : number +>c2Ord1 : C2 +>p2 : number + +num = c2Ord1 instanceof d1 && c2Ord1.p3; // D1 +>num = c2Ord1 instanceof d1 && c2Ord1.p3 : number +>num : number +>c2Ord1 instanceof d1 && c2Ord1.p3 : number +>c2Ord1 instanceof d1 : boolean +>c2Ord1 : C2 | D1 +>d1 : D1 +>c2Ord1.p3 : number +>c2Ord1 : D1 +>p3 : number + +str = c2Ord1 instanceof d1 && c2Ord1.p1; // D1 +>str = c2Ord1 instanceof d1 && c2Ord1.p1 : string +>str : string +>c2Ord1 instanceof d1 && c2Ord1.p1 : string +>c2Ord1 instanceof d1 : boolean +>c2Ord1 : C2 | D1 +>d1 : D1 +>c2Ord1.p1 : string +>c2Ord1 : D1 +>p1 : string + +var r2: D1 | C2 = c2Ord1 instanceof c1 && c2Ord1; // C2 | D1 +>r2 : C2 | D1 +>D1 : D1 +>C2 : C2 +>c2Ord1 instanceof c1 && c2Ord1 : C2 | D1 +>c2Ord1 instanceof c1 : boolean +>c2Ord1 : C2 | D1 +>c1 : C1 +>c2Ord1 : C2 | D1 + diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOfOnInterface.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOfOnInterface.ts new file mode 100644 index 00000000000..47e17667bcb --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOfOnInterface.ts @@ -0,0 +1,38 @@ +// A type guard of the form x instanceof C, where C is of a subtype of the global type 'Function' +// and C has a property named 'prototype' +// - when true, narrows the type of x to the type of the 'prototype' property in C provided +// it is a subtype of the type of x, or +// - when false, has no effect on the type of x. + +interface C1 { + (): C1; + prototype: C1; + p1: string; +} +interface C2 { + (): C2; + prototype: C2; + p2: number; +} +interface D1 extends C1 { + prototype: D1; + p3: number; +} +var str: string; +var num: number; +var strOrNum: string | number; + +var c1: C1; +var c2: C2; +var d1: D1; +var c1Orc2: C1 | C2; +str = c1Orc2 instanceof c1 && c1Orc2.p1; // C1 +num = c1Orc2 instanceof c2 && c1Orc2.p2; // C2 +str = c1Orc2 instanceof d1 && c1Orc2.p1; // C1 +num = c1Orc2 instanceof d1 && c1Orc2.p3; // D1 + +var c2Ord1: C2 | D1; +num = c2Ord1 instanceof c2 && c2Ord1.p2; // C2 +num = c2Ord1 instanceof d1 && c2Ord1.p3; // D1 +str = c2Ord1 instanceof d1 && c2Ord1.p1; // D1 +var r2: D1 | C2 = c2Ord1 instanceof c1 && c2Ord1; // C2 | D1 \ No newline at end of file From 152c77cd2a1f8043f07f88e01ff0263ffdfc0abd Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 12 Nov 2014 12:49:29 -0800 Subject: [PATCH 098/154] Add test cases for typeof x == s and typeof x != s form of typeguard which has no effect on narrowing type --- ...eGuardOfFormTypeOfEqualEqualHasNoEffect.js | 73 +++++++++++++++++ ...ardOfFormTypeOfEqualEqualHasNoEffect.types | 78 +++++++++++++++++++ ...ypeGuardOfFormTypeOfNotEqualHasNoEffect.js | 73 +++++++++++++++++ ...GuardOfFormTypeOfNotEqualHasNoEffect.types | 78 +++++++++++++++++++ ...eGuardOfFormTypeOfEqualEqualHasNoEffect.ts | 35 +++++++++ ...ypeGuardOfFormTypeOfNotEqualHasNoEffect.ts | 35 +++++++++ 6 files changed, 372 insertions(+) create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.js create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.js create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.js b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.js new file mode 100644 index 00000000000..0e7ada149df --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.js @@ -0,0 +1,73 @@ +//// [typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts] +class C { private p: string }; + +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrC: string | C; + +// typeof x == s has not effect on typeguard +if (typeof strOrNum == "string") { + var r1 = strOrNum; // string | number +} +else { + var r1 = strOrNum; // string | number +} + +if (typeof strOrBool == "boolean") { + var r2 = strOrBool; // string | boolean +} +else { + var r2 = strOrBool; // string | boolean +} + +if (typeof numOrBool == "number") { + var r3 = numOrBool; // number | boolean +} +else { + var r3 = numOrBool; // number | boolean +} + +if (typeof strOrC == "Object") { + var r4 = strOrC; // string | C +} +else { + var r4 = strOrC; // string | C +} + +//// [typeGuardOfFormTypeOfEqualEqualHasNoEffect.js] +var C = (function () { + function C() { + } + return C; +})(); +; +var strOrNum; +var strOrBool; +var numOrBool; +var strOrC; +// typeof x == s has not effect on typeguard +if (typeof strOrNum == "string") { + var r1 = strOrNum; // string | number +} +else { + var r1 = strOrNum; // string | number +} +if (typeof strOrBool == "boolean") { + var r2 = strOrBool; // string | boolean +} +else { + var r2 = strOrBool; // string | boolean +} +if (typeof numOrBool == "number") { + var r3 = numOrBool; // number | boolean +} +else { + var r3 = numOrBool; // number | boolean +} +if (typeof strOrC == "Object") { + var r4 = strOrC; // string | C +} +else { + var r4 = strOrC; // string | C +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types new file mode 100644 index 00000000000..14d4cd61c51 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types @@ -0,0 +1,78 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts === +class C { private p: string }; +>C : C +>p : string + +var strOrNum: string | number; +>strOrNum : string | number + +var strOrBool: string | boolean; +>strOrBool : string | boolean + +var numOrBool: number | boolean +>numOrBool : number | boolean + +var strOrC: string | C; +>strOrC : string | C +>C : C + +// typeof x == s has not effect on typeguard +if (typeof strOrNum == "string") { +>typeof strOrNum == "string" : boolean +>typeof strOrNum : string +>strOrNum : string | number + + var r1 = strOrNum; // string | number +>r1 : string | number +>strOrNum : string | number +} +else { + var r1 = strOrNum; // string | number +>r1 : string | number +>strOrNum : string | number +} + +if (typeof strOrBool == "boolean") { +>typeof strOrBool == "boolean" : boolean +>typeof strOrBool : string +>strOrBool : string | boolean + + var r2 = strOrBool; // string | boolean +>r2 : string | boolean +>strOrBool : string | boolean +} +else { + var r2 = strOrBool; // string | boolean +>r2 : string | boolean +>strOrBool : string | boolean +} + +if (typeof numOrBool == "number") { +>typeof numOrBool == "number" : boolean +>typeof numOrBool : string +>numOrBool : number | boolean + + var r3 = numOrBool; // number | boolean +>r3 : number | boolean +>numOrBool : number | boolean +} +else { + var r3 = numOrBool; // number | boolean +>r3 : number | boolean +>numOrBool : number | boolean +} + +if (typeof strOrC == "Object") { +>typeof strOrC == "Object" : boolean +>typeof strOrC : string +>strOrC : string | C + + var r4 = strOrC; // string | C +>r4 : string | C +>strOrC : string | C +} +else { + var r4 = strOrC; // string | C +>r4 : string | C +>strOrC : string | C +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.js b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.js new file mode 100644 index 00000000000..6a9851b51ab --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.js @@ -0,0 +1,73 @@ +//// [typeGuardOfFormTypeOfNotEqualHasNoEffect.ts] +class C { private p: string }; + +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrC: string | C; + +// typeof x != s has not effect on typeguard +if (typeof strOrNum != "string") { + var r1 = strOrNum; // string | number +} +else { + var r1 = strOrNum; // string | number +} + +if (typeof strOrBool != "boolean") { + var r2 = strOrBool; // string | boolean +} +else { + var r2 = strOrBool; // string | boolean +} + +if (typeof numOrBool != "number") { + var r3 = numOrBool; // number | boolean +} +else { + var r3 = numOrBool; // number | boolean +} + +if (typeof strOrC != "Object") { + var r4 = strOrC; // string | C +} +else { + var r4 = strOrC; // string | C +} + +//// [typeGuardOfFormTypeOfNotEqualHasNoEffect.js] +var C = (function () { + function C() { + } + return C; +})(); +; +var strOrNum; +var strOrBool; +var numOrBool; +var strOrC; +// typeof x != s has not effect on typeguard +if (typeof strOrNum != "string") { + var r1 = strOrNum; // string | number +} +else { + var r1 = strOrNum; // string | number +} +if (typeof strOrBool != "boolean") { + var r2 = strOrBool; // string | boolean +} +else { + var r2 = strOrBool; // string | boolean +} +if (typeof numOrBool != "number") { + var r3 = numOrBool; // number | boolean +} +else { + var r3 = numOrBool; // number | boolean +} +if (typeof strOrC != "Object") { + var r4 = strOrC; // string | C +} +else { + var r4 = strOrC; // string | C +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types new file mode 100644 index 00000000000..322799f6f7a --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types @@ -0,0 +1,78 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts === +class C { private p: string }; +>C : C +>p : string + +var strOrNum: string | number; +>strOrNum : string | number + +var strOrBool: string | boolean; +>strOrBool : string | boolean + +var numOrBool: number | boolean +>numOrBool : number | boolean + +var strOrC: string | C; +>strOrC : string | C +>C : C + +// typeof x != s has not effect on typeguard +if (typeof strOrNum != "string") { +>typeof strOrNum != "string" : boolean +>typeof strOrNum : string +>strOrNum : string | number + + var r1 = strOrNum; // string | number +>r1 : string | number +>strOrNum : string | number +} +else { + var r1 = strOrNum; // string | number +>r1 : string | number +>strOrNum : string | number +} + +if (typeof strOrBool != "boolean") { +>typeof strOrBool != "boolean" : boolean +>typeof strOrBool : string +>strOrBool : string | boolean + + var r2 = strOrBool; // string | boolean +>r2 : string | boolean +>strOrBool : string | boolean +} +else { + var r2 = strOrBool; // string | boolean +>r2 : string | boolean +>strOrBool : string | boolean +} + +if (typeof numOrBool != "number") { +>typeof numOrBool != "number" : boolean +>typeof numOrBool : string +>numOrBool : number | boolean + + var r3 = numOrBool; // number | boolean +>r3 : number | boolean +>numOrBool : number | boolean +} +else { + var r3 = numOrBool; // number | boolean +>r3 : number | boolean +>numOrBool : number | boolean +} + +if (typeof strOrC != "Object") { +>typeof strOrC != "Object" : boolean +>typeof strOrC : string +>strOrC : string | C + + var r4 = strOrC; // string | C +>r4 : string | C +>strOrC : string | C +} +else { + var r4 = strOrC; // string | C +>r4 : string | C +>strOrC : string | C +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts new file mode 100644 index 00000000000..03d650ad626 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts @@ -0,0 +1,35 @@ +class C { private p: string }; + +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrC: string | C; + +// typeof x == s has not effect on typeguard +if (typeof strOrNum == "string") { + var r1 = strOrNum; // string | number +} +else { + var r1 = strOrNum; // string | number +} + +if (typeof strOrBool == "boolean") { + var r2 = strOrBool; // string | boolean +} +else { + var r2 = strOrBool; // string | boolean +} + +if (typeof numOrBool == "number") { + var r3 = numOrBool; // number | boolean +} +else { + var r3 = numOrBool; // number | boolean +} + +if (typeof strOrC == "Object") { + var r4 = strOrC; // string | C +} +else { + var r4 = strOrC; // string | C +} \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts new file mode 100644 index 00000000000..19d5495fcbb --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts @@ -0,0 +1,35 @@ +class C { private p: string }; + +var strOrNum: string | number; +var strOrBool: string | boolean; +var numOrBool: number | boolean +var strOrC: string | C; + +// typeof x != s has not effect on typeguard +if (typeof strOrNum != "string") { + var r1 = strOrNum; // string | number +} +else { + var r1 = strOrNum; // string | number +} + +if (typeof strOrBool != "boolean") { + var r2 = strOrBool; // string | boolean +} +else { + var r2 = strOrBool; // string | boolean +} + +if (typeof numOrBool != "number") { + var r3 = numOrBool; // number | boolean +} +else { + var r3 = numOrBool; // number | boolean +} + +if (typeof strOrC != "Object") { + var r4 = strOrC; // string | C +} +else { + var r4 = strOrC; // string | C +} \ No newline at end of file From 32f6cf33cefab17271e5f6ac546f80febb5aaa98 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Nov 2014 15:10:57 -0800 Subject: [PATCH 099/154] Corrected token start position calculation & nodeHasTokens predicate. --- src/compiler/parser.ts | 3 +++ src/services/utilities.ts | 14 ++++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 4849cb8c89e..d20eadd0bf3 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -40,6 +40,9 @@ module ts { } export function getTokenPosOfNode(node: Node, sourceFile?: SourceFile): number { + if (node.pos === node.end) { + return node.pos; + } return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 88e3601b610..8745421c269 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -220,19 +220,13 @@ module ts { } function nodeHasTokens(n: Node): boolean { - if (n.kind === SyntaxKind.ExpressionStatement) { - return nodeHasTokens((n).expression); - } - - if (n.kind === SyntaxKind.EndOfFileToken || - n.kind === SyntaxKind.OmittedExpression || - n.kind === SyntaxKind.Missing || - n.kind === SyntaxKind.Unknown) { + if (n.kind === SyntaxKind.Unknown) { return false; } - // SyntaxList is already realized so getChildCount should be fast and non-expensive - return n.kind !== SyntaxKind.SyntaxList || n.getChildCount() !== 0; + // If we have a token or node that has a non-zero width, it must have tokens. + // Note, that getWidth() does not take trivia into account. + return n.getWidth() !== 0; } export function getTypeArgumentOrTypeParameterList(node: Node): NodeArray { From c147507de1e0df81cd88fa620d4c63bd168d6bd7 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Nov 2014 15:47:14 -0800 Subject: [PATCH 100/154] Added comment. --- src/compiler/parser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index d20eadd0bf3..c7818f2e1bb 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -34,12 +34,13 @@ module ts { return file.filename + "(" + loc.line + "," + loc.character + ")"; } - export function getStartPosOfNode(node: Node): number { return node.pos; } export function getTokenPosOfNode(node: Node, sourceFile?: SourceFile): number { + // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* + // want to skip trivia because this will launch us forward to the next token. if (node.pos === node.end) { return node.pos; } From e8ec2966a264a2c61bfe841697035e188ca39d9b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Nov 2014 17:23:00 -0800 Subject: [PATCH 101/154] Removed lookup of TemplateStringsArray for non-ES6 targets. This will enable custom ES3/ES5 lib.d.ts files that omit the TemplateStringsArray type, but don't need it anyway. --- src/compiler/checker.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5a990d4e9db..ac1edd33f6a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9102,7 +9102,10 @@ module ts { globalNumberType = getGlobalType("Number"); globalBooleanType = getGlobalType("Boolean"); globalRegExpType = getGlobalType("RegExp"); - globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); + + if (compilerOptions.target >= ScriptTarget.ES6) { + globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); + } } initializeTypeChecker(); From 828e31b318246194e6124f08b6e1faa57ee3d2c8 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Nov 2014 18:08:16 -0800 Subject: [PATCH 102/154] Baselines, using 'unknown' as a default type. --- src/compiler/checker.ts | 8 +++++--- tests/baselines/reference/noDefaultLib.errors.txt | 2 -- tests/baselines/reference/parser509698.errors.txt | 2 -- .../project/noDefaultLib/amd/noDefaultLib.errors.txt | 2 -- .../project/noDefaultLib/node/noDefaultLib.errors.txt | 2 -- .../baselines/reference/typeCheckTypeArgument.errors.txt | 2 -- 6 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ac1edd33f6a..11d91875838 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9103,9 +9103,11 @@ module ts { globalBooleanType = getGlobalType("Boolean"); globalRegExpType = getGlobalType("RegExp"); - if (compilerOptions.target >= ScriptTarget.ES6) { - globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); - } + // If we're in ES6 mode, load the TemplateStringsArray. + // Otherwise, default to 'unknown' for the purposes of type checking in LS scenarios. + globalTemplateStringsArrayType = compilerOptions.target >= ScriptTarget.ES6 + ? getGlobalType("TemplateStringsArray") + : unknownType; } initializeTypeChecker(); diff --git a/tests/baselines/reference/noDefaultLib.errors.txt b/tests/baselines/reference/noDefaultLib.errors.txt index f2c23d56d25..02098950055 100644 --- a/tests/baselines/reference/noDefaultLib.errors.txt +++ b/tests/baselines/reference/noDefaultLib.errors.txt @@ -1,12 +1,10 @@ error TS2318: Cannot find global type 'Boolean'. error TS2318: Cannot find global type 'IArguments'. -error TS2318: Cannot find global type 'TemplateStringsArray'. tests/cases/compiler/noDefaultLib.ts(4,11): error TS2317: Global type 'Array' must have 1 type parameter(s). !!! error TS2318: Cannot find global type 'Boolean'. !!! error TS2318: Cannot find global type 'IArguments'. -!!! error TS2318: Cannot find global type 'TemplateStringsArray'. ==== tests/cases/compiler/noDefaultLib.ts (1 errors) ==== /// var x; diff --git a/tests/baselines/reference/parser509698.errors.txt b/tests/baselines/reference/parser509698.errors.txt index 2a8cc607e1e..2aaaec18dc2 100644 --- a/tests/baselines/reference/parser509698.errors.txt +++ b/tests/baselines/reference/parser509698.errors.txt @@ -6,7 +6,6 @@ error TS2318: Cannot find global type 'Number'. error TS2318: Cannot find global type 'Object'. error TS2318: Cannot find global type 'RegExp'. error TS2318: Cannot find global type 'String'. -error TS2318: Cannot find global type 'TemplateStringsArray'. !!! error TS2318: Cannot find global type 'Array'. @@ -17,7 +16,6 @@ error TS2318: Cannot find global type 'TemplateStringsArray'. !!! error TS2318: Cannot find global type 'Object'. !!! error TS2318: Cannot find global type 'RegExp'. !!! error TS2318: Cannot find global type 'String'. -!!! error TS2318: Cannot find global type 'TemplateStringsArray'. ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509698.ts (0 errors) ==== ///