@@ -10952,27 +10952,6 @@ func (file *SourceFile) GetNameTable() map[string]int {
1095210952 file .nameTableOnce .Do (func () {
1095310953 nameTable := make (map [string ]int , file .IdentifierCount )
1095410954
10955- isTagName := func (node * Node ) bool {
10956- return node .Parent != nil && IsJSDocTag (node .Parent ) && node .Parent .TagName () == node
10957- }
10958-
10959- isArgumentOfElementAccessExpression := func (node * Node ) bool {
10960- return node != nil && node .Parent != nil &&
10961- node .Parent .Kind == KindElementAccessExpression &&
10962- node .Parent .AsElementAccessExpression ().ArgumentExpression == node
10963- }
10964-
10965- // We want to store any numbers/strings if they were a name that could be
10966- // related to a declaration. So, if we have 'import x = require("something")'
10967- // then we want 'something' to be in the name table. Similarly, if we have
10968- // "a['propname']" then we want to store "propname" in the name table.
10969- literalIsName := func (node * Node ) bool {
10970- return IsDeclarationName (node ) ||
10971- node .Parent .Kind == KindExternalModuleReference ||
10972- isArgumentOfElementAccessExpression (node ) ||
10973- IsLiteralComputedPropertyDeclarationName (node )
10974- }
10975-
1097610955 var walk func (node * Node ) bool
1097710956 walk = func (node * Node ) bool {
1097810957 if IsIdentifier (node ) && ! isTagName (node ) && node .Text () != "" ||
@@ -10993,8 +10972,7 @@ func (file *SourceFile) GetNameTable() map[string]int {
1099310972 }
1099410973 return false
1099510974 }
10996-
10997- file .AsNode ().ForEachChild (walk )
10975+ file .ForEachChild (walk )
1099810976
1099910977 file .nameTable = nameTable
1100010978 })
0 commit comments