1enum Color:ubyte (bit_flags) { 2 Red = 0, // color Red = (1u << 0) 3 /// \brief color Green 4 /// Green is bit_flag with value (1u << 1) 5 Green, 6 /// \brief color Blue (1u << 3) 7 Blue = 3, 8} 9 10struct Test { a:short; b:byte; } 11 12struct Vec3 (force_align: 8) { 13 x:float; 14 y:float; 15 z:float; 16 test1:double; 17 test2:Color; 18 test3:Test; 19} 20 21/// an example documentation comment: "monster object" 22table Monster { 23 pos:Vec3 (id: 0); 24 hp:short = 100 (id: 2); 25 mana:short = 150 (id: 1); 26 name:string (id: 3, key); 27 color:Color = Blue (id: 6); 28 inventory:[ubyte] (id: 5); 29 testarrayoftables:[Monster] (id: 4); 30} 31 32root_type Monster; 33