coding a better compiler

This commit is contained in:
2021-01-17 17:45:39 +00:00
parent 58ec16aa0a
commit e4ae7add8b
14 changed files with 711 additions and 343 deletions

View File

@ -58,6 +58,7 @@ static struct
/* ========================================================================= */
static void compact_symbol_table (hcl_t* hcl, hcl_oop_t _nil)
{
hcl_oop_char_t symbol;
@ -837,3 +838,15 @@ int hcl_ignite (hcl_t* hcl)
hcl->p.e = hcl->_nil;
return 0;
}
int hcl_getsyncodebyoocs_noseterr (hcl_t* hcl, const hcl_oocs_t* name)
{
hcl_oow_t i;
for (i = 0; i < HCL_COUNTOF(syminfo); i++)
{
if (hcl_comp_oochars(syminfo[i].ptr, syminfo[i].len, name->ptr, name->len) == 0)
return syminfo[i].syncode;
}
return 0; /* 0 indicates no syntax code found */
}