From: Brendan Hansen Date: Fri, 17 Jul 2020 13:51:30 +0000 (-0500) Subject: Merge branch 'master' of https://github.com/brendanfh/onyx X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=90dc529ff319bea7907f8dda271207447274a0e6;p=onyx.git Merge branch 'master' of https://github.com/brendanfh/onyx --- 90dc529ff319bea7907f8dda271207447274a0e6 diff --cc include/onyxastnodes.h index 829008b6,78f484c2..9843f505 --- a/include/onyxastnodes.h +++ b/include/onyxastnodes.h @@@ -171,14 -183,6 +168,15 @@@ struct AstIf } true_block, false_block; }; +// Type Nodes +// NOTE: This node is very similar to an AstNode, just +// without the 'next' member. This is because types +// can't be in expressions so a 'next' thing +// doesn't make sense. +#define AstType_members { AstKind kind; u32 flags; char* name; } +#define AstType_base struct AstType_members; +struct AstType AstType_members; ++ struct AstBasicType { AstType_base; Type* type; }; struct AstPointerType { AstType_base; AstType* elem; }; struct AstFunctionType { AstType_base; AstType* return_type; u64 param_count; AstType* params[]; };