Add support for evaluating builtin functions at compile time.
[smatch.git] / scope.h
blob1dc3b184de81e2c87ed6e042830440833b65355f
1 #ifndef SCOPE_H
2 #define SCOPE_H
3 /*
4 * Symbol scoping is pretty simple.
6 * Copyright (C) 2003 Transmeta Corp.
8 * Licensed under the Open Software License version 1.1
9 */
11 struct scope {
12 struct token *token; /* Scope start information */
13 struct symbol_list *symbols; /* List of symbols in this scope */
14 struct scope *next;
17 static inline int toplevel(struct scope *scope)
19 return scope->next == scope;
22 extern struct scope
23 *block_scope,
24 *function_scope,
25 *file_scope;
27 extern void start_symbol_scope(void);
28 extern void end_symbol_scope(void);
30 extern void start_function_scope(void);
31 extern void end_function_scope(void);
33 extern void bind_scope(struct symbol *, struct scope *);
35 #endif