aboutsummaryrefslogtreecommitdiff
path: root/src/common.hff
blob: 71e3be0a0e8d1eebeb64e486910d0deba62c1310 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import "libc.hff";

defmacro assert {
(ex,s) [ (do
   if not (ex) {
      fprintf(stderr, "%s:%d: assertion failed: ", #FILE, #LINE);
      fprintf(stderr, "`%s'", (s));
      fprintf(stderr, "\n");
      abort();
   }
) ]
}