diff options
| author | Benjamin Culkin <scorpress@gmail.com> | 2024-06-03 17:33:53 -0400 |
|---|---|---|
| committer | Benjamin Culkin <scorpress@gmail.com> | 2024-06-03 17:33:53 -0400 |
| commit | 15a2b29e48f134bc93cfd0a3d8512001e9242f3d (patch) | |
| tree | b3f5c4c5f0e474479cd47ad0ac0f35770fc44881 /JPratt/src/main/java/bjc/pratt/commands/BranchInitialCommand.java | |
| parent | 39ba97edf49270715ec61bedb7d4a62ada819ba0 (diff) | |
Rename the package to the new domain
Diffstat (limited to 'JPratt/src/main/java/bjc/pratt/commands/BranchInitialCommand.java')
| -rw-r--r-- | JPratt/src/main/java/bjc/pratt/commands/BranchInitialCommand.java | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/JPratt/src/main/java/bjc/pratt/commands/BranchInitialCommand.java b/JPratt/src/main/java/bjc/pratt/commands/BranchInitialCommand.java deleted file mode 100644 index 3f3093e..0000000 --- a/JPratt/src/main/java/bjc/pratt/commands/BranchInitialCommand.java +++ /dev/null @@ -1,38 +0,0 @@ -package bjc.pratt.commands; - -import java.util.Map; - -import bjc.pratt.ParserContext; -import bjc.pratt.tokens.Token; -import bjc.utils.parserutils.ParserException; - -/** - * Represents a initial command that has a number of 'sub-commands' in the way that Go/Git CLI does. - * - * @author bjcul - * - * @param <K> Token key type - * @param <V> Token value type - * @param <C> Parser context type - */ -public class BranchInitialCommand<K, V, C> implements InitialCommand<K, V, C> { - private Map<K, InitialCommand<K, V, C>> comMap; - - /** - * Create a new branch initial command - * - * @param mep The map containing the commands - */ - public BranchInitialCommand(Map<K, InitialCommand<K, V, C>> mep) { - this.comMap = mep; - } - - @Override - public CommandResult<K, V> denote(Token<K, V> operator, ParserContext<K, V, C> ctx) throws ParserException { - Token<K, V> curToken = ctx.tokens.current(); - ctx.tokens.expect(comMap.keySet()); - - return comMap.get(curToken.getKey()).denote(curToken, ctx); - } - -} |
