Arthur Brandao 6 жил өмнө
parent
commit
fdb6b4d1f8

+ 6 - 1
src/migl/lisp/LispFactory.java

@@ -7,6 +7,8 @@ package migl.lisp;
  *
  */
 public class LispFactory {
+	
+	private static Lisp interpreter;
 
     private LispFactory() {
         // do nothing
@@ -18,6 +20,9 @@ public class LispFactory {
      * @return a new lisp interpreter.
      */
     public static Lisp makeIntepreter() {
-        return new LispImpl();
+    	if(interpreter == null) {
+    		interpreter = new LispImpl();
+    	}
+        return interpreter;
     }
 }