Mercurial > octave
diff src/tc-rep.h @ 581:bc813f5eb025
[project @ 1994-08-07 01:02:15 by jwe]
author | jwe |
---|---|
date | Sun, 07 Aug 1994 01:02:15 +0000 |
parents | d169be9237fb |
children | 6f948c6251a9 |
line wrap: on
line diff
--- a/src/tc-rep.h Sun Aug 07 01:02:15 1994 +0000 +++ b/src/tc-rep.h Sun Aug 07 01:02:15 1994 +0000 @@ -39,27 +39,18 @@ struct Mapper_fcn; -/* - * Forward class declarations. - */ +// Forward class declarations. + class tree; class tree_constant; -/* - * The actual representation of the tree_constant. - */ +// The actual representation of the tree_constant. + class tree_constant_rep { friend class tree_constant; - enum force_orient - { - no_orient, - row_orient, - column_orient, - }; - public: enum constant_type { @@ -73,6 +64,14 @@ magic_colon, }; + enum force_orient + { + no_orient, + row_orient, + column_orient, + }; + +private: tree_constant_rep (void); tree_constant_rep (double d); @@ -155,6 +154,8 @@ ColumnVector to_vector (void) const; Matrix to_matrix (void) const; + void stash_original_text (char *s); + tree_constant_rep::constant_type force_numeric (int force_str_conv = 0); tree_constant make_numeric (int force_str_conv = 0) const; @@ -245,6 +246,8 @@ void maybe_mutate (void); void print (void); + void print_code (ostream& os); + tree_constant do_index (const Octave_object& args); tree_constant do_scalar_index (const Octave_object& args) const; @@ -330,7 +333,6 @@ tree_constant mapper (Mapper_fcn& m_fcn, int print) const; -private: int count; constant_type type_tag; union @@ -342,6 +344,7 @@ char *string; // A character string constant. Range *range; // A set of evenly spaced values. }; + char *orig_text; }; extern tree_constant do_binary_op (tree_constant& a, tree_constant& b,