diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-16 15:14:35 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-21 02:49:44 +0200 |
| commit | 5a2aa843532db560efc692708d5849e005171852 (patch) | |
| tree | 9a86c51b04ddd0c29ef1f9391679e90e2daef2a7 | |
| parent | f69126d5d45d0f8a243880c5919efc45a0a0197f (diff) | |
| download | sparse-dev-5a2aa843532db560efc692708d5849e005171852.tar.gz | |
api: move evaluate interface to its own header file
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
| -rw-r--r-- | builtin.c | 1 | ||||
| -rw-r--r-- | evaluate.c | 1 | ||||
| -rw-r--r-- | evaluate.h | 13 | ||||
| -rw-r--r-- | expand.c | 1 | ||||
| -rw-r--r-- | expression.h | 4 | ||||
| -rw-r--r-- | inline.c | 1 | ||||
| -rw-r--r-- | lib.c | 1 | ||||
| -rw-r--r-- | symbol.c | 1 |
8 files changed, 19 insertions, 4 deletions
@@ -24,6 +24,7 @@ */ #include "expression.h" +#include "evaluate.h" #include "expand.h" #include "symbol.h" #include "compat/bswap.h" @@ -34,6 +34,7 @@ #include <fcntl.h> #include <limits.h> +#include "evaluate.h" #include "lib.h" #include "allocate.h" #include "parse.h" diff --git a/evaluate.h b/evaluate.h new file mode 100644 index 00000000..36de7d69 --- /dev/null +++ b/evaluate.h @@ -0,0 +1,13 @@ +#ifndef EVALUATE_H +#define EVALUATE_H + +struct expression; +struct statement; +struct symbol; +struct symbol_list; + +struct symbol *evaluate_expression(struct expression *expr); +struct symbol *evaluate_statement(struct statement *stmt); +void evaluate_symbol_list(struct symbol_list *list); + +#endif @@ -41,6 +41,7 @@ #include "symbol.h" #include "target.h" #include "expression.h" +#include "evaluate.h" #include "expand.h" diff --git a/expression.h b/expression.h index d12b9197..b5fa9bc1 100644 --- a/expression.h +++ b/expression.h @@ -257,10 +257,6 @@ struct token *primary_expression(struct token *token, struct expression **tree); struct token *parens_expression(struct token *token, struct expression **expr, const char *where); struct token *assignment_expression(struct token *token, struct expression **tree); -extern void evaluate_symbol_list(struct symbol_list *list); -extern struct symbol *evaluate_statement(struct statement *stmt); -extern struct symbol *evaluate_expression(struct expression *); - extern int expand_symbol(struct symbol *); static inline struct expression *alloc_expression(struct position pos, int type) @@ -32,6 +32,7 @@ #include "parse.h" #include "symbol.h" #include "expression.h" +#include "evaluate.h" static void copy_statement(struct statement *src, struct statement *dst); @@ -40,6 +40,7 @@ #include "parse.h" #include "symbol.h" #include "expression.h" +#include "evaluate.h" #include "scope.h" #include "linearize.h" #include "target.h" @@ -33,6 +33,7 @@ #include "symbol.h" #include "scope.h" #include "expression.h" +#include "evaluate.h" #include "target.h" |
