diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-11-23 03:41:01 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-11-23 03:41:01 +0100 |
commit | 6d39843b93861be73acf505045d623722befb5fd (patch) | |
tree | aad0dcb7ee207403e886f374c6058ea31aa844a4 | |
parent | 0ef0a6b08e5912feefbab89374fb0f01a5409c5e (diff) | |
download | eo_tokenizer-6d39843b93861be73acf505045d623722befb5fd.zip eo_tokenizer-6d39843b93861be73acf505045d623722befb5fd.tar.gz |
fix indent
-rw-r--r-- | eo_tokenizer.h | 112 | ||||
-rw-r--r-- | eo_tokenizer.rl | 4 |
2 files changed, 62 insertions, 54 deletions
diff --git a/eo_tokenizer.h b/eo_tokenizer.h index adcba08..5a82019 100644 --- a/eo_tokenizer.h +++ b/eo_tokenizer.h @@ -34,84 +34,92 @@ extern int _eo_tokenizer_log_dom; /* RET */ -typedef struct _eo_ret { - char *type; - char *comment; +typedef struct _eo_ret +{ + char *type; + char *comment; } Eo_Ret; /* PARAMS */ -typedef enum _param_way { - IN, - OUT, - INOUT +typedef enum _param_way +{ + IN, + OUT, + INOUT } Param_Way; -typedef struct _eo_param { - Param_Way way; - char *type; - char *name; - char *comment; +typedef struct _eo_param +{ + Param_Way way; + char *type; + char *name; + char *comment; } Eo_Param; /* PROPERTIES */ -typedef enum _property_type { - SETTER, - GETTER +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; +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; +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; +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 { - /* ragel vars */ - int cs; /* current machine state */ - int act; /* last pattern matched */ - char *ts; /* current token match start */ - char *te; /* current token match end */ - char *p; /* data start */ - char *pe; /* data end */ - char *eof; /* eof = (EOF ? pe : NULL) */ - /* int stack[10]; /1* state stack used by fret fcall ... *1/ */ - /* int top; /1* stack pointer *1/ */ - - const char *source; - int current_line; - int current_nesting; - int max_nesting; - int token_start_line; - char buf[BUFSIZE]; - - Eina_List *classes; +typedef struct _eo_tokenizer +{ + /* ragel vars */ + int cs; /* current machine state */ + int act; /* last pattern matched */ + char *ts; /* current token match start */ + char *te; /* current token match end */ + char *p; /* data start */ + char *pe; /* data end */ + char *eof; /* eof = (EOF ? pe : NULL) */ + /* int stack[10]; /1* state stack used by fret fcall ... *1/ */ + /* int top; /1* stack pointer *1/ */ + + const char *source; + int current_line; + int current_nesting; + int max_nesting; + int token_start_line; + char buf[BUFSIZE]; + + Eina_List *classes; } Eo_Tokenizer; Eo_Tokenizer* eo_tokenizer_get(); diff --git a/eo_tokenizer.rl b/eo_tokenizer.rl index 3bab355..1db19ee 100644 --- a/eo_tokenizer.rl +++ b/eo_tokenizer.rl @@ -120,7 +120,7 @@ eo_tokenizer_walk(Eo_Tokenizer *toknz, const char *source) %% write exec; if ( toknz->cs == %%{ write error; }%% ) - break; + break; if ( toknz->ts == 0 ) have = 0; @@ -161,7 +161,7 @@ void eo_tokenizer_free(Eo_Tokenizer *toknz) { if (toknz->source) - eina_stringshare_del(toknz->source); + eina_stringshare_del(toknz->source); free(toknz); } |