File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,18 @@ package body LSP.Ada_Execute_Command is
8282 else Ada.Tags.Internal_Tag
8383 (VSS.Strings.Conversions.To_UTF_8_String (Params.command)));
8484
85- Command : constant Command_Access :=
86- (if Tag = Ada.Tags.No_Tag then null
87- else new LSP.Ada_Commands.Command'Class'
88- (Create_Command (Tag, Params.arguments'Unrestricted_Access)));
85+ function Command return Command_Access;
86+ -- Construct corresponding command for known Tag or return null
87+
88+ function Command return Command_Access is
89+ Result : Command_Access;
90+ begin
91+ if Tag /= Ada.Tags.No_Tag then
92+ Result := new LSP.Ada_Commands.Command'Class'
93+ (Create_Command (Tag, Params.arguments'Unrestricted_Access));
94+ end if ;
95+ return Result;
96+ end Command ;
8997
9098 Result : constant LSP.Server_Jobs.Server_Job_Access :=
9199 new Ada_Execute_Command_Job'
You can’t perform that action at this time.
0 commit comments