Edit

kc3-lang/kc3/test/ikc3/struct.kc3

Branch :

  • test/ikc3/struct.kc3
  • quote require GL.Vec2
    require GL.Vec2
    quote require GL.Vec3
    require GL.Vec3
    quote 0.0
    0.0
    quote %GL.Vec3{}
    %GL.Vec3{}
    quote [position:  %GL.Vec3{},
           normal:    %GL.Vec3{},
           tex_coord: %GL.Vec2{}]
    [position:  %GL.Vec3{},
     normal:    %GL.Vec3{},
     tex_coord: %GL.Vec2{}]
    quote defmodule Test do
      defstruct [array: (U8[]) {},
    	     do_block: quote do
                   0
                 end,
    	     bool: false,
    	     character: '→',
    	     f32: (F32) 0.0,
    	     f64: (F64) 0.0,
    	     f128: (F128) 0.0,
    	     integer: (Integer) 0,
    	     ratio: 0/1,
    	     sw: (Sw) 0,
    	     s64: (S64) 0,
    	     s32: (S32) 0,
    	     s16: (S16) 0,
    	     s8: (S8) 0,
    	     u8: (U8) 0,
    	     u16: (U16) 0,
    	     u32: (U32) 0,
    	     u64: (U64) 0,
    	     uw: (Uw) 0,
    	     plist: [],
    	     map: %{zero: 0},
    	     pcall: quote 0 + 0,
    	     pcallable: fn () { 0 },
    	     pcomplex: 0 +i 0,
    	     pointer: (U8*) 0,
    	     pstruct: %KC3.Op{},
    	     psym: KC3,
    	     ptr: (Ptr) 0,
    	     ptr_free: (PtrFree) 0,
    	     quote: quote quote 0,
    	     str: "",
    	     time: %Time{},
    	     tuple: {0, 1},
    	     ident: quote KC3.zero]
    end
    defmodule Test do
      defstruct [array: (U8[]) {},
    	     do_block: quote do
                   0
                 end,
    	     bool: false,
    	     character: '0',
    	     f32: (F32) 0.0,
    	     f64: (F64) 0.0,
    	     f128: (F128) 0.0,
    	     integer: (Integer) 0,
    	     ratio: 0/1,
    	     sw: (Sw) 0,
    	     s64: (S64) 0,
    	     s32: (S32) 0,
    	     s16: (S16) 0,
    	     s8: (S8) 0,
    	     u8: (U8) 0,
    	     u16: (U16) 0,
    	     u32: (U32) 0,
    	     u64: (U64) 0,
    	     uw: (Uw) 0,
    	     plist: [],
    	     map: %{zero: 0},
    	     pcall: quote 0 + 0,
    	     pcallable: fn () { 0 },
    	     pcomplex: 0 +i 0,
    	     pointer: (U8*) 0,
    	     pstruct: %KC3.Op{},
    	     psym: KC3,
    	     ptr: (Ptr) 0,
    	     ptr_free: (PtrFree) 0,
    	     quote: quote quote 0,
    	     str: "",
    	     time: %Time{},
    	     tuple: {0, 1},
    	     ident: quote KC3.zero]
    end
    quote %Test{}
    %Test{}