]>
Commit | Line | Data |
---|---|---|
e1a4dd13 | 1 | /* Interface for the GNU C++ pretty-printer. |
a5544970 | 2 | Copyright (C) 2003-2019 Free Software Foundation, Inc. |
e1a4dd13 GDR |
3 | Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net> |
4 | ||
5 | This file is part of GCC. | |
6 | ||
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 | |
e77f031d | 9 | Software Foundation; either version 3, or (at your option) any later |
e1a4dd13 GDR |
10 | version. |
11 | ||
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. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
e77f031d NC |
18 | along with GCC; see the file COPYING3. If not see |
19 | <http://www.gnu.org/licenses/>. */ | |
e1a4dd13 GDR |
20 | |
21 | #ifndef GCC_CXX_PRETTY_PRINT_H | |
22 | #define GCC_CXX_PRETTY_PRINT_H | |
23 | ||
39dabefd | 24 | #include "c-family/c-pretty-print.h" |
e1a4dd13 | 25 | |
b066401f | 26 | enum cxx_pretty_printer_flags |
4b780675 | 27 | { |
c72a1a86 | 28 | /* Ask for a qualified-id. */ |
d04a575f | 29 | pp_cxx_flag_default_argument = 1 << pp_c_flag_last_bit |
b066401f | 30 | }; |
c8094d83 | 31 | |
6c1dae73 | 32 | class cxx_pretty_printer : public c_pretty_printer |
e1a4dd13 | 33 | { |
6c1dae73 | 34 | public: |
da6ca2b5 | 35 | cxx_pretty_printer (); |
ca43e9d5 | 36 | |
66dfe4c4 GDR |
37 | void constant (tree); |
38 | void id_expression (tree); | |
7ecc2600 | 39 | void primary_expression (tree); |
fb22178f | 40 | void postfix_expression (tree); |
00d34d3a GDR |
41 | void unary_expression (tree); |
42 | void multiplicative_expression (tree); | |
43 | void conditional_expression (tree); | |
44 | void assignment_expression (tree); | |
45 | void expression (tree); | |
20059c8b | 46 | void type_id (tree); |
8dc70667 | 47 | void statement (tree); |
8f0e4d72 GDR |
48 | void declaration (tree); |
49 | void declaration_specifiers (tree); | |
7c26172c | 50 | void simple_type_specifier (tree); |
8f0e4d72 GDR |
51 | void function_specifier (tree); |
52 | void declarator (tree); | |
53 | void direct_declarator (tree); | |
54 | void abstract_declarator (tree); | |
55 | void direct_abstract_declarator (tree); | |
8dc70667 | 56 | |
e1a4dd13 GDR |
57 | /* This is the enclosing scope of the entity being pretty-printed. */ |
58 | tree enclosing_scope; | |
b066401f | 59 | }; |
e1a4dd13 | 60 | |
b9b44fb9 | 61 | #define pp_cxx_cv_qualifier_seq(PP, T) \ |
b066401f | 62 | pp_c_type_qualifier_list (PP, T) |
985acf5a PC |
63 | #define pp_cxx_cv_qualifiers(PP, CV, FT) \ |
64 | pp_c_cv_qualifiers (PP, CV, FT) | |
b066401f GDR |
65 | |
66 | #define pp_cxx_whitespace(PP) pp_c_whitespace (PP) | |
67 | #define pp_cxx_left_paren(PP) pp_c_left_paren (PP) | |
68 | #define pp_cxx_right_paren(PP) pp_c_right_paren (PP) | |
69 | #define pp_cxx_left_brace(PP) pp_c_left_brace (PP) | |
70 | #define pp_cxx_right_brace(PP) pp_c_right_brace (PP) | |
71 | #define pp_cxx_left_bracket(PP) pp_c_left_bracket (PP) | |
72 | #define pp_cxx_right_bracket(PP) pp_c_right_bracket (PP) | |
73 | #define pp_cxx_dot(PP) pp_c_dot (PP) | |
74 | #define pp_cxx_ampersand(PP) pp_c_ampersand (PP) | |
75 | #define pp_cxx_star(PP) pp_c_star (PP) | |
76 | #define pp_cxx_arrow(PP) pp_c_arrow (PP) | |
77 | #define pp_cxx_semicolon(PP) pp_c_semicolon (PP) | |
78 | #define pp_cxx_complement(PP) pp_c_complement (PP) | |
79 | ||
80 | #define pp_cxx_ws_string(PP, I) pp_c_ws_string (PP, I) | |
81 | #define pp_cxx_identifier(PP, I) pp_c_identifier (PP, I) | |
41fd3bac | 82 | #define pp_cxx_tree_identifier(PP, T) \ |
b066401f | 83 | pp_c_tree_identifier (PP, T) |
41fd3bac | 84 | |
41fd3bac GDR |
85 | void pp_cxx_begin_template_argument_list (cxx_pretty_printer *); |
86 | void pp_cxx_end_template_argument_list (cxx_pretty_printer *); | |
87 | void pp_cxx_colon_colon (cxx_pretty_printer *); | |
88 | void pp_cxx_separate_with (cxx_pretty_printer *, int); | |
e1a4dd13 | 89 | |
b2517173 | 90 | void pp_cxx_canonical_template_parameter (cxx_pretty_printer *, tree); |
e74392f0 | 91 | void pp_cxx_trait_expression (cxx_pretty_printer *, tree); |
fdb8f418 | 92 | void pp_cxx_va_arg_expression (cxx_pretty_printer *, tree); |
094a5fe2 | 93 | void pp_cxx_offsetof_expression (cxx_pretty_printer *, tree); |
be845b04 | 94 | void pp_cxx_addressof_expression (cxx_pretty_printer *, tree); |
3ce4f9e4 | 95 | void pp_cxx_userdef_literal (cxx_pretty_printer *, tree); |
971e17ff AS |
96 | void pp_cxx_requires_clause (cxx_pretty_printer *, tree); |
97 | void pp_cxx_requires_expr (cxx_pretty_printer *, tree); | |
98 | void pp_cxx_simple_requirement (cxx_pretty_printer *, tree); | |
99 | void pp_cxx_type_requirement (cxx_pretty_printer *, tree); | |
100 | void pp_cxx_compound_requirement (cxx_pretty_printer *, tree); | |
101 | void pp_cxx_nested_requirement (cxx_pretty_printer *, tree); | |
102 | void pp_cxx_predicate_constraint (cxx_pretty_printer *, tree); | |
103 | void pp_cxx_expression_constraint (cxx_pretty_printer *, tree); | |
104 | void pp_cxx_type_constraint (cxx_pretty_printer *, tree); | |
105 | void pp_cxx_implicit_conversion_constraint (cxx_pretty_printer *, tree); | |
106 | void pp_cxx_argument_deduction_constraint (cxx_pretty_printer *, tree); | |
107 | void pp_cxx_exception_constraint (cxx_pretty_printer *, tree); | |
108 | void pp_cxx_parameterized_constraint (cxx_pretty_printer *, tree); | |
109 | void pp_cxx_conjunction (cxx_pretty_printer *, tree); | |
110 | void pp_cxx_disjunction (cxx_pretty_printer *, tree); | |
111 | void pp_cxx_constraint (cxx_pretty_printer *, tree); | |
4fea442d | 112 | void pp_cxx_constrained_type_spec (cxx_pretty_printer *, tree); |
e1a4dd13 GDR |
113 | |
114 | #endif /* GCC_CXX_PRETTY_PRINT_H */ |