Skip to content

Commit 3431795

Browse files
author
Kapil Borle
committed
Fix typo and add inline doc
1 parent 8f3855c commit 3431795

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/PowerShellEditorServices/Language/AstOperations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static public IEnumerable<SymbolReference> FindSymbolsInDocument(Ast scriptAst,
211211
{
212212
if (IsPowerShellDataFileAst(scriptAst))
213213
{
214-
var findHashtableSymbolsVisitor = new FindHashtabeSymbolsVisitor();
214+
var findHashtableSymbolsVisitor = new FindHashtableSymbolsVisitor();
215215
scriptAst.Visit(findHashtableSymbolsVisitor);
216216
symbolReferences = findHashtableSymbolsVisitor.SymbolReferences;
217217
}

src/PowerShellEditorServices/Language/FindSymbolsVisitor.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,27 @@ private bool IsAssignedAtScriptScope(VariableExpressionAst variableExpressionAst
9090
}
9191
}
9292

93-
internal class FindHashtabeSymbolsVisitor : AstVisitor
93+
/// <summary>
94+
/// Visitor to find all the keys in Hashtable AST
95+
/// </summary>
96+
internal class FindHashtableSymbolsVisitor : AstVisitor
9497
{
98+
/// <summary>
99+
/// List of symbols (keys) found in the hashtable
100+
/// </summary>
95101
public List<SymbolReference> SymbolReferences { get; private set; }
96102

97-
public FindHashtabeSymbolsVisitor()
103+
/// <summary>
104+
/// Initializes a new instance of FindHashtableSymbolsVisitor class
105+
/// </summary>
106+
public FindHashtableSymbolsVisitor()
98107
{
99108
SymbolReferences = new List<SymbolReference>();
100109
}
101110

111+
/// <summary>
112+
/// Adds keys in the input hashtable to the symbol reference
113+
/// </summary>
102114
public override AstVisitAction VisitHashtable(HashtableAst hashtableAst)
103115
{
104116
if (hashtableAst.KeyValuePairs == null)

0 commit comments

Comments
 (0)