diff options
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java b/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java index 87fe7c1..3937f5f 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java +++ b/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java @@ -7,11 +7,23 @@ import bjc.utils.parserutils.pratt.InitialCommand; import bjc.utils.parserutils.pratt.ParserContext; import bjc.utils.parserutils.pratt.Token; +/** + * A operator that stands for itself. + * + * @author bjculkin + * + * @param <K> + * The key type of the tokens. + * + * @param <V> + * The value type of the tokens. + * + * @param <C> + * The state type of the parser. + */ public class LeafCommand<K, V, C> implements InitialCommand<K, V, C> { @Override - public ITree<Token<K, V>> denote(Token<K, V> operator, ParserContext<K, V, C> ctx) - throws ParserException { - + public ITree<Token<K, V>> denote(Token<K, V> operator, ParserContext<K, V, C> ctx) throws ParserException { return new Tree<>(operator); } }
\ No newline at end of file |
