Really commit all changes
[official-gcc.git] / gcc / cp / cxx-pretty-print.h
blobc3bb9c8bc54b487259aab24c074478ca4f803ecb
1 /* Interface for the GNU C++ pretty-printer.
2 Copyright (C) 2003-2013 Free Software Foundation, Inc.
3 Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #ifndef GCC_CXX_PRETTY_PRINT_H
22 #define GCC_CXX_PRETTY_PRINT_H
24 #include "c-family/c-pretty-print.h"
26 enum cxx_pretty_printer_flags
28 /* Ask for a qualified-id. */
29 pp_cxx_flag_default_argument = 1 << pp_c_flag_last_bit
32 struct cxx_pretty_printer : c_pretty_printer
34 cxx_pretty_printer ();
36 void constant (tree);
37 void id_expression (tree);
38 void primary_expression (tree);
39 void postfix_expression (tree);
40 void unary_expression (tree);
41 void multiplicative_expression (tree);
42 void conditional_expression (tree);
43 void assignment_expression (tree);
44 void expression (tree);
45 void statement (tree);
47 /* This is the enclosing scope of the entity being pretty-printed. */
48 tree enclosing_scope;
51 #define pp_cxx_cv_qualifier_seq(PP, T) \
52 pp_c_type_qualifier_list (PP, T)
53 #define pp_cxx_cv_qualifiers(PP, CV) \
54 pp_c_cv_qualifiers (PP, CV, false)
56 #define pp_cxx_whitespace(PP) pp_c_whitespace (PP)
57 #define pp_cxx_left_paren(PP) pp_c_left_paren (PP)
58 #define pp_cxx_right_paren(PP) pp_c_right_paren (PP)
59 #define pp_cxx_left_brace(PP) pp_c_left_brace (PP)
60 #define pp_cxx_right_brace(PP) pp_c_right_brace (PP)
61 #define pp_cxx_left_bracket(PP) pp_c_left_bracket (PP)
62 #define pp_cxx_right_bracket(PP) pp_c_right_bracket (PP)
63 #define pp_cxx_dot(PP) pp_c_dot (PP)
64 #define pp_cxx_ampersand(PP) pp_c_ampersand (PP)
65 #define pp_cxx_star(PP) pp_c_star (PP)
66 #define pp_cxx_arrow(PP) pp_c_arrow (PP)
67 #define pp_cxx_semicolon(PP) pp_c_semicolon (PP)
68 #define pp_cxx_complement(PP) pp_c_complement (PP)
70 #define pp_cxx_ws_string(PP, I) pp_c_ws_string (PP, I)
71 #define pp_cxx_identifier(PP, I) pp_c_identifier (PP, I)
72 #define pp_cxx_tree_identifier(PP, T) \
73 pp_c_tree_identifier (PP, T)
75 void pp_cxx_begin_template_argument_list (cxx_pretty_printer *);
76 void pp_cxx_end_template_argument_list (cxx_pretty_printer *);
77 void pp_cxx_colon_colon (cxx_pretty_printer *);
78 void pp_cxx_separate_with (cxx_pretty_printer *, int);
80 void pp_cxx_declaration (cxx_pretty_printer *, tree);
81 void pp_cxx_canonical_template_parameter (cxx_pretty_printer *, tree);
82 void pp_cxx_trait_expression (cxx_pretty_printer *, tree);
83 void pp_cxx_va_arg_expression (cxx_pretty_printer *, tree);
84 void pp_cxx_offsetof_expression (cxx_pretty_printer *, tree);
85 void pp_cxx_userdef_literal (cxx_pretty_printer *, tree);
88 #endif /* GCC_CXX_PRETTY_PRINT_H */