@@ -19,7 +19,7 @@ internal class FindReferencesVisitor : AstVisitor
1919 private Dictionary < String , String > AliasToCmdletDictionary ;
2020 private string symbolRefCommandName ;
2121 private bool needsAliases ;
22-
22+
2323 public List < SymbolReference > FoundReferences { get ; set ; }
2424
2525 /// <summary>
@@ -39,7 +39,7 @@ public FindReferencesVisitor(
3939 this . CmdletToAliasDictionary = CmdletToAliasDictionary ;
4040 this . AliasToCmdletDictionary = AliasToCmdletDictionary ;
4141
42- // Try to get the symbolReference's command name of an alias,
42+ // Try to get the symbolReference's command name of an alias,
4343 // if a command name does not exists (if the symbol isn't an alias to a command)
4444 // set symbolRefCommandName to and empty string value
4545 AliasToCmdletDictionary . TryGetValue ( symbolReference . ScriptRegion . Text , out symbolRefCommandName ) ;
@@ -60,7 +60,7 @@ public FindReferencesVisitor(SymbolReference foundSymbol)
6060
6161 /// <summary>
6262 /// Decides if the current command is a reference of the symbol being searched for.
63- /// A reference of the symbol will be a of type SymbolType.Function
63+ /// A reference of the symbol will be a of type SymbolType.Function
6464 /// and have the same name as the symbol
6565 /// </summary>
6666 /// <param name="commandAst">A CommandAst in the script's AST</param>
@@ -74,7 +74,7 @@ public override AstVisitAction VisitCommand(CommandAst commandAst)
7474 {
7575 if ( needsAliases )
7676 {
77- // Try to get the commandAst's name and aliases,
77+ // Try to get the commandAst's name and aliases,
7878 // if a command does not exists (if the symbol isn't an alias to a command)
7979 // set command to and empty string value string command
8080 // if the aliases do not exist (if the symvol isn't a command that has aliases)
@@ -85,11 +85,11 @@ public override AstVisitAction VisitCommand(CommandAst commandAst)
8585 AliasToCmdletDictionary . TryGetValue ( commandName , out command ) ;
8686 if ( alaises == null ) { alaises = new List < string > ( ) ; }
8787 if ( command == null ) { command = string . Empty ; }
88-
88+
8989 if ( symbolRef . SymbolType . Equals ( SymbolType . Function ) )
9090 {
9191 // Check if the found symbol's name is the same as the commandAst's name OR
92- // if the symbol's name is an alias for this commandAst's name (commandAst is a cmdlet) OR
92+ // if the symbol's name is an alias for this commandAst's name (commandAst is a cmdlet) OR
9393 // if the symbol's name is the same as the commandAst's cmdlet name (commandAst is a alias)
9494 if ( commandName . Equals ( symbolRef . SymbolName , StringComparison . CurrentCultureIgnoreCase ) ||
9595 alaises . Contains ( symbolRef . ScriptRegion . Text . ToLower ( ) ) ||
@@ -112,20 +112,20 @@ public override AstVisitAction VisitCommand(CommandAst commandAst)
112112 commandNameAst . Extent ) ) ;
113113 }
114114 }
115-
115+
116116 }
117117 return base . VisitCommand ( commandAst ) ;
118118 }
119119
120120 /// <summary>
121- /// Decides if the current function defintion is a reference of the symbol being searched for.
121+ /// Decides if the current function definition is a reference of the symbol being searched for.
122122 /// A reference of the symbol will be a of type SymbolType.Function and have the same name as the symbol
123123 /// </summary>
124124 /// <param name="functionDefinitionAst">A functionDefinitionAst in the script's AST</param>
125125 /// <returns>A visit action that continues the search for references</returns>
126126 public override AstVisitAction VisitFunctionDefinition ( FunctionDefinitionAst functionDefinitionAst )
127127 {
128- // Get the start column number of the function name,
128+ // Get the start column number of the function name,
129129 // instead of the the start column of 'function' and create new extent for the functionName
130130 int startColumnNumber =
131131 functionDefinitionAst . Extent . Text . IndexOf (
@@ -151,8 +151,8 @@ public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst fun
151151 }
152152
153153 /// <summary>
154- /// Decides if the current function defintion is a reference of the symbol being searched for.
155- /// A reference of the symbol will be a of type SymbolType.Parameter and have the same name as the symbol
154+ /// Decides if the current function definition is a reference of the symbol being searched for.
155+ /// A reference of the symbol will be a of type SymbolType.Parameter and have the same name as the symbol
156156 /// </summary>
157157 /// <param name="commandParameterAst">A commandParameterAst in the script's AST</param>
158158 /// <returns>A visit action that continues the search for references</returns>
@@ -169,8 +169,8 @@ public override AstVisitAction VisitCommandParameter(CommandParameterAst command
169169 }
170170
171171 /// <summary>
172- /// Decides if the current function defintion is a reference of the symbol being searched for.
173- /// A reference of the symbol will be a of type SymbolType.Variable and have the same name as the symbol
172+ /// Decides if the current function definition is a reference of the symbol being searched for.
173+ /// A reference of the symbol will be a of type SymbolType.Variable and have the same name as the symbol
174174 /// </summary>
175175 /// <param name="variableExpressionAst">A variableExpressionAst in the script's AST</param>
176176 /// <returns>A visit action that continues the search for references</returns>
@@ -186,4 +186,4 @@ public override AstVisitAction VisitVariableExpression(VariableExpressionAst var
186186 return AstVisitAction . Continue ;
187187 }
188188 }
189- }
189+ }
0 commit comments