Пример #1
0
int test(char *URL)
{
  (void)URL; /* not used */

  if(scopeid())
    return 6;

  if(append())
    return 5;

  if(set_url())
    return 1;

  if(set_parts())
    return 2;

  if(get_url())
    return 3;

  if(get_parts())
    return 4;

  printf("success\n");
  return 0;
}
Пример #2
0
int
SymbolTable::new_struct (ustring name)
{
    int structid = TypeSpec::new_struct (new StructSpec (name, scopeid()));
    insert (new Symbol (name, TypeSpec ("",structid), SymTypeType));
    return structid;
}
Пример #3
0
void
SymbolTable::insert (Symbol *sym)
{
    DASSERT (sym != NULL);
    sym->scope (scopeid ());
    m_scopetables.back()[sym->name()] = sym;
    m_allsyms.push_back (sym);
    m_allmangled[ustring(sym->mangled())] = sym;
}
Пример #4
0
Symbol * 
SymbolTable::clash (ustring name) const
{
    Symbol *s = find (name);
    return (s && s->scope() == scopeid()) ? s : NULL;
}