AdaCore / libadalang

Ada semantic analysis library.
https://www.adacore.com
Other
146 stars 42 forks source link

Missing documentation on some F_... functions #945

Closed DamDC91 closed 2 years ago

DamDC91 commented 2 years ago

Hello,

I’m working on an open source LangKit plugin to export LibAdaLang analysis in Rascal.

Some of my plugin logic is based on the precise_types property of the LangKit class Field. This property is supposed to return the precise set of types that this field can contain. However, sometimes this property gives an irrelevant output. In other words, some Libadalang F_... functions don’t have documentation on which type can be returned.

The following functions/fields are the ones that are problematic for me:

   function F_Args
     (Node : Attribute_Ref'Class) return Ada_Node;

   function F_Components
     (Node : Component_List'Class) return Ada_Node_List;

Calling precise_types on these fields gives me all the types (not very precise).

I think improving the documentation of LibAdaLang will benefit every user in addition to help me.

Thanks for your help.

Damien

pmderodat commented 2 years ago

Hello @DamDC91,

Thank you for reporting this issue. We are working on a fix.

Best regards,

pmderodat commented 2 years ago

Hello again,

This error was due to a defficiency of our heuristic to compute precise types from parsing rules. It is now fixed, thank you again for reporting this.