aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/com/jantuomi/tunkki/repl/Repl.java
diff options
context:
space:
mode:
authorjantuomi <jans.tuomi@gmail.com>2016-08-30 16:50:00 +0300
committerjantuomi <jans.tuomi@gmail.com>2016-08-30 16:50:00 +0300
commit7abd9bde5724aaa95751bc9b69ee0cb49c4fd399 (patch)
treed8f2de5ade3ff92fbb2d43d03add02a4d63daf34 /src/main/com/jantuomi/tunkki/repl/Repl.java
parenta6bb3d4f3789fab2842600bed1816515de1b5aaf (diff)
Include calls now always return an object containing the library scopemaster
Resolves #15
Diffstat (limited to 'src/main/com/jantuomi/tunkki/repl/Repl.java')
-rw-r--r--src/main/com/jantuomi/tunkki/repl/Repl.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/com/jantuomi/tunkki/repl/Repl.java b/src/main/com/jantuomi/tunkki/repl/Repl.java
index 0b415b8..e960894 100644
--- a/src/main/com/jantuomi/tunkki/repl/Repl.java
+++ b/src/main/com/jantuomi/tunkki/repl/Repl.java
@@ -1,12 +1,12 @@
package com.jantuomi.tunkki.repl;
import com.jantuomi.tunkki.Tunkki;
+import com.jantuomi.tunkki.core.parser.ast.ASTNode;
import com.jantuomi.tunkki.exception.types.TunkkiError;
import com.jantuomi.tunkki.utils.IO;
-import jline.console.*;
import java.io.IOException;
-import java.io.PrintWriter;
+import java.util.List;
/**
* Created by jan on 31.7.2016.
@@ -39,7 +39,8 @@ public class Repl {
try {
isMultilineInput = false;
command += line;
- tunkki.run(command);
+ List<ASTNode> nodes = tunkki.parseAndInterpret(command);
+ tunkki.executeAndOutput(nodes);
} catch (TunkkiError ex) {
ex.printStackTrace();
Thread.sleep(50);