mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Handle @self and @this correctly.
This commit is contained in:
parent
547f361bd3
commit
fa742ceed6
1 changed files with 6 additions and 8 deletions
|
@ -751,24 +751,22 @@ expr_short (expr_t *e)
|
|||
expr_t *
|
||||
new_self_expr (void)
|
||||
{
|
||||
symbol_t *sym = symtab_lookup (pr.symtab, ".self");
|
||||
symbol_t *sym;
|
||||
|
||||
if (!sym) {
|
||||
sym = new_symbol_type (".self", &type_entity);
|
||||
sym = make_symbol (".self", &type_entity, 0, st_extern);
|
||||
if (!sym->table)
|
||||
symtab_addsymbol (pr.symtab, sym);
|
||||
}
|
||||
return new_symbol_expr (sym);
|
||||
}
|
||||
|
||||
expr_t *
|
||||
new_this_expr (void)
|
||||
{
|
||||
symbol_t *sym = symtab_lookup (pr.symtab, ".this");
|
||||
symbol_t *sym;
|
||||
|
||||
if (!sym) {
|
||||
sym = new_symbol_type (".this", field_type (&type_id));
|
||||
sym = make_symbol (".this", field_type (&type_id), 0, st_extern);
|
||||
if (!sym->table)
|
||||
symtab_addsymbol (pr.symtab, sym);
|
||||
}
|
||||
return new_symbol_expr (sym);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue