Files
uwrap/testsuite/tests/core/module/test.wrp
Quentin Ochem f8ec4185be Switch 'self' to 'it'
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.
2020-08-23 22:03:48 -04:00

38 lines
874 B
Plaintext

import a.x;
template base_template do
var content : text;
end;
match Entity () do
match (f_name (x"A"))
wrap x.t_in_x ("x.t_in_x (\e<f_name>)\n");
match (f_name (x"B"))
wrap t_in_x ("a.x.t_in_x (\e<f_name>)\n");
match (f_name (x"B"))
wrap a.b.y.t_in_y ("a.b.y.t_in_y (\e<f_name>)\n");
match (f_name (x"A"))
wrap base_template ("base_template (\e<f_name>)\n");
end;
match base_template ()
weave standard.out (@ & "base_template = \e<it.content>");
match x.t_in_x ()
weave standard.out (@ & "x.t_in_x = \e<it.content>");
match a.x.t_in_x ()
weave standard.out (@ & "a.x.t_in_x = \e<it.content>");
match a.b.y.t_in_y ()
weave standard.out (@ & "a.b.y.t_in_y = \e<it.content>");
match a.c.z.t_in_z ()
weave standard.out (@ & "a.c.z.t_in_z = \e<it.content>");
match t_in_x ()
weave standard.out (@ & "a.x.t_in_x = \e<it.content>");