X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fcontext.h;h=77db31a56fbd5aa8df89224b371a55b7f95767df;hp=6e86e448caa8f3bc304496411d5a195300125fef;hb=596f215b67dd267284df4fe0e11f0ca4d197bfc1;hpb=762750b4a3f4e0471993849c4bd12965f6b62356 diff --git a/src/context.h b/src/context.h index 6e86e44..77db31a 100644 --- a/src/context.h +++ b/src/context.h @@ -13,22 +13,24 @@ typedef struct PSI_ContextOps PSI_ContextOps; struct PSI_ContextOps { void (*init)(PSI_Context *C); void (*dtor)(PSI_Context *C); - zend_function_entry *(*compile)(PSI_Context *C, PSI_Data *D); + zend_function_entry *(*compile)(PSI_Context *C); + void (*call)(PSI_Context *C, impl_val *ret_val, decl *decl, impl_val **args); }; struct PSI_Context { + PSI_DATA_MEMBERS; void *context; - PSI_ContextErrorFunc error; struct PSI_ContextOps *ops; - struct PSI_Data *data; - zend_function_entry **closures; + zend_function_entry *closures; + PSI_Data *data; size_t count; }; PSI_Context *PSI_ContextInit(PSI_Context *C, PSI_ContextOps *ops, PSI_ContextErrorFunc error); void PSI_ContextBuild(PSI_Context *C, const char *path); -zend_function_entry *PSI_ContextCompile(PSI_Context *C, PSI_Data *D); -zend_constant a; +int PSI_ContextValidate(PSI_Context *C, PSI_Parser *P); +zend_function_entry *PSI_ContextCompile(PSI_Context *C); +void PSI_ContextCall(PSI_Context *C, impl_val *ret_val, decl *decl, impl_val **args); void PSI_ContextDtor(PSI_Context *C); void PSI_ContextFree(PSI_Context **C);