-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/1390' into 'master'
Make DefiningName's basic_decl property bypass internal nodes. Closes #1390 See merge request eng/libadalang/libadalang!1656
- Loading branch information
Showing
4 changed files
with
95 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
procedure Test is | ||
task My_Task; | ||
--% node.find(lal.DefiningName).p_basic_decl | ||
|
||
task body My_Task is | ||
begin | ||
null; | ||
end My_Task; | ||
--% node.find(lal.DefiningName).p_basic_decl | ||
|
||
task type My_Task_Type; | ||
--% node.find(lal.DefiningName).p_basic_decl | ||
|
||
task body My_Task_Type is | ||
begin | ||
null; | ||
end My_Task_Type; | ||
--% node.find(lal.DefiningName).p_basic_decl | ||
|
||
generic | ||
package Pkg is | ||
end Pkg; | ||
--% node.find(lal.DefiningName).p_basic_decl | ||
|
||
generic | ||
procedure Foo; | ||
--% node.find(lal.DefiningName).p_basic_decl | ||
|
||
procedure Foo is null; | ||
--% node.find(lal.DefiningName).p_basic_decl | ||
begin | ||
null; | ||
end Test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Working on node <SingleTaskDecl ["My_Task"] test.adb:2:4-2:17> | ||
============================================================== | ||
|
||
Eval 'node.find(lal.DefiningName).p_basic_decl' | ||
Result: <SingleTaskDecl ["My_Task"] test.adb:2:4-2:17> | ||
|
||
Working on node <TaskBody ["My_Task"] test.adb:5:4-8:16> | ||
======================================================== | ||
|
||
Eval 'node.find(lal.DefiningName).p_basic_decl' | ||
Result: <TaskBody ["My_Task"] test.adb:5:4-8:16> | ||
|
||
Working on node <TaskTypeDecl ["My_Task_Type"] test.adb:11:4-11:27> | ||
=================================================================== | ||
|
||
Eval 'node.find(lal.DefiningName).p_basic_decl' | ||
Result: <TaskTypeDecl ["My_Task_Type"] test.adb:11:4-11:27> | ||
|
||
Working on node <TaskBody ["My_Task_Type"] test.adb:14:4-17:21> | ||
=============================================================== | ||
|
||
Eval 'node.find(lal.DefiningName).p_basic_decl' | ||
Result: <TaskBody ["My_Task_Type"] test.adb:14:4-17:21> | ||
|
||
Working on node <GenericPackageInternal ["Pkg"] test.adb:21:4-22:12> | ||
==================================================================== | ||
|
||
Eval 'node.find(lal.DefiningName).p_basic_decl' | ||
Result: <GenericPackageDecl ["Pkg"] test.adb:20:4-22:12> | ||
|
||
Working on node <GenericSubpDecl ["Foo"] test.adb:25:4-26:18> | ||
============================================================= | ||
|
||
Eval 'node.find(lal.DefiningName).p_basic_decl' | ||
Result: <GenericSubpDecl ["Foo"] test.adb:25:4-26:18> | ||
|
||
Working on node <NullSubpDecl ["Foo"] test.adb:29:4-29:26> | ||
========================================================== | ||
|
||
Eval 'node.find(lal.DefiningName).p_basic_decl' | ||
Result: <NullSubpDecl ["Foo"] test.adb:29:4-29:26> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
driver: inline-playground | ||
input_sources: [test.adb] |