Skip to content

Commit 1c4ead4

Browse files
committed
Quick fix to close #57
1 parent 4738ed2 commit 1c4ead4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/SourceBrowser.Generator/DocumentWalkers/CSWalker.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ public Token ProcessIdentifier(SyntaxToken token)
191191
var parentSymbol = _model.GetDeclaredSymbol(token.Parent);
192192
if (parentSymbol != null)
193193
{
194+
if(parentSymbol.Kind == SymbolKind.Parameter)
195+
{
196+
parentSymbol = parentSymbol.ContainingSymbol;
197+
}
194198
return ProcessDeclarationToken(token, parentSymbol);
195199
}
196200

src/SourceBrowser.Generator/DocumentWalkers/VBWalker.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ public Token ProcessIdentifier(SyntaxToken token)
191191
var parentSymbol = _model.GetDeclaredSymbol(token.Parent);
192192
if (parentSymbol != null)
193193
{
194+
if (parentSymbol.Kind == SymbolKind.Parameter)
195+
{
196+
parentSymbol = parentSymbol.ContainingSymbol;
197+
}
194198
return ProcessDeclarationToken(token, parentSymbol);
195199
}
196200

0 commit comments

Comments
 (0)