summaryrefslogtreecommitdiff
path: root/includes/compiler/scopes.h
blob: ea2ae98cb2c9e7731fdb5cee6f0118edf9d69963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef COMPILER_SCOPES_H
#define COMPILER_SCOPES_H

#include "compiler/common.h"

#ifdef __MWERKS__
#pragma options align=mac68k
#endif

struct NameSpace {
    NameSpace *parent;
    HashNameNode *name;
    NameSpaceList *usings;
    TypeClass *theclass;
    NameSpaceName *tparams;
    union {
        NameSpaceName **hash;
        NameSpaceName *list;
    } data;
    UInt32 names;
    Boolean is_hash;
    Boolean is_global;
    Boolean is_unnamed;
    Boolean is_templ;
};

struct NameSpaceList {
    NameSpaceList *next;
    NameSpace *nspace;
};

struct NameSpaceObjectList {
    NameSpaceObjectList *next;
    ObjBase *object;
};

struct NameSpaceName {
    NameSpaceName *next;
    HashNameNode *name;
    NameSpaceObjectList first;
};

struct NameSpaceLookupList { // assumed name
    NameSpaceLookupList *next;
    NameSpace *nspace;
    NameSpaceList *namespaces;
};

#ifdef __MWERKS__
#pragma options align=reset
#endif

#endif