Add ability to run commands and exit

This commit is contained in:
Eric Bottard
2017-08-30 16:54:36 +02:00
parent 1216adbef8
commit 9f88c03cf3
10 changed files with 49 additions and 33 deletions

View File

@@ -47,11 +47,7 @@ public class Script {
public void script(File file) throws IOException {
Reader reader = new FileReader(file);
try (FileInputProvider inputProvider = new FileInputProvider(reader, parser)) {
Input input = inputProvider.readInput();
while (input != null) {
shell.evaluate(input);
input = inputProvider.readInput();
}
shell.run(inputProvider);
}
}