Open pjljvandelaar opened 2 years ago
Hello @pjljvandelaar,
Because Libadalang may create a tree even in the presence of parsing errors, all node fields may be null. We’ll discuss if we’d want to augment these docstrings to specifically document the case of an error-free parsing.
Dear LibAdaLang developers,
Libadalang is nicely documented. For example, the function
F_Suffix
is documented inlibadalang-analysis.ads
as followsYet, I think there is room for improvement.
Suppose, I want to call
Kind
on the result ofX.F_Suffix
.Kind
requires that for its argumentY
holds thatY.Is_Null
returnsfalse
.However, the documentation of
F_Suffix
states nothing about whether the node returned byF_Suffix
can benull
. So, it is unclear whether a check likenot X.F_Suffix.Is_Null
isKind
orCan the documentation be extended with information about an Ada_Node being a
null
node?Greetings, Pierre