mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 14:27:54 +00:00
implement command root
This commit is contained in:
parent
c1ed7487d7
commit
15ffd16c01
11 changed files with 107 additions and 170 deletions
|
|
@ -36,10 +36,10 @@ pub enum TokenMatchResult {
|
|||
// a: because we want to differentiate between no match and match failure (it matched with an error)
|
||||
// "no match" has a different charecteristic because we want to continue matching other tokens...
|
||||
// ...while "match failure" means we should stop matching and return the error
|
||||
type TryMatchResult = Option<TokenMatchResult>;
|
||||
pub type TryMatchResult = Option<TokenMatchResult>;
|
||||
|
||||
impl Token {
|
||||
pub(super) fn try_match(&self, input: Option<&str>) -> TryMatchResult {
|
||||
pub fn try_match(&self, input: Option<&str>) -> TryMatchResult {
|
||||
let input = match input {
|
||||
Some(input) => input,
|
||||
None => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue