blob: bbfbc58aee4f8bf45c3e2eadbac83dc074a47442 [file] [log] [blame] [edit]
/*
* Copyright 2017, NICTA
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(NICTA_GPL)
*/
$esc:(#include <stdio.h>)
typedef void *SysState;
#include "generated.c"
#include <gum/anti/iterator.ac>
$ty:(SysState) print_string ($ty:((String, SysState)) arg){
char * str = (char *) arg.p1;
$ty:(SysState) ex = arg.p2;
printf("%s\n", str);
return ex;
}
$ty:(SysState) print_u32 ($ty:((U32, SysState)) arg){
$ty:(U32) val = arg.p1;
$ty:(SysState) ex = arg.p2;
printf("%d\n", val);
return ex;
}
int main(void){
$ty:(SysState) ex;
ex = $exp:fizzbuzz(ex);
return 0;
}