#ifndef STERLING_COMPILER_H # define STERLING_COMPILER_H #include #include #include #include #include #include #include //simd # ifdef __x86_64__ # include # endif typedef enum { TOK_NONE, TOK_STRING, TOK_RAW, TOK_PREPROCESSOR, } TKN_CTX; typedef struct Token_s { int size; TKN_CTX ctx; char *data; } Token_t; //builtin type: if x86_64, then since i use simd, should align them typedef struct vec2 { float x; float y; float _padding1; float _padding2; } __attribute__((aligned(16)));//losing 8 byte typedef struct vec3 { float x; float y; float z; float _padding; } __attribute__((aligned(16)));//losing 4 byte typedef struct vec4 { float x; float y; float z; float w; } __attribute__((aligned(16))); #endif