diff src/pt-const.cc @ 2532:0e5eb97cb137

[project @ 1996-11-19 18:13:48 by jwe]
author jwe
date Tue, 19 Nov 1996 18:16:21 +0000
parents 3d905d3820a4
children 8b262e771614
line wrap: on
line diff
--- a/src/pt-const.cc	Tue Nov 19 18:13:18 1996 +0000
+++ b/src/pt-const.cc	Tue Nov 19 18:16:21 1996 +0000
@@ -76,6 +76,15 @@
 {
 }
 
+void
+tree_constant::print (ostream& os, bool pr_as_read_syntax, bool pr_orig_text)
+{
+  if (pr_orig_text && ! orig_text.empty ())
+    os << orig_text;
+  else
+    val.print (os, pr_as_read_syntax);
+}
+
 octave_value
 tree_constant::eval (bool print_result)
 {
@@ -115,6 +124,18 @@
 }
 
 void
+tree_constant::stash_original_text (const string& s)
+{
+  orig_text = s;
+}
+
+string
+tree_constant::original_text (void) const
+{
+  return orig_text;
+}
+
+void
 tree_constant::accept (tree_walker& tw)
 {
   tw.visit_constant (*this);