mirror of
https://github.com/antirez/aocla
synced 2024-12-26 09:58:42 +01:00
Tuples are only made of lowercase single letters.
This commit is contained in:
parent
4a0f0bb206
commit
0dcacdcf06
1 changed files with 3 additions and 2 deletions
5
aocla.c
5
aocla.c
|
@ -176,12 +176,13 @@ obj *parseList(aoclactx *ctx, const char *s, const char **next) {
|
|||
return NULL;
|
||||
} else if (o->type == OBJ_TYPE_TUPLE &&
|
||||
(element->type != OBJ_TYPE_SYMBOL ||
|
||||
element->sym.len != 1))
|
||||
element->sym.len != 1 ||
|
||||
!islower(element->sym.ptr[0])))
|
||||
{
|
||||
/* Tuples can be only composed of one character symbols. */
|
||||
release(element);
|
||||
release(o);
|
||||
setError(ctx,s,"Non symbol object in tuple");
|
||||
setError(ctx,s,"Non lower case letter in tuple");
|
||||
return NULL;
|
||||
}
|
||||
o->l.ele = myrealloc(o->l.ele, sizeof(obj*)*(o->l.len+1));
|
||||
|
|
Loading…
Reference in a new issue