Pristine Ack-5.5
[Ack-5.5.git] / lang / pc / comp / scope.H
1 /* S C O P E   M E C H A N I S M */
2
3 struct scope {
4         struct scope *next;
5         struct def *sc_def;     /* list of definitions in this scope */
6         int sc_level;           /* level of this scope */
7         arith sc_off;           /* offsets of variables in this scope */
8         struct node *sc_lablist;/* list of labels in this scope, to speed
9                                    up label handling
10                                 */
11 };
12
13 /* ALLOCDEF "scope" 10 */
14
15 struct scopelist {
16         struct scopelist *next;
17         struct scope *sc_scope;
18         int sc_count;
19 };
20
21 /* ALLOCDEF "scopelist" 10 */
22
23 extern struct scope
24         *GlobalScope,
25         *PervasiveScope,
26         *BlockScope;
27
28 extern struct scopelist
29         *CurrVis;
30
31 #define CurrentScope    (CurrVis->sc_scope)
32 #define nextvisible(x)  ((x)->next)             /* use with scopelists */