File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
src/PowerShellEditorServices/Services/Symbols Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ private AstVisitAction AddReference(SymbolReference symbol)
90
90
return existing ;
91
91
} ) ;
92
92
93
- return AstVisitAction . Continue ;
93
+ return symbol . SymbolType is SymbolType . Parameter
94
+ ? AstVisitAction . SkipChildren : AstVisitAction . Continue ;
94
95
}
95
96
}
Original file line number Diff line number Diff line change @@ -68,13 +68,14 @@ public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst fun
68
68
isDeclaration : true ) ) ;
69
69
}
70
70
71
- public override AstVisitAction VisitCommandParameter ( CommandParameterAst commandParameterAst )
71
+ public override AstVisitAction VisitParameter ( ParameterAst parameterAst )
72
72
{
73
+ // TODO: When we add DisplayString, include the default value.
73
74
return _action ( new SymbolReference (
74
75
SymbolType . Parameter ,
75
- commandParameterAst . Extent . Text ,
76
- commandParameterAst . Extent ,
77
- commandParameterAst . Extent ,
76
+ $ "$ { parameterAst . Name . VariablePath . UserPath } " ,
77
+ parameterAst . Name . Extent ,
78
+ parameterAst . Extent ,
78
79
_file ,
79
80
isDeclaration : true ) ) ;
80
81
}
You can’t perform that action at this time.
0 commit comments