summaryrefslogtreecommitdiffstats
path: root/eo_tokenizer.rl
diff options
context:
space:
mode:
Diffstat (limited to 'eo_tokenizer.rl')
-rw-r--r--eo_tokenizer.rl23
1 files changed, 21 insertions, 2 deletions
diff --git a/eo_tokenizer.rl b/eo_tokenizer.rl
index 9c94e46..1bc1d6c 100644
--- a/eo_tokenizer.rl
+++ b/eo_tokenizer.rl
@@ -117,9 +117,28 @@ _eo_tokenizer_param_get(Eo_Tokenizer *toknz, char *p)
if (s == toknz->saved.tok)
ABORT(toknz, "wrong parameter: %s", _eo_tokenizer_token_get(toknz, p));
+ s++;
- param->type = _eo_tokenizer_token_get(toknz, s+1);
- toknz->saved.tok = (s + 1);
+ param->way = PARAM_IN;
+ if (strncmp(toknz->saved.tok, "in ", 3) == 0)
+ {
+ toknz->saved.tok += 3;
+ param->way = PARAM_IN;
+ }
+ else if (strncmp(toknz->saved.tok, "out ", 4) == 0)
+ {
+ toknz->saved.tok += 4;
+ param->way = PARAM_OUT;
+ }
+ else if (strncmp(toknz->saved.tok, "inout ", 6) == 0)
+ {
+ toknz->saved.tok += 6;
+ param->way = PARAM_INOUT;
+ }
+
+ param->type = _eo_tokenizer_token_get(toknz, s);
+
+ toknz->saved.tok = s;
param->name = _eo_tokenizer_token_get(toknz, p);
return param;