snake5 icon

some half-working generated code from ast

snake5 | PRO | 12/27/14 12:25:38 PM UTC | 0 ⭐ | 865 👁️ | Never ⏰ | []
C |

1.35 KB

|

None

|

0 👍

/

0 👎

 
#include <inttypes.h>
 
typedef int8_t int8;
typedef uint8_t uint8;
typedef int16_t int16;
typedef uint16_t uint16;
typedef int32_t int32;
typedef uint32_t uint32;
typedef int64_t int64;
typedef uint64_t uint64;
typedef float float32;
typedef double float64;
 
int32 _Isomething = 42;
 
typedef struct _Istring_N_I_data
{
    int32 size;
    uint8 data[0];
}
_Istring_N_I_data;
 
typedef struct _Istring
{
    _Istring_N_I_data_C data;
}
_Istring;
 
typedef struct _Iarray_L_Istring_G
{
    _Istring_P m_data;
    int32 m_size;
    int32 m_mem;
}
_Iarray_L_Istring_G;
 
_Istring _Iarray_L_Istring_G_M_Igetindex_B_Iint32_E
(
    int32 index
)
{
    if(((((index)<(0)))||(((index)>=(null)))))
{
    _IWARNING("\x19\x00\x00\x00""array index out of bounds")
    return "\x00\x00\x00\x00""";
}
 
    return _Isomethingsomething_getindex(null,index);
}
 
_Ivoid _Iarray_L_Istring_G_N_Iclear_B_E
(
)
{
    _Iarray_L_Istring_G_N_Iresize_B_Iint32_E(0)
}
 
_Ivoid _Imain_B_Iarray_L_Istring_G_E
(
    _Iarray_L_Istring_G args
)
{
    {int32 i; 
i = 0;while(((i)<(null)))
{
    _Iprintln_B_Istring_E(_Isomethingsomething_getindex(args,i))
 
i = ((i)+(1));
}}
 
    _Iprintln_B_Istring_E(runtime_concat(3,"\x0f\x00\x00\x00""Hello, world! (",null,"\x01\x00\x00\x00"")"))
}
 
_Ivoid _I_test_B_E
(
)
{
    _Imain_B_Iarray_L_Istring_G_E({m_data=array,m_size=dict,m_mem=dict})
}

Comments