implement command root

This commit is contained in:
dusk 2025-10-07 21:59:26 +00:00
parent c1ed7487d7
commit 15ffd16c01
No known key found for this signature in database
11 changed files with 107 additions and 170 deletions

View file

@ -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 => {