Mark a symbol as accessed if it's used during evaluation of the tree.
[smatch.git] / scope.h
blobf1e5cef281a5444eaa6923239fe926ac4ea9fab7
1 #ifndef SCOPE_H
2 #define SCOPE_H
3 /*
4 * Symbol scoping is pretty simple.
6 * Copyright (C) 2003 Transmeta Corp, all rights reserved.
7 */
9 struct scope {
10 struct token *token; /* Scope start information */
11 struct symbol_list *symbols; /* List of symbols in this scope */
12 struct scope *next;
15 static inline int toplevel(struct scope *scope)
17 return scope->next == scope;
20 extern struct scope
21 *block_scope,
22 *function_scope,
23 *file_scope;
25 extern void start_symbol_scope(void);
26 extern void end_symbol_scope(void);
28 extern void start_function_scope(void);
29 extern void end_function_scope(void);
31 extern void bind_scope(struct symbol *, struct scope *);
33 #endif