Eolian/Lexer: fix support of const parameters.

The syntax to define a parameter of a property as const is as following:

set {
   data: const;
}

When no space was present between ':' and "const", a syntax error was
occurring.
This commit is contained in:
Daniel Zaoui 2014-05-18 14:16:58 +03:00
parent 61f3f68670
commit 23b97bd30d
2 changed files with 275 additions and 273 deletions

File diff suppressed because it is too large Load Diff

View File

@ -314,9 +314,10 @@ _eo_tokenizer_accessor_param_get(Eo_Tokenizer *toknz, char *p)
if (param == NULL) ABORT(toknz, "calloc Eo_Accessor_Param failure");
/* Remove the colon and spaces - we just need the param name */
while (*p == ':') p--;
while (*p != ':') p--;
p--;
while (*p == ' ') p--;
param->name = _eo_tokenizer_token_get(toknz, p);
param->name = _eo_tokenizer_token_get(toknz, p + 1);
return param;
}