Mercurial > octave-nkf
comparison src/pt-cmd.h @ 8913:35cd375d4bb3
make tree::dup functions const
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 05 Mar 2009 13:50:25 -0500 |
parents | c84a5b6377c4 |
children | eb63fbe60fab |
comparison
equal
deleted
inserted
replaced
8912:57c3155754d6 | 8913:35cd375d4bb3 |
---|---|
44 : tree (l, c) { } | 44 : tree (l, c) { } |
45 | 45 |
46 virtual ~tree_command (void) { } | 46 virtual ~tree_command (void) { } |
47 | 47 |
48 virtual tree_command *dup (symbol_table::scope_id, | 48 virtual tree_command *dup (symbol_table::scope_id, |
49 symbol_table::context_id context) = 0; | 49 symbol_table::context_id context) const = 0; |
50 | 50 |
51 private: | 51 private: |
52 | 52 |
53 // No copying! | 53 // No copying! |
54 | 54 |
69 orig_cmd (cmd) { } | 69 orig_cmd (cmd) { } |
70 | 70 |
71 ~tree_no_op_command (void) { } | 71 ~tree_no_op_command (void) { } |
72 | 72 |
73 tree_command *dup (symbol_table::scope_id scope, | 73 tree_command *dup (symbol_table::scope_id scope, |
74 symbol_table::context_id context); | 74 symbol_table::context_id context) const; |
75 | 75 |
76 void accept (tree_walker& tw); | 76 void accept (tree_walker& tw); |
77 | 77 |
78 bool is_end_of_fcn_or_script (void) const { return eof; } | 78 bool is_end_of_fcn_or_script (void) const { return eof; } |
79 | 79 |
103 : tree_command (l, c), fcn (f) { } | 103 : tree_command (l, c), fcn (f) { } |
104 | 104 |
105 ~tree_function_def (void) { } | 105 ~tree_function_def (void) { } |
106 | 106 |
107 tree_command *dup (symbol_table::scope_id scope, | 107 tree_command *dup (symbol_table::scope_id scope, |
108 symbol_table::context_id context); | 108 symbol_table::context_id context) const; |
109 | 109 |
110 void accept (tree_walker& tw); | 110 void accept (tree_walker& tw); |
111 | 111 |
112 octave_value function (void) { return fcn; } | 112 octave_value function (void) { return fcn; } |
113 | 113 |