Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Libadalang build-in functionality #6

Open
DamDC91 opened this issue Jun 10, 2022 · 1 comment
Open

Use Libadalang build-in functionality #6

DamDC91 opened this issue Jun 10, 2022 · 1 comment

Comments

@DamDC91
Copy link

DamDC91 commented Jun 10, 2022

why not use https://github.com/cwi-swat/ada-air/blob/e4506fef724e8cbf30ef1600c67488a84dd0716f/test/lal-type-hierarchy/src/utils.adb#L35-L36 instead of

function Find
(Node : Ada_Node'Class; Node_Kind : Ada_Node_Kind_Type)
return Node_List.Vector
is
function Predicate (Node : Ada_Node'Class) return Boolean;
function Predicate (Node : Ada_Node'Class) return Boolean is
begin
return Node.Kind = Node_Kind;
end Predicate;
begin
return Find_Predicate (Node, Predicate'Access, Into);
end Find;

@pjljvandelaar
Copy link
Collaborator

Needs some investigation:

  1. Should we use a While Next (Node) loop or the Consume function?
  2. What are all locations where we could / should use Libadalang.Iterators.Ada_Node_Predicate instead of proprietary instances?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants