source: translator/Tests/SynTree/Scope.c @ 91b216b4

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since 91b216b4 was 51b7345, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

initial commit

  • Property mode set to 100644
File size: 661 bytes
Line 
1int x;
2typedef double y;
3typedef float t;
4y z;
5type u = struct { int a; double b; };
6int f( int y );
7y q;
8
9y w(y y, u v) {
10  type x | { x t(u); };
11  u u = y;
12  x z = t(u);
13}
14
15y p;
16
17context has_u( type z )
18{
19  z u(z);
20};
21
22forall( type t | has_u( t ) )
23y q( t the_t )
24{
25  t y = u( the_t );
26}
27
28t f( y p ) {
29  int y;
30  typedef char x;
31
32  {
33    x y;
34    typedef x z;
35
36    {
37      z x;
38      typedef z y;
39      y z = x;
40    }
41
42    z x = y;
43  }
44
45  x q = y;
46}
47
48t g( void ) {
49  typedef char x;
50  try {
51    some_func();
52  } catch ( x x ) {
53    t y = x;
54  }
55  x z;
56}
57
58y q(i)
59    int i;
60{
61  switch (i) {
62    y q = i;
63  case 0:
64    return q;
65  default:
66    return i;
67  }
68}
69
Note: See TracBrowser for help on using the repository browser.