diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-11-23 03:33:17 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-11-23 03:33:17 +0100 |
commit | 9a2a5a6b2fc2930e84dc05d5959a83bb1d3eef4c (patch) | |
tree | c599877fc22ee389c2d0295a49f626ef3a943691 | |
parent | 013625545c75dd63e62dc4470b5b90ac428e735d (diff) | |
download | eo_tokenizer-9a2a5a6b2fc2930e84dc05d5959a83bb1d3eef4c.zip eo_tokenizer-9a2a5a6b2fc2930e84dc05d5959a83bb1d3eef4c.tar.gz |
add structs to store eo classes definitions
-rw-r--r-- | eo_tokenizer.h | 62 |
1 files changed, 62 insertions, 0 deletions
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__ */ |