pub enum WordPart {
Show 14 variants
Literal(CompactString),
SingleQuoted(CompactString),
DoubleQuoted(Vec<WordPart>),
AnsiCQuoted(CompactString),
DollarVar(CompactString),
DollarBrace {
param: CompactString,
operator: Option<CompactString>,
arg: Option<Box<Word>>,
},
ParamExp(Box<ParamExpansion>),
CommandSub(Box<Program>),
ArithSub(CompactString),
Glob(GlobKind),
Tilde(CompactString),
BraceExp(BraceExpansion),
ProcessSub {
kind: ProcessSubKind,
body: Box<Program>,
},
ExtGlob {
op: ExtGlobOp,
pattern: CompactString,
},
}Variants§
Literal(CompactString)
SingleQuoted(CompactString)
DoubleQuoted(Vec<WordPart>)
AnsiCQuoted(CompactString)
$'…' — ANSI-C quoting. Carries the RAW body with escapes still
encoded; frost_expand::expand_ansi_c decodes them.
A distinct variant rather than a pre-decoded SingleQuoted because
the two differ where it matters: this one is the only quoted form
whose value is a function of its text, and keeping the decode on
the expansion side keeps the parser purely syntactic. It behaves like
SingleQuoted everywhere else — one field, no expansion inside, no
splitting or globbing after.
DollarVar(CompactString)
DollarBrace
ParamExp(Box<ParamExpansion>)
Structured parameter expansion — rich ${...} forms.
CommandSub(Box<Program>)
ArithSub(CompactString)
Glob(GlobKind)
Tilde(CompactString)
BraceExp(BraceExpansion)
Brace expansion: {a,b,c} or {1..10}.
ProcessSub
Process substitution: <(cmd) or >(cmd).
ExtGlob
Extended glob: *(pat), +(pat), ?(pat), @(pat), !(pat).
Trait Implementations§
impl StructuralPartialEq for WordPart
Auto Trait Implementations§
impl Freeze for WordPart
impl RefUnwindSafe for WordPart
impl Send for WordPart
impl Sync for WordPart
impl Unpin for WordPart
impl UnsafeUnpin for WordPart
impl UnwindSafe for WordPart
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more