1132718Skan/* Interface for the GNU C++ pretty-printer.
2169689Skan   Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
3132718Skan   Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
4132718Skan
5132718SkanThis file is part of GCC.
6132718Skan
7132718SkanGCC is free software; you can redistribute it and/or modify it under
8132718Skanthe terms of the GNU General Public License as published by the Free
9132718SkanSoftware Foundation; either version 2, or (at your option) any later
10132718Skanversion.
11132718Skan
12132718SkanGCC is distributed in the hope that it will be useful, but WITHOUT ANY
13132718SkanWARRANTY; without even the implied warranty of MERCHANTABILITY or
14132718SkanFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15132718Skanfor more details.
16132718Skan
17132718SkanYou should have received a copy of the GNU General Public License
18132718Skanalong with GCC; see the file COPYING.  If not, write to the Free
19169689SkanSoftware Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
20169689Skan02110-1301, USA.  */
21132718Skan
22132718Skan#ifndef GCC_CXX_PRETTY_PRINT_H
23132718Skan#define GCC_CXX_PRETTY_PRINT_H
24132718Skan
25132718Skan#include "c-pretty-print.h"
26132718Skan
27132718Skan#undef pp_c_base
28132718Skan#define pp_c_base(PP) (&(PP)->c_base)
29132718Skan
30132718Skantypedef enum
31132718Skan{
32169689Skan  /* Ask for a qualified-id.  */
33132718Skan  pp_cxx_flag_default_argument = 1 << pp_c_flag_last_bit
34169689Skan
35132718Skan} cxx_pretty_printer_flags;
36132718Skan
37132718Skantypedef struct
38132718Skan{
39132718Skan  c_pretty_printer c_base;
40132718Skan  /* This is the enclosing scope of the entity being pretty-printed.  */
41132718Skan  tree enclosing_scope;
42132718Skan} cxx_pretty_printer;
43132718Skan
44169689Skan#define pp_cxx_cv_qualifier_seq(PP, T)   \
45169689Skan   pp_c_type_qualifier_list (pp_c_base (PP), T)
46169689Skan
47169689Skan#define pp_cxx_whitespace(PP)		pp_c_whitespace (pp_c_base (PP))
48169689Skan#define pp_cxx_left_paren(PP)		pp_c_left_paren (pp_c_base (PP))
49169689Skan#define pp_cxx_right_paren(PP)		pp_c_right_paren (pp_c_base (PP))
50169689Skan#define pp_cxx_left_brace(PP)		pp_c_left_brace (pp_c_base (PP))
51169689Skan#define pp_cxx_right_brace(PP)		pp_c_right_brace (pp_c_base (PP))
52169689Skan#define pp_cxx_left_bracket(PP)		pp_c_left_bracket (pp_c_base (PP))
53169689Skan#define pp_cxx_right_bracket(PP)	pp_c_right_bracket (pp_c_base (PP))
54169689Skan#define pp_cxx_dot(PP)			pp_c_dot (pp_c_base (PP))
55169689Skan#define pp_cxx_ampersand(PP)		pp_c_ampersand (pp_c_base (PP))
56169689Skan#define pp_cxx_star(PP)			pp_c_star (pp_c_base (PP))
57169689Skan#define pp_cxx_arrow(PP)		pp_c_arrow (pp_c_base (PP))
58169689Skan#define pp_cxx_semicolon(PP)		pp_c_semicolon (pp_c_base (PP))
59169689Skan#define pp_cxx_complement(PP)		pp_c_complement (pp_c_base (PP))
60169689Skan
61169689Skan#define pp_cxx_identifier(PP, I)	pp_c_identifier (pp_c_base (PP), I)
62169689Skan#define pp_cxx_tree_identifier(PP, T) \
63169689Skan  pp_c_tree_identifier (pp_c_base (PP), T)
64169689Skan
65132718Skanvoid pp_cxx_pretty_printer_init (cxx_pretty_printer *);
66169689Skanvoid pp_cxx_begin_template_argument_list (cxx_pretty_printer *);
67169689Skanvoid pp_cxx_end_template_argument_list (cxx_pretty_printer *);
68169689Skanvoid pp_cxx_colon_colon (cxx_pretty_printer *);
69169689Skanvoid pp_cxx_separate_with (cxx_pretty_printer *, int);
70132718Skan
71132718Skanvoid pp_cxx_declaration (cxx_pretty_printer *, tree);
72132718Skanvoid pp_cxx_canonical_template_parameter (cxx_pretty_printer *, tree);
73132718Skan
74132718Skan
75132718Skan#endif /* GCC_CXX_PRETTY_PRINT_H */
76