From c811a743a1528db1d05970e1aa14162ef7c70b75 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 21 Sep 2019 13:59:39 +0200 Subject: Implement vararg, verify arguments to parameters --- include/ast.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/ast.h') diff --git a/include/ast.h b/include/ast.h index 0c34d0b..c45d4aa 100644 --- a/include/ast.h +++ b/include/ast.h @@ -132,6 +132,12 @@ struct Scope { FunctionSignature *function_signature; /* Borrowed from FunctionDecl. Only used if the scope belongs to FunctionDecl */ }; +typedef enum { + VARIABLE_TYPE_FLAG_NONE = 0, + VARIABLE_TYPE_FLAG_OPTIONAL = 1 << 0, + VARIABLE_TYPE_FLAG_BORROW = 1 << 1 +} VariableTypeFlag; + typedef struct { enum { VARIABLE_TYPE_NONE, @@ -143,6 +149,7 @@ typedef struct { Variable *variable; FunctionSignature *signature; } value; + VariableTypeFlag variable_type_flags; } VariableType; struct FileScopeReference { -- cgit v1.2.3