trying to detect prohibited access to an instance vairables in a class method.

inventing the class instantiation method concept
This commit is contained in:
2022-02-24 16:47:26 +00:00
parent 6d409c809f
commit 50c04bb770
4 changed files with 92 additions and 36 deletions

View File

@ -1153,6 +1153,15 @@ retry:
ADD_TOKEN_CHAR (hcl, c);
break;
}
else if (c == '*')
{
/* double-cloned star */
SET_TOKEN_TYPE (hcl, HCL_IOTOK_DCSTAR);
ADD_TOKEN_CHAR (hcl, oldc);
ADD_TOKEN_CHAR (hcl, oldc2);
ADD_TOKEN_CHAR (hcl, c);
break;
}
unget_char (hcl, &hcl->c->lxc);
unget_char (hcl, &sd);
@ -2008,6 +2017,10 @@ static hcl_cnode_t* read_object (hcl_t* hcl)
obj = hcl_makecnodetrpcolons(hcl, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
break;
case HCL_IOTOK_DCSTAR:
obj = hcl_makecnodedcstar(hcl, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
break;
case HCL_IOTOK_SMPTRLIT:
{
hcl_oow_t i;