From 57af02b91cb3a9eef66137c85aab7e47bdd7d0a5 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 19 Aug 2022 16:31:16 +0200 Subject: labels, #FILE #LINE, some bugfixes, c types --- src/cffc.hff | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) (limited to 'src/cffc.hff') diff --git a/src/cffc.hff b/src/cffc.hff index 131b3d9..920f74a 100644 --- a/src/cffc.hff +++ b/src/cffc.hff @@ -108,6 +108,7 @@ struct Type { flds [#]AggField, decls *Env, }, + VaList, }, fn is(ty *const Type, tag typeof((Type{}).u.#tag)) bool { @@ -282,6 +283,7 @@ struct Decl { Fn Fn, Macro Macro, Tepl Tepl, + Label #{loopid} int, }, myenv *Env, } @@ -297,8 +299,8 @@ struct Expan { name *const u8, loc Loc, tepl bool, + peektok Option, idx int, - peektok Option } struct DeclList { @@ -340,25 +342,31 @@ extern static g_targ *const Targ; extern fn targ_ini(name *const u8) bool; // type.cff -extern static ty_void *const Type, - ty_bool *const Type, - ty_i8 *const Type, - ty_u8 *const Type, - ty_i16 *const Type, - ty_u16 *const Type, - ty_i32 *const Type, - ty_u32 *const Type, - ty_int *const Type, - ty_uint *const Type, - ty_i64 *const Type, - ty_u64 *const Type, - ty_isize *const Type, - ty_usize *const Type, - ty_iptrint *const Type, - ty_uptrint *const Type, - ty_f32 *const Type, - ty_f64 *const Type, - ty_voidptr *const Type; +extern static ty_void *const Type, + ty_bool *const Type, + ty_i8 *const Type, + ty_u8 *const Type, + ty_i16 *const Type, + ty_u16 *const Type, + ty_i32 *const Type, + ty_u32 *const Type, + ty_int *const Type, + ty_uint *const Type, + ty_i64 *const Type, + ty_u64 *const Type, + ty_isize *const Type, + ty_usize *const Type, + ty_iptrint *const Type, + ty_uptrint *const Type, + ty_f32 *const Type, + ty_f64 *const Type, + ty_voidptr *const Type, + ty_c_char *const Type, + ty_c_long *const Type, + ty_c_ulong *const Type, + ty_c_llong *const Type, + ty_c_ullong *const Type, + ty_c_valist *const Type; extern fn interntype(Type) *const Type; extern fn putprimtypes(env *Env) void; fn constify(ty *const Type) *const Type { -- cgit v1.2.3