source: src/Tests/TypeGenerator.c @ 55ba733

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

update keywords in test files

  • Property mode set to 100644
File size: 916 bytes
RevLine 
[55ba733]1context addable( otype T ) {
[b1d6dd5]2        T ?+?( T,T );
3        T ?=?( T*, T);
4};
5
[55ba733]6otype List1( otype T | addable( T ) ) = struct { T data; List1( T ) *next; } *;
[b1d6dd5]7typedef List1( int ) ListOfIntegers;
8//List1( int ) li;
9ListOfIntegers li;
10int f( List1( int ) ( (*g ))( int ) );
11[int] h( * List1( int ) p );                                                    // new declaration syntax
12
[55ba733]13struct( otype T ) S2 { T i; };                                                  // actual definition
[68cd1ce]14struct( int ) S3 v1, *p;                                                                // expansion and instantiation
[55ba733]15struct( otype T )( int ) S24 { T i; } v2;                               // actual definition, expansion and instantiation
16struct( otype T )( int ) { T i; } v2;                                   // anonymous actual definition, expansion and instantiation
[b1d6dd5]17
[55ba733]18struct( otype T | addable( T ) ) node { T data; struct( T ) node *next; };
19otype List( otype T ) = struct( T ) node *;
[b1d6dd5]20List( int ) my_list;
21
[55ba733]22otype Complex | addable( Complex );
[b1d6dd5]23
24int main() {
25        (struct( int ) node)my_list;
26}
27
28// Local Variables: //
29// tab-width: 4 //
30// End: //
Note: See TracBrowser for help on using the repository browser.