fixed the reader and the compiler to process the a dic/array/byte-array item after a period in a data list properly
This commit is contained in:
31
lib/cnode.c
31
lib/cnode.c
@ -133,11 +133,19 @@ hcl_cnode_t* hcl_makecnodecons (hcl_t* hcl, const hcl_ioloc_t* loc, hcl_cnode_t*
|
||||
return c;
|
||||
}
|
||||
|
||||
hcl_cnode_t* hcl_makecnodelist (hcl_t* hcl, const hcl_ioloc_t* loc, hcl_concode_t type)
|
||||
hcl_cnode_t* hcl_makecnodeelist (hcl_t* hcl, const hcl_ioloc_t* loc, hcl_concode_t type)
|
||||
{
|
||||
hcl_cnode_t* c = make_cnode(hcl, HCL_CNODE_LIST, loc, HCL_NULL);
|
||||
hcl_cnode_t* c = make_cnode(hcl, HCL_CNODE_ELIST, loc, HCL_NULL);
|
||||
if (HCL_UNLIKELY(!c)) return HCL_NULL;
|
||||
c->u.list.concode = type;
|
||||
c->u.elist.concode = type;
|
||||
return c;
|
||||
}
|
||||
|
||||
hcl_cnode_t* hcl_makecnodeshell (hcl_t* hcl, const hcl_ioloc_t* loc, hcl_cnode_t* obj)
|
||||
{
|
||||
hcl_cnode_t* c = make_cnode(hcl, HCL_CNODE_SHELL, loc, HCL_NULL);
|
||||
if (HCL_UNLIKELY(!c)) return HCL_NULL;
|
||||
c->u.shell.obj = obj;
|
||||
return c;
|
||||
}
|
||||
|
||||
@ -172,6 +180,23 @@ redo:
|
||||
break;
|
||||
}
|
||||
|
||||
case HCL_CNODE_SHELL:
|
||||
{
|
||||
hcl_cnode_t* tmp;
|
||||
|
||||
tmp = c->u.shell.obj;
|
||||
|
||||
hcl_freemem (hcl, c);
|
||||
|
||||
if (tmp)
|
||||
{
|
||||
c = tmp;
|
||||
goto redo;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
hcl_freemem (hcl, c);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user