File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,21 @@ generic
6060 with function Combine (L, R : Node_Metadata) return Node_Metadata;
6161
6262 with function Can_Reach (Node, From : Node_Type) return Boolean is <>;
63- -- Function that will allow filtering nodes depending on the origin node of
64- -- the request. In practice, this is used to implement sequential semantics
65- -- for lexical envs, as-in, node declared after another is not yet visible.
63+ -- Return whether ``Node`` can be reached from ``From``.
64+ --
65+ -- This function is used to filter the result of a lexical env lookup: for
66+ -- a lookup triggered on node ``From`` (formal ``From`` in
67+ -- ``Get``/``Get_First`` functions), nodes ``Node`` for which ``Can_Reach
68+ -- (Node, From)`` returns False are excluded from the result.
69+ --
70+ -- This is used to implement sequential semantics: in the following
71+ -- example, looking for ``D`` from the second line should return the
72+ -- definition in the first line (``E`` can reach ``D`` line 1), but not the
73+ -- one in the third line (``E`` cannot reach ``D`` line 3)::
74+ --
75+ -- def D = 1
76+ -- def E = D
77+ -- def D = 2
6678
6779 with function Is_Rebindable (Node : Node_Type) return Boolean is <>;
6880 -- Return whether a lexical environment whose node is Node can be rebound
You can’t perform that action at this time.
0 commit comments