mirror of
https://github.com/dschmenk/PLASMA.git
synced 2024-11-01 07:07:48 +00:00
Better accessed control
This commit is contained in:
parent
cf9f20e0c9
commit
eb0c669452
@ -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)
|
||||
|
@ -414,8 +414,6 @@ t_opseq *parse_value(t_opseq *codeseq, int rvalue, int *stackdepth)
|
||||
{
|
||||
cfnparms = funcparms_cnt(type);
|
||||
cfnvals = funcvals_cnt(type);
|
||||
if (type & EXTERN_TYPE)
|
||||
id_access(tokenstr, tokenlen);
|
||||
}
|
||||
}
|
||||
else if (scantoken == LAMBDA_TOKEN)
|
||||
|
@ -45,6 +45,5 @@ int idconst_add(char *name, int len, int value);
|
||||
int id_tag(char *name, int len);
|
||||
int id_const(char *name, int len);
|
||||
int id_type(char *name, int len);
|
||||
int id_access(char *name, int len);
|
||||
void idglobal_size(int type, int size, int constsize);
|
||||
int tag_new(int type);
|
||||
|
Loading…
Reference in New Issue
Block a user