blob: 61ab53bfd9110f3644f6a7abb3fb35ee7863f036 (
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
|
#ifndef SCOPE_H
#define SCOPE_H
/*
* Symbol scoping is pretty simple.
*
* Copyright (C) 2003 Transmeta Corp.
* 2003 Linus Torvalds
*
* Licensed under the Open Software License version 1.1
*/
struct scope {
struct token *token; /* Scope start information */
struct symbol_list *symbols; /* List of symbols in this scope */
struct scope *next;
};
static inline int toplevel(struct scope *scope)
{
return scope->next == scope;
}
extern struct scope
*block_scope,
*function_scope,
*file_scope;
extern void start_symbol_scope(void);
extern void end_symbol_scope(void);
extern void start_function_scope(void);
extern void end_function_scope(void);
extern void bind_scope(struct symbol *, struct scope *);
#endif
|