mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 08:11:15 -03:00
Implement printf formatting for some parser types
This commit is contained in:
@@ -322,6 +322,12 @@ fn from(keyword: ParseKeyword) -> Self {
|
||||
}
|
||||
}
|
||||
|
||||
impl printf_compat::args::ToArg<'static> for ParseKeyword {
|
||||
fn to_arg(self) -> printf_compat::args::Arg<'static> {
|
||||
printf_compat::args::Arg::Str(self.into())
|
||||
}
|
||||
}
|
||||
|
||||
fn keyword_description(keyword: ParseKeyword) -> wcharz_t {
|
||||
let s: &'static wstr = keyword.into();
|
||||
wcharz!(s)
|
||||
|
||||
@@ -258,6 +258,12 @@ fn from(err: TokenizerError) -> Self {
|
||||
}
|
||||
}
|
||||
|
||||
impl printf_compat::args::ToArg<'static> for TokenizerError {
|
||||
fn to_arg(self) -> printf_compat::args::Arg<'static> {
|
||||
printf_compat::args::Arg::Str(self.into())
|
||||
}
|
||||
}
|
||||
|
||||
impl Tok {
|
||||
fn new(r#type: TokenType) -> Tok {
|
||||
Tok {
|
||||
|
||||
Reference in New Issue
Block a user