1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2026-04-20 01:16:36 +00:00

Better accessed control

This commit is contained in:
David Schmenk
2018-01-03 18:34:20 -08:00
parent cf9f20e0c9
commit eb0c669452
3 changed files with 4 additions and 14 deletions
+4 -11
View File
@@ -73,7 +73,11 @@ int idglobal_lookup(char *name, int len)
int i;
for (i = 0; i < globals; i++)
if (id_match(name, len, &(idglobal_name[i][0])))
{
if (idglobal_type[i] & EXTERN_TYPE)
idglobal_type[i] |= ACCESSED_TYPE;
return (i);
}
return (-1);
}
int idconst_add(char *name, int len, int value)
@@ -256,17 +260,6 @@ int id_type(char *name, int len)
parse_error("Undeclared identifier");
return (0);
}
int id_access(char *name, int len)
{
int i;
if ((i = idglobal_lookup(name, len)) >= 0)
{
idglobal_type[i] |= ACCESSED_TYPE;
return (idglobal_type[i]);
}
parse_error("Undeclared external function");
return (0);
}
int tag_new(int type)
{
if (type & EXTERN_TYPE)