From 90f343c701585066bf30f226811d65f3bce58c95 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Wed, 24 Aug 2016 14:46:16 -0400 Subject: Added tentative support for subrules Added a new sort of config reader that tentatively supports subrules through indentation. I need to actually write a parser that uses it though. I think something to do with trees would work well for testing it. --- BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java b/BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java index 5a7f95b..179eec0 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java +++ b/BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java @@ -92,18 +92,16 @@ public class CLICommander { // Read in a command String currentLine = inputSource.nextLine(); - // Handle handleable commands + // Handle commands we can handle if (currentMode.canHandle(currentLine)) { String[] commandTokens = currentLine.split(" "); - String[] commandArgs; + String[] commandArgs = null; // Parse args if they are present if (commandTokens.length > 1) { commandArgs = Arrays.copyOfRange(commandTokens, 1, commandTokens.length); - } else { - commandArgs = null; } // Process command -- cgit v1.2.3