diff tty-main.cpp @ 6:1b575145197e

interpreter is now a class instead of a namespace with functions
author John W. Eaton <jwe@octave.org>
date Thu, 23 May 2019 07:41:18 -0400
parents 0e154787183d
children 822a2fe5bb51
line wrap: on
line diff
--- a/tty-main.cpp	Wed May 22 18:07:37 2019 -0400
+++ b/tty-main.cpp	Thu May 23 07:41:18 2019 -0400
@@ -23,7 +23,7 @@
       << "Semicolon terminates statement.\n"
       << "GNU Readline available for history editing.\n" << std::endl;
 
-    interpreter::init ();
+    calc::interpreter interp;
 
     for (;;)
       {
@@ -42,14 +42,12 @@
 
         free (tmp);
 
-        int status = interpreter::parse_and_execute (line);
+        int status = interp.parse_and_execute (line);
 
         if (status < 0)
           break;
       }
 
-    interpreter::fini ();
-
     return 0;
   }