Last change
on this file since b28ce93 was b28ce93, checked in by Michael Brooks <mlbrooks@…>, 3 months ago |
Add POC illustrating generating headers from compile units
|
-
Property mode
set to
100644
|
File size:
575 bytes
|
Rev | Line | |
---|
[b28ce93] | 1 | #import auto a
|
---|
| 2 |
|
---|
| 3 | //# @
|
---|
| 4 | struct b {
|
---|
| 5 | struct a y;
|
---|
| 6 | };
|
---|
| 7 |
|
---|
| 8 | //# $v
|
---|
| 9 | struct a glb_ba = { 20 };
|
---|
| 10 |
|
---|
| 11 | //# $v
|
---|
| 12 | struct b glb_bb = { { 30 } };
|
---|
| 13 |
|
---|
| 14 | //# $f
|
---|
| 15 | void f_b( struct b p ) {
|
---|
| 16 | int printf( const char *, ... ); // scaffold
|
---|
| 17 | printf( "f_b( b{ { %d } } )\n", p.y.x );
|
---|
| 18 | printf( "\tglb_a == { %d }\n", glb_a.x);
|
---|
| 19 | printf( "\tglb_ba == { %d }\n", glb_ba.x);
|
---|
| 20 | printf( "\tglb_bb == { { %d } }\n", glb_bb.y.x );
|
---|
| 21 | glb_a.x += 1;
|
---|
| 22 | p.y.x += 1;
|
---|
| 23 | f_a( p.y );
|
---|
| 24 | #ifdef ERR1
|
---|
| 25 | help(); // reject => a's `#import static helper` not visible here
|
---|
| 26 | #endif
|
---|
| 27 | printf( "f_b end\n" );
|
---|
| 28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.