diff options
author | Linus Torvalds <torvalds@home.transmeta.com> | 2003-04-01 10:41:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 20:59:59 -0700 |
commit | 125e408d04a5b8a90fe324c7a65099c9406c6a1c (patch) | |
tree | 010b41a584a93ed86dc62e6de721766dd803fe5c /expression.h | |
parent | Save enough information at parse time to make "typeof" work (diff) | |
download | sparse-125e408d04a5b8a90fe324c7a65099c9406c6a1c.tar.gz sparse-125e408d04a5b8a90fe324c7a65099c9406c6a1c.tar.bz2 sparse-125e408d04a5b8a90fe324c7a65099c9406c6a1c.zip |
Evaluate more expression types: conditional expressions, statement
expressions, post-op expressions.
Move some of the evaluation functions from test-parsing.c to evaluate.c
Diffstat (limited to 'expression.h')
-rw-r--r-- | expression.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/expression.h b/expression.h index 078409f..2cc05e5 100644 --- a/expression.h +++ b/expression.h @@ -105,6 +105,8 @@ 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 int evaluate_symbol(struct symbol *sym); +extern int evaluate_statement(struct statement *stmt); extern int evaluate_expression(struct expression *); extern int evaluate_initializer(struct symbol *, struct expression *); @@ -131,6 +133,9 @@ struct statement *alloc_statement(struct position pos, int type); struct token *initializer(struct expression **tree, struct token *token); struct token *compound_statement(struct token *, struct statement *); +extern void clean_up_statement(struct statement *stmt, void *_parent, int flags); +extern void clean_up_symbol(struct symbol *sym, void *_parent, int flags); + /* The preprocessor calls this 'constant_expression()' */ #define constant_expression(token,tree) conditional_expression(token, tree) |