Skip to content

Commit 85ddc35

Browse files
committed
respond to code review comments
1 parent d8b4377 commit 85ddc35

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/compiler/parser.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,7 @@ module ts {
556556
if (node.kind === kind) {
557557
return node;
558558
}
559-
else {
560-
node = node.parent;
561-
}
559+
node = node.parent;
562560
}
563561
break;
564562
}

src/services/services.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ module ts {
17901790
return false;
17911791
}
17921792

1793-
function isToken(kind: SyntaxKind) {
1793+
function isPunctuation(kind: SyntaxKind) {
17941794
return (SyntaxKind.FirstPunctuation <= kind && kind <= SyntaxKind.LastPunctuation);
17951795
}
17961796

@@ -1883,7 +1883,7 @@ module ts {
18831883

18841884
// TODO: this is a hack for now, we need a proper walking mechanism to verify that we have the correct node
18851885
var mappedNode = getNodeAtPosition(sourceFile, TypeScript.end(node) - 1);
1886-
if (isToken(mappedNode.kind)) {
1886+
if (isPunctuation(mappedNode.kind)) {
18871887
mappedNode = mappedNode.parent;
18881888
}
18891889

@@ -1905,7 +1905,6 @@ module ts {
19051905
var containingClass = getAncestor(mappedNode, SyntaxKind.ClassDeclaration);
19061906
isMemberCompletion = true;
19071907

1908-
19091908
if (mappedNode.kind === SyntaxKind.Identifier || mappedNode.kind === SyntaxKind.QualifiedName || mappedNode.kind === SyntaxKind.PropertyAccess) {
19101909
var symbol = typeInfoResolver.getSymbolInfo(mappedNode);
19111910
if (symbol && symbol.flags & SymbolFlags.HasExports) {

0 commit comments

Comments
 (0)