view CbC-examples/rectypeTest/struct2.cbc @ 115:4cb7a319550d

fix c-parser.c
author mir3636
date Tue, 28 Nov 2017 19:31:15 +0900
parents 7ad14f446135
children
line wrap: on
line source


struct interface {
  __code (*next)();
 __rectype child;
  // __rectype *child;
  //  struct interface *child;
};

#include <stdio.h>
__code csA()
{
  printf("csA\n");
}

__code csB()
{
  printf("csB\n");
}

int main()
{
  struct interface p;
  p.next = csA;

  struct interface pp;
  pp.next = csB;
  p.child = &pp;

  //  goto p.child->next();
  goto p.child->next();
  
  return 0;
}