mirror of
https://github.com/AdaCore/uwrap.git
synced 2026-02-12 13:06:34 -08:00
The usage of the word 'self' to refer to the current iteration became increasingly confusing with the usual OOP counterpart, in particular because its value can change in a single expression, independendly of the surrounding object. See previous check in that uncovered its usage in the fold function.
21 lines
422 B
Plaintext
21 lines
422 B
Plaintext
template w_Entity do
|
|
var child_name : text;
|
|
var txt : text;
|
|
end;
|
|
|
|
match Entity () do
|
|
wrap w_Entity (
|
|
child_name => defer ("NO CHILDREN FOR \e<f_name>"),
|
|
txt => f_name
|
|
);
|
|
|
|
match child (Entity ())
|
|
wrap n: w_Entity (
|
|
child_name => defer (n.child (w_Entity ()).txt),
|
|
txt => f_name
|
|
);
|
|
end;
|
|
|
|
match w_Entity ()
|
|
weave standard.out ("CHILDREN FOR \e<it.origin.f_name>: \e<child_name>\n");
|