From 9a2a5a6b2fc2930e84dc05d5959a83bb1d3eef4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sat, 23 Nov 2013 02:33:17 +0000 Subject: add structs to store eo classes definitions --- eo_tokenizer.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/eo_tokenizer.h b/eo_tokenizer.h index 536cdda..adcba08 100644 --- a/eo_tokenizer.h +++ b/eo_tokenizer.h @@ -32,6 +32,64 @@ extern int _eo_tokenizer_log_dom; #endif #define DBG(...) EINA_LOG_DOM_DBG(_eo_tokenizer_log_dom, __VA_ARGS__) +/* RET */ + +typedef struct _eo_ret { + char *type; + char *comment; +} Eo_Ret; + +/* PARAMS */ + +typedef enum _param_way { + IN, + OUT, + INOUT +} Param_Way; + +typedef struct _eo_param { + Param_Way way; + char *type; + char *name; + char *comment; +} Eo_Param; + +/* PROPERTIES */ + +typedef enum _property_type { + SETTER, + GETTER +} Property_Type; + +typedef struct _eo_property { + Property_Type type; + Eo_Ret ret; + char *name; + char *comment; + Eina_List *params; +} Eo_Property; + +/* METHODS */ + +typedef struct _eo_method { + Eo_Ret ret; + char *name; + char *comment; + Eina_List *params; +} Eo_Method; + +/* CLASSES */ + +typedef struct _eo_class { + char *name; + char *comment; + Eina_List *inherits; + Eina_List *properties; + Eina_List *methods; +} Eo_Class; + +/* TOKENIZER */ + #define BUFSIZE 256 typedef struct _eo_tokenizer { @@ -52,12 +110,16 @@ typedef struct _eo_tokenizer { int max_nesting; int token_start_line; char buf[BUFSIZE]; + + Eina_List *classes; } Eo_Tokenizer; Eo_Tokenizer* eo_tokenizer_get(); Eina_Bool eo_tokenizer_walk(Eo_Tokenizer *toknz, const char *source); +void eo_tokenizer_dump(Eo_Tokenizer *toknz); + void eo_tokenizer_free(Eo_Tokenizer *toknz); #endif /* __EO_TOKENIZER_H__ */ -- cgit v1.1-2-g2b99