| Last change
 on this file since fae93a40 was             b28ce93, checked in by Michael Brooks <mlbrooks@…>, 4 months ago | 
        
          | 
Add POC illustrating generating headers from compile units
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            357 bytes | 
      
      
| Line |  | 
|---|
| 1 | #import auto chicken | 
|---|
| 2 |  | 
|---|
| 3 | //# @ | 
|---|
| 4 | struct egg { | 
|---|
| 5 | struct chicken hatchling;  // not a pointer | 
|---|
| 6 | struct chicken * layer; | 
|---|
| 7 | }; | 
|---|
| 8 |  | 
|---|
| 9 | //# $f | 
|---|
| 10 | void ctor_egg( struct egg * this, struct chicken * layer ) { // handwritten | 
|---|
| 11 | ctor_chicken( & this->hatchling, this ); | 
|---|
| 12 | this->layer = layer; // ctor_pointer | 
|---|
| 13 | } | 
|---|
| 14 |  | 
|---|
| 15 | //# $f | 
|---|
| 16 | void hatch( struct egg * this ) { | 
|---|
| 17 | live( & this->hatchling ); | 
|---|
| 18 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.