diff options
| author | bjculkin <bjculkin@mix.wvu.edu> | 2017-04-11 17:51:13 -0400 |
|---|---|---|
| committer | bjculkin <bjculkin@mix.wvu.edu> | 2017-04-11 17:51:13 -0400 |
| commit | 40858cee415643769ee5f6216b0cd4335996ff2f (patch) | |
| tree | 86b1c334fa2e5b79cddc16984f5ad43c3c72e41f /dice-lang/src/bjc/dicelang/DiceLangConsole.java | |
| parent | 767ca1b248da19b754d42a814b71b43ef16090be (diff) | |
General cleanup and fixes
Diffstat (limited to 'dice-lang/src/bjc/dicelang/DiceLangConsole.java')
| -rw-r--r-- | dice-lang/src/bjc/dicelang/DiceLangConsole.java | 27 |
1 files changed, 24 insertions, 3 deletions
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); |
