From 40858cee415643769ee5f6216b0cd4335996ff2f Mon Sep 17 00:00:00 2001 From: bjculkin Date: Tue, 11 Apr 2017 17:51:13 -0400 Subject: General cleanup and fixes --- dice-lang/src/bjc/dicelang/DiceLangConsole.java | 27 ++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'dice-lang/src/bjc/dicelang/DiceLangConsole.java') diff --git a/dice-lang/src/bjc/dicelang/DiceLangConsole.java b/dice-lang/src/bjc/dicelang/DiceLangConsole.java index 3a53322..c45d772 100644 --- a/dice-lang/src/bjc/dicelang/DiceLangConsole.java +++ b/dice-lang/src/bjc/dicelang/DiceLangConsole.java @@ -12,6 +12,12 @@ import static bjc.dicelang.Errors.ErrorKey.EK_CONS_INVPRAG; import jline.ConsoleReader; import jline.Terminal; +/** + * CLI interface to DiceLang + * + * @author EVE + * + */ public class DiceLangConsole { private int commandNumber; @@ -19,6 +25,12 @@ public class DiceLangConsole { private ConsoleReader read; + /** + * Create a new console. + * + * @param args + * The CLI args for the console. + */ public DiceLangConsole(String[] args) { commandNumber = 0; @@ -31,10 +43,13 @@ public class DiceLangConsole { Terminal.setupTerminal(); } + /** + * Run the console. + */ public void run() { try { read = new ConsoleReader(); - } catch(IOException ioex) { + } catch(@SuppressWarnings("unused") IOException ioex) { System.out.println("ERROR: Console init failed"); return; } @@ -45,7 +60,7 @@ public class DiceLangConsole { try { comm = read.readLine(String.format("(%d) dice-lang> ", commandNumber)); - } catch(IOException ioex) { + } catch(@SuppressWarnings("unused") IOException ioex) { System.out.println("ERROR: I/O failed"); return; } @@ -75,7 +90,7 @@ public class DiceLangConsole { try { comm = read.readLine(String.format("(%d) dice-lang> ", commandNumber)); - } catch(IOException ioex) { + } catch(@SuppressWarnings("unused") IOException ioex) { System.out.println("ERROR: I/O failed"); return; } @@ -258,6 +273,12 @@ public class DiceLangConsole { return true; } + /** + * Main method. + * + * @param args + * CLI arguments. + */ public static void main(String[] args) { DiceLangConsole console = new DiceLangConsole(args); -- cgit v1.2.3