Mercurial > hg > octave-lyh
diff src/pt-cmd.h @ 2620:5c773d4745d6
[project @ 1997-01-23 16:26:25 by jwe]
author | jwe |
---|---|
date | Thu, 23 Jan 1997 16:26:26 +0000 |
parents | 97a566037a75 |
children | 2c0f259cf83d |
line wrap: on
line diff
--- a/src/pt-cmd.h +++ b/src/pt-cmd.h @@ -48,12 +48,15 @@ class tree_if_command; class tree_try_catch_command; class tree_unwind_protect_command; +class tree_no_op_command; class tree_break_command; class tree_continue_command; class tree_return_command; class tree_walker; +#include <string> + #include "pt-base.h" // A base class for commands. @@ -290,6 +293,29 @@ tree_statement_list *catch_code; }; +// No-op. + +class +tree_no_op_command : public tree_command +{ +public: + + tree_no_op_command (const string& cmd = "no_op", int l = -1, int c = -1) + : tree_command (l, c), orig_cmd (cmd) { } + + ~tree_no_op_command (void) { } + + void eval (void) { } + + void accept (tree_walker& tw); + + string original_command (void) { return orig_cmd; } + +private: + + string orig_cmd; +}; + // Break. class