diff options
author | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-24 12:17:53 +0000 |
---|---|---|
committer | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-24 12:17:53 +0000 |
commit | 71a36b9f9589616b4fc76b9be381523851862fd0 (patch) | |
tree | a6a1bef25348c2529c289330dcb76d0f4383bc3b /gcc/pretty-print.h | |
parent | 2ee3b445867f41f1829e6a4f25d921266d824e8d (diff) | |
download | gcc-71a36b9f9589616b4fc76b9be381523851862fd0.tar.gz |
* pretty-print.h: Add macros from cp/error.c
`:w
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55703 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/pretty-print.h')
-rw-r--r-- | gcc/pretty-print.h | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h index 6f4dd38abfc..a4ae280b1fa 100644 --- a/gcc/pretty-print.h +++ b/gcc/pretty-print.h @@ -29,30 +29,39 @@ typedef struct pretty_print_info pretty_print_info; /* The type of pretty-printer flags passed to clients. */ typedef unsigned int pp_flags; -/* The type of pretty-print styles. */ -enum pp_style +enum pp_padding { - pp_standard_c, - pp_gnu_c, - pp_standard_cxx, - pp_gnu_cxx + pp_none, pp_before, pp_after }; struct pretty_print_info { + /* The entity to pretty-print. */ tree entity; - tree scope; - enum pp_style style; pp_flags flags; + /* Where to put whitespace around the entity being formatted. */ + enum pp_padding padding; /* Where we print external representation of ENTITY. */ output_buffer *buffer; - /* Client extenion hook. */ - void *x_data; - - void (*print_declaration) (pretty_print_info *); - void (*print_statement) (pretty_print_info *); - void (*print_expression) (pretty_print_info *); }; +#define pp_sorry_for_unsupported_tree(PPI, T) \ + output_verbatim ((PPI)->buffer, "\nsorry: `%s' not supported by %s\n",\ + tree_code_name[(int) TREE_CODE (T)], __FUNCTION__) + +#define pp_left_paren(PPI) output_add_character ((PPI)->buffer, '(') +#define pp_right_paren(PPI) output_add_character ((PPI)->buffer, ')') +#define pp_left_bracket(PPI) output_add_character ((PPI)->buffer, '[') +#define pp_right_bracket(PPI) output_add_character ((PPI)->buffer, '[') +#define pp_semi_colon(PPI) output_add_character ((PPI)->buffer, ';') +#define pp_comma(PPI) output_add_string ((PPI)->buffer, ", ") +#define pp_dot(PPI) output_add_character ((PPI)->buffer, '.') +#define pp_colon(PPI) output_add_character ((PPI)->buffer, ':') +#define pp_colon_colon(PPI) output_add_string ((PPI)->buffer, "::") +#define pp_quote(PPI) output_add_character ((PPI)->buffer, '\'') +#define pp_backquote(PPI) output_add_character ((PPI)->buffer, '`') +#define pp_doublequote(PPI) output_add_character ((PPI)->buffer, '"') + + #endif /* GCC_PRETTY_PRINT_H */ |