OSDN Git Service

* pretty-print.h (pp_set_line_maximum_length): Make macro.
[pf3gnuchains/gcc-fork.git] / gcc / cp / cxx-pretty-print.c
1 /* Implementation of subroutines for the GNU C++ pretty-printer.
2    Copyright (C) 2003 Free Software Foundation, Inc.
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
9 Software Foundation; either version 2, or (at your option) any later
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
18 along with GCC; see the file COPYING.  If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.  */
21
22 #include "config.h"
23 #include "system.h"
24 #include "coretypes.h"
25 #include "tm.h"
26 #include "real.h"
27 #include "cxx-pretty-print.h"
28 #include "cp-tree.h"
29 \f
30 /* Declarations.  */
31
32 void
33 pp_cxx_declaration (cxx_pretty_printer *pp, tree t)
34 {
35   pp_unsupported_tree (pp, t);
36 }
37
38 static void
39 pp_cxx_declaration_specifiers (cxx_pretty_printer *pp, tree t)
40 {
41   pp_unsupported_tree (pp, t);
42 }
43
44 static void
45 pp_cxx_type_specifier (cxx_pretty_printer *pp, tree t)
46 {
47   pp_unsupported_tree (pp, t);
48 }
49
50 static void
51 pp_cxx_declarator (cxx_pretty_printer *pp, tree t)
52 {
53   pp_unsupported_tree (pp, t);
54 }
55
56 static void
57 pp_cxx_direct_declarator (cxx_pretty_printer *pp, tree t)
58 {
59   pp_unsupported_tree (pp, t);
60 }
61
62 static void
63 pp_cxx_parameter_declaration (cxx_pretty_printer *pp, tree t)
64 {
65   pp_unsupported_tree (pp, t);
66 }
67
68 static void
69 pp_cxx_type_id (cxx_pretty_printer *pp, tree t)
70 {
71   pp_unsupported_tree (pp, t);
72 }
73
74 /* Statements.  */
75
76 void
77 pp_cxx_statement (cxx_pretty_printer *pp, tree t)
78 {
79   pp_unsupported_tree (pp, t);
80 }
81
82 /* Expressions. */
83
84 static void
85 pp_cxx_primary_expression (cxx_pretty_printer *pp, tree t)
86 {
87   pp_unsupported_tree (pp, t);
88 }
89
90 static void
91 pp_cxx_postfix_expression (cxx_pretty_printer *pp, tree t)
92 {
93   pp_unsupported_tree (pp, t);
94 }
95
96 static void
97 pp_cxx_unary_expression (cxx_pretty_printer *pp, tree t)
98 {
99   pp_unsupported_tree (pp, t);
100 }
101
102 static void
103 pp_cxx_initializer (cxx_pretty_printer *pp, tree t)
104 {
105   pp_unsupported_tree (pp, t);
106 }
107
108 static void
109 pp_cxx_multiplicatice_expression (cxx_pretty_printer *pp, tree t)
110 {
111   pp_unsupported_tree (pp, t);
112 }
113
114 static void
115 pp_cxx_conditional_expression (cxx_pretty_printer *pp, tree t)
116 {
117   pp_unsupported_tree (pp, t);
118 }
119
120 static void
121 pp_cxx_assignment_expression (cxx_pretty_printer *pp, tree t)
122 {
123   pp_unsupported_tree (pp, t);
124 }
125
126 void
127 pp_cxx_expression (cxx_pretty_printer *pp, tree t)
128 {
129   pp_unsupported_tree (pp, t);
130 }
131
132
133 \f
134 typedef c_pretty_print_fn pp_fun;
135
136 void
137 pp_cxx_pretty_printer_init (cxx_pretty_printer *pp)
138 {
139   pp_c_pretty_printer_init (pp_c_base (pp));
140
141   pp->c_base.declaration = (pp_fun) pp_cxx_declaration;
142   pp->c_base.declaration_specifiers = (pp_fun) pp_cxx_declaration_specifiers;
143   pp->c_base.type_specifier = (pp_fun) pp_cxx_type_specifier;
144   pp->c_base.declarator = (pp_fun) pp_cxx_declarator;
145   pp->c_base.direct_declarator = (pp_fun) pp_cxx_direct_declarator;
146   pp->c_base.parameter_declaration = (pp_fun) pp_cxx_parameter_declaration;
147   pp->c_base.type_id = (pp_fun) pp_cxx_type_id;
148   pp->c_base.statement = (pp_fun) pp_cxx_statement;
149   pp->c_base.primary_expression = (pp_fun) pp_cxx_primary_expression;
150   pp->c_base.postfix_expression = (pp_fun) pp_cxx_postfix_expression;
151   pp->c_base.unary_expression = (pp_fun) pp_cxx_unary_expression;
152   pp->c_base.initializer = (pp_fun) pp_cxx_initializer;
153   pp->c_base.multiplicative_expression = (pp_fun) pp_cxx_multiplicatice_expression;
154   pp->c_base.conditional_expression = (pp_fun) pp_cxx_conditional_expression;
155   pp->c_base.assignment_expression = (pp_fun) pp_cxx_assignment_expression;
156   pp->enclosing_scope = NULL;
157 }