@@ -787,7 +787,7 @@ module ts {
787787
788788 // Resolves a qualified name and any involved aliases
789789 function resolveEntityName(name: EntityName | Expression, meaning: SymbolFlags): Symbol {
790- if (getFullWidth (name) === 0 ) {
790+ if (nodeIsMissing (name)) {
791791 return undefined;
792792 }
793793
@@ -803,7 +803,7 @@ module ts {
803803 let right = name.kind === SyntaxKind.QualifiedName ? (<QualifiedName>name).right : (<PropertyAccessExpression>name).name;
804804
805805 let namespace = resolveEntityName(left, SymbolFlags.Namespace);
806- if (!namespace || namespace === unknownSymbol || getFullWidth (right) === 0 ) {
806+ if (!namespace || namespace === unknownSymbol || nodeIsMissing (right)) {
807807 return undefined;
808808 }
809809 symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning);
@@ -4986,7 +4986,7 @@ module ts {
49864986 function getResolvedSymbol(node: Identifier): Symbol {
49874987 let links = getNodeLinks(node);
49884988 if (!links.resolvedSymbol) {
4989- links.resolvedSymbol = (getFullWidth (node) > 0 && resolveName(node, node.text, SymbolFlags.Value | SymbolFlags.ExportValue, Diagnostics.Cannot_find_name_0, node)) || unknownSymbol;
4989+ links.resolvedSymbol = (!nodeIsMissing (node) && resolveName(node, node.text, SymbolFlags.Value | SymbolFlags.ExportValue, Diagnostics.Cannot_find_name_0, node)) || unknownSymbol;
49904990 }
49914991 return links.resolvedSymbol;
49924992 }
@@ -6484,7 +6484,7 @@ module ts {
64846484 let templateExpression = <TemplateExpression>tagExpression.template;
64856485 let lastSpan = lastOrUndefined(templateExpression.templateSpans);
64866486 Debug.assert(lastSpan !== undefined); // we should always have at least one span.
6487- callIsIncomplete = getFullWidth (lastSpan.literal) === 0 || !!lastSpan.literal.isUnterminated;
6487+ callIsIncomplete = nodeIsMissing (lastSpan.literal) || !!lastSpan.literal.isUnterminated;
64886488 }
64896489 else {
64906490 // If the template didn't end in a backtick, or its beginning occurred right prior to EOF,
@@ -8477,7 +8477,7 @@ module ts {
84778477 let isConstructor = (symbol.flags & SymbolFlags.Constructor) !== 0;
84788478
84798479 function reportImplementationExpectedError(node: FunctionLikeDeclaration): void {
8480- if (node.name && getFullWidth (node.name) === 0 ) {
8480+ if (node.name && nodeIsMissing (node.name)) {
84818481 return;
84828482 }
84838483
@@ -10330,7 +10330,7 @@ module ts {
1033010330
1033110331 function checkExternalImportOrExportDeclaration(node: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration): boolean {
1033210332 let moduleName = getExternalModuleName(node);
10333- if (getFullWidth (moduleName) !== 0 && moduleName.kind !== SyntaxKind.StringLiteral) {
10333+ if (!nodeIsMissing (moduleName) && moduleName.kind !== SyntaxKind.StringLiteral) {
1033410334 error(moduleName, Diagnostics.String_literal_expected);
1033510335 return false;
1033610336 }
@@ -11077,7 +11077,7 @@ module ts {
1107711077 return resolveEntityName(<EntityName>entityName, meaning);
1107811078 }
1107911079 else if (isExpression(entityName)) {
11080- if (getFullWidth (entityName) === 0 ) {
11080+ if (nodeIsMissing (entityName)) {
1108111081 // Missing entity name.
1108211082 return undefined;
1108311083 }
0 commit comments