Mercurial > octave
annotate libinterp/parse-tree/pt-pr-code.h @ 26686:581d01526b34
eliminate unnecessary tree_funcall class
The tree_funcall class was only used to handled generated calls to
internal functions used by classdef superclass reference and metaclass
query operations. This change replaces those function calls by
something more direct.
* pt-classdef.h, pt-classdef.cc (tree_superclass_ref,
tree_metaclass_query): New classes.
* pt-walk.h (tree_walker::visit_tree_funcall): Delete. Update all
derived classes.
(tree_walker::visit_superclass_ref,
tree_walker::visit_metaclass_query): New virtual functions.
* pt-pr-code.h, pt-pr-code.cc (tree_print_code::visit
(tree_print_code::visit_superclass_ref,
tree_print_code::visit_metaclass_query):
Correctly print these parse tree elements.
* oct-parse.yy (superclass_identifier, meta_identifier): Use new
tree_superclass_ref tree_metaclass_query classes instead of
tree_funcall to represent these language elements.
* lex.ll (base_lexer::handle_superclass_identifier): Attempt to make
intent of code clearer. Save line and column info in token.
* pt-eval.h, pt-eval.cc (tree_evaluator::visit_funcall): Delete.
(tree_evaluator::visit_superclass_ref,
tree_evaluator::visit_metaclass_query): New functions. Handle
superclass reference and metaclass query operations more directly.
* ov-classdef.h, ov-classdef.cc (F__superclass_reference__,
F__meta_class_query__): Delete.
(class octave_classdef_superclass_ref): Work directly with
method or object and class names as strings instead of octave_value
objects.
(octave_classdef::superclass_ref, octave_classdef::metaclass_query):
New static functions.
* token.h, token.cc: Attempt to use clearer names for superclass
reference tokens.
* pt-funcall.h, pt-funcall.cc: Delete.
* libinterp/parse-tree/module.mk: Update.
* pt-all.h: Update.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 07 Feb 2019 00:03:55 +0000 |
parents | fff643eb3514 |
children | 6388a240de87 |
rev | line source |
---|---|
2123 | 1 /* |
2 | |
26376
00f796120a6d
maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
3 Copyright (C) 1996-2019 John W. Eaton |
2123 | 4 |
5 This file is part of Octave. | |
6 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23750
diff
changeset
|
7 Octave is free software: you can redistribute it and/or modify it |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
8 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23750
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
10 (at your option) any later version. |
2123 | 11 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
13 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
15 GNU General Public License for more details. |
2123 | 16 |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23750
diff
changeset
|
19 <https://www.gnu.org/licenses/>. |
2123 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
23 #if ! defined (octave_pt_pr_code_h) |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
24 #define octave_pt_pr_code_h 1 |
2123 | 25 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21017
diff
changeset
|
26 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21017
diff
changeset
|
27 |
4676 | 28 #include <stack> |
2530 | 29 #include <string> |
30 | |
2123 | 31 #include "pt-walk.h" |
32 | |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
33 namespace octave |
2123 | 34 { |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
35 class comment_elt; |
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
36 class comment_list; |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
37 class tree_decl_command; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
38 class tree_expression; |
2123 | 39 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
40 // How to print the code that the parse trees represent. |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
41 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
42 class tree_print_code : public tree_walker |
4676 | 43 { |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
44 public: |
2123 | 45 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
46 tree_print_code (std::ostream& os_arg, |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
47 const std::string& pfx = "", |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
48 bool pr_orig_txt = true) |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
49 : m_os (os_arg), m_prefix (pfx), m_nesting (), |
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
50 m_print_original_text (pr_orig_txt), |
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
51 m_curr_print_indent_level (0), m_beginning_of_line (true), |
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
52 m_suppress_newlines (0) |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
53 { |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
54 // For "none". |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
55 m_nesting.push ('n'); |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
56 } |
2123 | 57 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
58 // No copying! |
2123 | 59 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
60 tree_print_code (const tree_print_code&) = delete; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
61 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
62 tree_print_code& operator = (const tree_print_code&) = delete; |
2123 | 63 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
64 ~tree_print_code (void) = default; |
2123 | 65 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
66 void visit_anon_fcn_handle (tree_anon_fcn_handle&); |
2123 | 67 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
68 void visit_argument_list (tree_argument_list&); |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
69 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
70 void visit_binary_expression (tree_binary_expression&); |
2123 | 71 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
72 void visit_break_command (tree_break_command&); |
8658
73c4516fae10
New evaluator and debugger derived from tree-walker class
John W. Eaton <jwe@octave.org>
parents:
7715
diff
changeset
|
73 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
74 void visit_colon_expression (tree_colon_expression&); |
2846 | 75 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
76 void visit_continue_command (tree_continue_command&); |
2846 | 77 |
23469
2699c5974844
handle global and persistent in tree_decl_command, not as separate classes
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
78 void visit_decl_command (tree_decl_command&); |
2846 | 79 |
23469
2699c5974844
handle global and persistent in tree_decl_command, not as separate classes
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
80 void visit_decl_init_list (tree_decl_init_list&); |
2969 | 81 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
82 void visit_decl_elt (tree_decl_elt&); |
2123 | 83 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
84 void visit_simple_for_command (tree_simple_for_command&); |
2123 | 85 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
86 void visit_complex_for_command (tree_complex_for_command&); |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
87 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
88 void visit_octave_user_script (octave_user_script&); |
2123 | 89 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
90 void visit_octave_user_function (octave_user_function&); |
2123 | 91 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
92 void visit_octave_user_function_header (octave_user_function&); |
7715
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
93 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
94 void visit_octave_user_function_trailer (octave_user_function&); |
2123 | 95 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
96 void visit_function_def (tree_function_def&); |
2123 | 97 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
98 void visit_identifier (tree_identifier&); |
2123 | 99 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
100 void visit_if_clause (tree_if_clause&); |
2123 | 101 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
102 void visit_if_command (tree_if_command&); |
2123 | 103 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
104 void visit_if_command_list (tree_if_command_list&); |
2123 | 105 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
106 void visit_index_expression (tree_index_expression&); |
3351 | 107 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
108 void visit_matrix (tree_matrix&); |
2123 | 109 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
110 void visit_cell (tree_cell&); |
2620 | 111 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
112 void visit_multi_assignment (tree_multi_assignment&); |
2123 | 113 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
114 void visit_no_op_command (tree_no_op_command&); |
4342 | 115 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
116 void visit_constant (tree_constant&); |
15035 | 117 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
118 void visit_fcn_handle (tree_fcn_handle&); |
2123 | 119 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
120 void visit_parameter_list (tree_parameter_list&); |
2123 | 121 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
122 void visit_postfix_expression (tree_postfix_expression&); |
2123 | 123 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
124 void visit_prefix_expression (tree_prefix_expression&); |
2123 | 125 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
126 void visit_return_command (tree_return_command&); |
2123 | 127 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
128 void visit_return_list (tree_return_list&); |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
129 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
130 void visit_simple_assignment (tree_simple_assignment&); |
2123 | 131 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
132 void visit_statement (tree_statement&); |
2123 | 133 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
134 void visit_statement_list (tree_statement_list&); |
2846 | 135 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
136 void visit_switch_case (tree_switch_case&); |
2846 | 137 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
138 void visit_switch_case_list (tree_switch_case_list&); |
2846 | 139 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
140 void visit_switch_command (tree_switch_command&); |
2123 | 141 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
142 void visit_try_catch_command (tree_try_catch_command&); |
2123 | 143 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
144 void visit_unwind_protect_command (tree_unwind_protect_command&); |
2123 | 145 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
146 void visit_while_command (tree_while_command&); |
3484 | 147 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
148 void visit_do_until_command (tree_do_until_command&); |
4980 | 149 |
26686
581d01526b34
eliminate unnecessary tree_funcall class
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
150 void visit_superclass_ref (tree_superclass_ref&); |
581d01526b34
eliminate unnecessary tree_funcall class
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
151 |
581d01526b34
eliminate unnecessary tree_funcall class
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
152 void visit_metaclass_query (tree_metaclass_query&); |
581d01526b34
eliminate unnecessary tree_funcall class
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
153 |
23600
db947ba52118
explicitly limit anonymous functions to a single expression
John W. Eaton <jwe@octave.org>
parents:
23469
diff
changeset
|
154 void print_fcn_handle_body (tree_expression *); |
2123 | 155 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
156 private: |
2123 | 157 |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
158 std::ostream& m_os; |
2530 | 159 |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
160 std::string m_prefix; |
4676 | 161 |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
162 std::stack<char> m_nesting; |
2530 | 163 |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
164 bool m_print_original_text; |
3708 | 165 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
166 // Current indentation. |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
167 int m_curr_print_indent_level; |
2123 | 168 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
169 // TRUE means we are at the beginning of a line. |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
170 bool m_beginning_of_line; |
4980 | 171 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
172 // Nonzero means we are not printing newlines and indenting. |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
173 int m_suppress_newlines; |
8658
73c4516fae10
New evaluator and debugger derived from tree-walker class
John W. Eaton <jwe@octave.org>
parents:
7715
diff
changeset
|
174 |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
175 void reset_indent_level (void) { m_curr_print_indent_level = 0; } |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
176 |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
177 void increment_indent_level (void) { m_curr_print_indent_level += 2; } |
2123 | 178 |
24846
7620f1f5290d
use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
179 void decrement_indent_level (void) { m_curr_print_indent_level -= 2; } |
2123 | 180 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
181 void newline (const char *alt_txt = ", "); |
2123 | 182 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
183 void indent (void); |
2123 | 184 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
185 void reset (void); |
2961 | 186 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
187 void print_parens (const tree_expression& expr, const char *txt); |
3665 | 188 |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
189 void print_comment_list (comment_list *comment_list); |
3665 | 190 |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
191 void print_comment_elt (const comment_elt& comment_elt); |
3665 | 192 |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
193 void print_indented_comment (comment_list *comment_list); |
2123 | 194 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
195 // Must create with an output stream! |
2123 | 196 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
197 tree_print_code (void); |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
198 }; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
199 } |
2123 | 200 |
201 #endif |