X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser.h;h=c9e9f752bb8f8747693229f4b79751f68f7aa1fa;hp=f16f8b853d717c3c49f463bd70f6e47580b59214;hb=98d971f89db2431ef24dac508cf9797ef93646c6;hpb=e8a409b21cb50f5931ab02ce6ab4f4406be94394 diff --git a/src/parser.h b/src/parser.h index f16f8b8..c9e9f75 100644 --- a/src/parser.h +++ b/src/parser.h @@ -59,7 +59,6 @@ typedef union impl_val { zend_string *str; zend_fcall *cb; } zend; - zval zval; void *ptr; } impl_val; @@ -157,9 +156,9 @@ typedef struct decl_arg { decl_type *type; decl_var *var; decl_struct_layout *layout; - struct let_stmt *let; /* FIXME: decls must not point to impls !!! */ impl_val val; void *ptr; + void *let; void *mem; } decl_arg; @@ -170,6 +169,7 @@ static inline decl_arg *init_decl_arg(decl_type *type, decl_var *var) { arg->var = var; var->arg = arg; arg->ptr = &arg->val; + arg->let = arg->ptr; return arg; } @@ -919,11 +919,13 @@ static inline void free_let_callback(let_callback *cb) { free(cb); } +typedef impl_val *(*let_func_handler)(impl_val *tmp, decl_type *type, impl_arg *iarg, void **to_free); + typedef struct let_func { token_t type; char *name; impl_var *var; - impl_val *(*handler)(impl_val *tmp, decl_type *type, impl_arg *iarg, void **to_free); + let_func_handler handler; } let_func; static inline let_func *init_let_func(token_t type, const char *name, impl_var *var) { @@ -1017,8 +1019,6 @@ static inline void free_let_val(let_val *let) { typedef struct let_stmt { decl_var *var; let_val *val; - - void *ptr; } let_stmt; static inline let_stmt *init_let_stmt(decl_var *var, let_val *val) {