harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

testmod.ha (382B)


      1 export type _enum = enum {
      2 	ONE = 1,
      3 	TWO = 2,
      4 	THREE = 3,
      5 };
      6 
      7 export type other = enum {
      8 	// purposefully something that doesn't exist in _enum
      9 	EIGHT = 8: _enum,
     10 };
     11 
     12 export type char_enum = enum char {
     13 	ONE = 1,
     14 };
     15 
     16 export type enum_alias = _enum;
     17 export type error_enum = !_enum;
     18 
     19 export def val: int = 42;
     20 export def val2: int = 90;
     21 export def val3: enum_alias = 1: enum_alias;