-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address #22 - Overhauls command definition system
Change ConfigCommandsBuilder to CommandTreeBuilder Add ArgumentTreeBuilder for handling arguments Replace ConfigCommandExecutor with ExecutesBuilder for handling command execution Add FunctionLines package for handling executes parsing and running Moved InvalidExpressionCommand and its subclasses to package Exceptions.FunctionSyntax Add classes CompilerState and InterpreterState to hold parsing and execution information Change method InternalArgument#addArgument to InternalArgument#createArgument Temporarily disabled ReloadCommandHandler and BuildCommandHandler
- Loading branch information
1 parent
2c5fcf5
commit 76bd796
Showing
40 changed files
with
2,284 additions
and
1,823 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
...c/main/java/me/willkroboth/ConfigCommands/Exceptions/FunctionSyntax/InvalidDoCommand.java
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
...ava/me/willkroboth/ConfigCommands/Exceptions/FunctionSyntax/InvalidExpressionCommand.java
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
...ain/java/me/willkroboth/ConfigCommands/Exceptions/FunctionSyntax/InvalidFunctionLine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package me.willkroboth.ConfigCommands.Exceptions.FunctionSyntax; | ||
|
||
import me.willkroboth.ConfigCommands.Exceptions.RegistrationException; | ||
|
||
public class InvalidFunctionLine extends RegistrationException { | ||
public InvalidFunctionLine(String name, String arg, String reason) { | ||
super("Invalid " + name + " command: \"" + arg + "\". " + reason); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...main/java/me/willkroboth/ConfigCommands/Exceptions/FunctionSyntax/InvalidGotoCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...c/main/java/me/willkroboth/ConfigCommands/Exceptions/FunctionSyntax/InvalidIfCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...in/java/me/willkroboth/ConfigCommands/Exceptions/FunctionSyntax/InvalidReturnCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...in/java/me/willkroboth/ConfigCommands/Exceptions/FunctionSyntax/InvalidRunExpression.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package me.willkroboth.ConfigCommands.Exceptions.FunctionSyntax; | ||
|
||
public class InvalidRunExpression extends InvalidFunctionLine { | ||
public InvalidRunExpression(String arg, String reason) { | ||
super("do", arg, reason); | ||
} | ||
} |
7 changes: 0 additions & 7 deletions
7
.../main/java/me/willkroboth/ConfigCommands/Exceptions/FunctionSyntax/InvalidSetCommand.java
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...main/java/me/willkroboth/ConfigCommands/Exceptions/FunctionSyntax/InvalidSetVariable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package me.willkroboth.ConfigCommands.Exceptions.FunctionSyntax; | ||
|
||
public class InvalidSetVariable extends InvalidFunctionLine { | ||
public InvalidSetVariable(String arg, String reason) { | ||
super("set", arg, reason); | ||
} | ||
} |
10 changes: 1 addition & 9 deletions
10
...nds-core/src/main/java/me/willkroboth/ConfigCommands/Exceptions/IncorrectArgumentKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
package me.willkroboth.ConfigCommands.Exceptions; | ||
|
||
public class IncorrectArgumentKey extends RegistrationException { | ||
public IncorrectArgumentKey(String arg, String key) { | ||
super("Command has invalid argument: " + arg + " for key \"" + key + "\"."); | ||
} | ||
|
||
public IncorrectArgumentKey(String arg, String key, String reason) { | ||
super("Command has invalid argument: " + arg + " for key \"" + key + "\". " + reason); | ||
} | ||
|
||
public IncorrectArgumentKey(String arg, boolean ignored, String reason){ | ||
super("Command has invalid argument: " + arg + ". " + reason); | ||
super("Command has invalid argument: " + arg + " with key \"" + key + "\". " + reason); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...mands-core/src/main/java/me/willkroboth/ConfigCommands/HelperClasses/DebuggableState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package me.willkroboth.ConfigCommands.HelperClasses; | ||
|
||
public interface DebuggableState { | ||
boolean isDebug(); | ||
} |
17 changes: 0 additions & 17 deletions
17
...e/willkroboth/ConfigCommands/InternalArguments/HelperClasses/AddThisArgumentConsumer.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.