|
| 1 | +------------------------------------------------------------------------------ |
| 2 | +-- Language Server Protocol -- |
| 3 | +-- -- |
| 4 | +-- Copyright (C) 2025, AdaCore -- |
| 5 | +-- -- |
| 6 | +-- This is free software; you can redistribute it and/or modify it under -- |
| 7 | +-- terms of the GNU General Public License as published by the Free Soft- -- |
| 8 | +-- ware Foundation; either version 3, or (at your option) any later ver- -- |
| 9 | +-- sion. This software is distributed in the hope that it will be useful, -- |
| 10 | +-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- |
| 11 | +-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- |
| 12 | +-- License for more details. You should have received a copy of the GNU -- |
| 13 | +-- General Public License distributed with this software; see file -- |
| 14 | +-- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- |
| 15 | +-- of the license. -- |
| 16 | +------------------------------------------------------------------------------ |
| 17 | + |
| 18 | +package body LSP.Ada_Job_Contexts is |
| 19 | + |
| 20 | + ---------------------------- |
| 21 | + -- Imprecise_Resolve_Name -- |
| 22 | + ---------------------------- |
| 23 | + |
| 24 | + procedure Imprecise_Resolve_Name |
| 25 | + (Self : in out Ada_Job_Context'Class; |
| 26 | + Context : LSP.Ada_Contexts.Context; |
| 27 | + Position : LSP.Structures.TextDocumentPositionParams'Class; |
| 28 | + Name : out Libadalang.Analysis.Defining_Name; |
| 29 | + Origin : out Libadalang.Analysis.Ada_Node) is |
| 30 | + begin |
| 31 | + Origin := Self.Get_Node_At (Context, Position); |
| 32 | + Name := |
| 33 | + Self.Imprecise_Resolve_Name |
| 34 | + (Laltools.Common.Get_Node_As_Name (Origin)); |
| 35 | + end Imprecise_Resolve_Name; |
| 36 | + |
| 37 | +end LSP.Ada_Job_Contexts; |
0 commit comments