added the super keyword

This commit is contained in:
2022-02-18 16:32:19 +00:00
parent 420d38c8be
commit 026ece9aea
5 changed files with 33 additions and 14 deletions

View File

@ -993,7 +993,8 @@ static hcl_iotok_type_t classify_ident_token (hcl_t* hcl, const hcl_oocs_t* v)
{ 4, { 'n','u','l','l' }, HCL_IOTOK_NIL },
{ 4, { 't','r','u','e' }, HCL_IOTOK_TRUE },
{ 5, { 'f','a','l','s','e' }, HCL_IOTOK_FALSE },
{ 4, { 's','e','l','f' }, HCL_IOTOK_SELF }
{ 4, { 's','e','l','f' }, HCL_IOTOK_SELF },
{ 5, { 's','u','p','e','r' }, HCL_IOTOK_SUPER }
};
for (i = 0; i < HCL_COUNTOF(tab); i++)
@ -1995,6 +1996,10 @@ static hcl_cnode_t* read_object (hcl_t* hcl)
obj = hcl_makecnodeself(hcl, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
break;
case HCL_IOTOK_SUPER:
obj = hcl_makecnodesuper(hcl, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
break;
case HCL_IOTOK_ELLIPSIS:
obj = hcl_makecnodeellipsis(hcl, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
break;