pub enum ExprKind {
Show 197 variants
Integer(i64),
Float(f64),
String(String),
Bareword(String),
Regex(String, String),
QW(Vec<String>),
Undef,
MagicConst(MagicConstKind),
InterpolatedString(Vec<StringPart>),
ScalarVar(String),
ArrayVar(String),
HashVar(String),
ArrayElement {
array: String,
index: Box<Expr>,
},
HashElement {
hash: String,
key: Box<Expr>,
},
ArraySlice {
array: String,
indices: Vec<Expr>,
},
HashSlice {
hash: String,
keys: Vec<Expr>,
},
HashKvSlice {
hash: String,
keys: Vec<Expr>,
},
HashSliceDeref {
container: Box<Expr>,
keys: Vec<Expr>,
},
AnonymousListSlice {
source: Box<Expr>,
indices: Vec<Expr>,
},
ScalarRef(Box<Expr>),
ArrayRef(Vec<Expr>),
HashRef(Vec<(Expr, Expr)>),
CodeRef {
params: Vec<SubSigParam>,
body: Block,
},
SubroutineRef(String),
SubroutineCodeRef(String),
DynamicSubCodeRef(Box<Expr>),
Deref {
expr: Box<Expr>,
kind: Sigil,
},
ArrowDeref {
expr: Box<Expr>,
index: Box<Expr>,
kind: DerefKind,
},
BinOp {
left: Box<Expr>,
op: BinOp,
right: Box<Expr>,
},
UnaryOp {
op: UnaryOp,
expr: Box<Expr>,
},
PostfixOp {
expr: Box<Expr>,
op: PostfixOp,
},
Assign {
target: Box<Expr>,
value: Box<Expr>,
},
CompoundAssign {
target: Box<Expr>,
op: BinOp,
value: Box<Expr>,
},
Ternary {
condition: Box<Expr>,
then_expr: Box<Expr>,
else_expr: Box<Expr>,
},
Repeat {
expr: Box<Expr>,
count: Box<Expr>,
list_repeat: bool,
},
Range {
from: Box<Expr>,
to: Box<Expr>,
exclusive: bool,
step: Option<Box<Expr>>,
},
SliceRange {
from: Option<Box<Expr>>,
to: Option<Box<Expr>>,
step: Option<Box<Expr>>,
},
MyExpr {
keyword: String,
decls: Vec<VarDecl>,
},
FuncCall {
name: String,
args: Vec<Expr>,
},
MethodCall {
object: Box<Expr>,
method: String,
args: Vec<Expr>,
super_call: bool,
},
IndirectCall {
target: Box<Expr>,
args: Vec<Expr>,
ampersand: bool,
pass_caller_arglist: bool,
},
Typeglob(String),
TypeglobExpr(Box<Expr>),
Print {
handle: Option<String>,
args: Vec<Expr>,
},
Say {
handle: Option<String>,
args: Vec<Expr>,
},
Printf {
handle: Option<String>,
args: Vec<Expr>,
},
Die(Vec<Expr>),
Warn(Vec<Expr>),
Match {
expr: Box<Expr>,
pattern: String,
flags: String,
scalar_g: bool,
delim: char,
},
Substitution {
expr: Box<Expr>,
pattern: String,
replacement: String,
flags: String,
delim: char,
},
Transliterate {
expr: Box<Expr>,
from: String,
to: String,
flags: String,
delim: char,
},
MapExpr {
block: Block,
list: Box<Expr>,
flatten_array_refs: bool,
stream: bool,
},
MapExprComma {
expr: Box<Expr>,
list: Box<Expr>,
flatten_array_refs: bool,
stream: bool,
},
GrepExpr {
block: Block,
list: Box<Expr>,
keyword: GrepBuiltinKeyword,
},
GrepExprComma {
expr: Box<Expr>,
list: Box<Expr>,
keyword: GrepBuiltinKeyword,
},
SortExpr {
cmp: Option<SortComparator>,
list: Box<Expr>,
},
ReverseExpr(Box<Expr>),
Rev(Box<Expr>),
JoinExpr {
separator: Box<Expr>,
list: Box<Expr>,
},
SplitExpr {
pattern: Box<Expr>,
string: Box<Expr>,
limit: Option<Box<Expr>>,
},
ForEachExpr {
block: Block,
list: Box<Expr>,
},
PMapExpr {
block: Block,
list: Box<Expr>,
progress: Option<Box<Expr>>,
flat_outputs: bool,
on_cluster: Option<Box<Expr>>,
stream: bool,
},
PMapChunkedExpr {
chunk_size: Box<Expr>,
block: Block,
list: Box<Expr>,
progress: Option<Box<Expr>>,
},
PGrepExpr {
block: Block,
list: Box<Expr>,
progress: Option<Box<Expr>>,
stream: bool,
},
PForExpr {
block: Block,
list: Box<Expr>,
progress: Option<Box<Expr>>,
},
ParExpr {
block: Block,
list: Box<Expr>,
},
ParReduceExpr {
extract_block: Block,
reduce_block: Option<Block>,
list: Box<Expr>,
},
DistReduceExpr {
cluster: Box<Expr>,
extract_block: Block,
list: Box<Expr>,
},
ParLinesExpr {
path: Box<Expr>,
callback: Box<Expr>,
progress: Option<Box<Expr>>,
},
ParWalkExpr {
path: Box<Expr>,
callback: Box<Expr>,
progress: Option<Box<Expr>>,
},
PwatchExpr {
path: Box<Expr>,
callback: Box<Expr>,
},
PSortExpr {
cmp: Option<Block>,
list: Box<Expr>,
progress: Option<Box<Expr>>,
},
ReduceExpr {
block: Block,
list: Box<Expr>,
},
PReduceExpr {
block: Block,
list: Box<Expr>,
progress: Option<Box<Expr>>,
},
PReduceInitExpr {
init: Box<Expr>,
block: Block,
list: Box<Expr>,
progress: Option<Box<Expr>>,
},
PMapReduceExpr {
map_block: Block,
reduce_block: Block,
list: Box<Expr>,
progress: Option<Box<Expr>>,
},
PcacheExpr {
block: Block,
list: Box<Expr>,
progress: Option<Box<Expr>>,
},
PselectExpr {
receivers: Vec<Expr>,
timeout: Option<Box<Expr>>,
},
FanExpr {
count: Option<Box<Expr>>,
block: Block,
progress: Option<Box<Expr>>,
capture: bool,
},
AsyncBlock {
body: Block,
},
SpawnBlock {
body: Block,
},
Trace {
body: Block,
},
Timer {
body: Block,
},
Bench {
body: Block,
times: Box<Expr>,
},
Spinner {
message: Box<Expr>,
body: Block,
},
Await(Box<Expr>),
Slurp(Box<Expr>),
Swallow(Box<Expr>),
Burp(Box<Expr>),
God(Box<Expr>),
Ingest(Box<Expr>),
Capture(Box<Expr>),
Qx(Box<Expr>),
FetchUrl(Box<Expr>),
Pchannel {
capacity: Option<Box<Expr>>,
},
Push {
array: Box<Expr>,
values: Vec<Expr>,
},
Pop(Box<Expr>),
Shift(Box<Expr>),
Unshift {
array: Box<Expr>,
values: Vec<Expr>,
},
Splice {
array: Box<Expr>,
offset: Option<Box<Expr>>,
length: Option<Box<Expr>>,
replacement: Vec<Expr>,
},
Delete(Box<Expr>),
Exists(Box<Expr>),
Keys(Box<Expr>),
Values(Box<Expr>),
Each(Box<Expr>),
Chomp(Box<Expr>),
Chop(Box<Expr>),
Length(Box<Expr>),
Substr {
string: Box<Expr>,
offset: Box<Expr>,
length: Option<Box<Expr>>,
replacement: Option<Box<Expr>>,
},
Index {
string: Box<Expr>,
substr: Box<Expr>,
position: Option<Box<Expr>>,
},
Rindex {
string: Box<Expr>,
substr: Box<Expr>,
position: Option<Box<Expr>>,
},
Sprintf {
format: Box<Expr>,
args: Vec<Expr>,
},
Abs(Box<Expr>),
Int(Box<Expr>),
Sqrt(Box<Expr>),
Sin(Box<Expr>),
Cos(Box<Expr>),
Atan2 {
y: Box<Expr>,
x: Box<Expr>,
},
Exp(Box<Expr>),
Log(Box<Expr>),
Rand(Option<Box<Expr>>),
Srand(Option<Box<Expr>>),
Hex(Box<Expr>),
Oct(Box<Expr>),
Lc(Box<Expr>),
Uc(Box<Expr>),
Lcfirst(Box<Expr>),
Ucfirst(Box<Expr>),
Fc(Box<Expr>),
Quotemeta(Box<Expr>),
Crypt {
plaintext: Box<Expr>,
salt: Box<Expr>,
},
Pos(Option<Box<Expr>>),
Study(Box<Expr>),
Defined(Box<Expr>),
Ref(Box<Expr>),
ScalarContext(Box<Expr>),
Chr(Box<Expr>),
Ord(Box<Expr>),
OpenMyHandle {
name: String,
},
Open {
handle: Box<Expr>,
mode: Box<Expr>,
file: Option<Box<Expr>>,
},
Close(Box<Expr>),
ReadLine(Option<String>),
Eof(Option<Box<Expr>>),
OpendirMyHandle {
name: String,
},
Opendir {
handle: Box<Expr>,
path: Box<Expr>,
},
Readdir(Box<Expr>),
Closedir(Box<Expr>),
Rewinddir(Box<Expr>),
Telldir(Box<Expr>),
Seekdir {
handle: Box<Expr>,
position: Box<Expr>,
},
FileTest {
op: char,
expr: Box<Expr>,
},
System(Vec<Expr>),
Exec(Vec<Expr>),
Eval(Box<Expr>),
Do(Box<Expr>),
Require(Box<Expr>),
Exit(Option<Box<Expr>>),
Chdir(Box<Expr>),
Mkdir {
path: Box<Expr>,
mode: Option<Box<Expr>>,
},
Unlink(Vec<Expr>),
Rename {
old: Box<Expr>,
new: Box<Expr>,
},
Chmod(Vec<Expr>),
Chown(Vec<Expr>),
Stat(Box<Expr>),
Lstat(Box<Expr>),
Link {
old: Box<Expr>,
new: Box<Expr>,
},
Symlink {
old: Box<Expr>,
new: Box<Expr>,
},
Readlink(Box<Expr>),
Files(Vec<Expr>),
Filesf(Vec<Expr>),
FilesfRecursive(Vec<Expr>),
Dirs(Vec<Expr>),
DirsRecursive(Vec<Expr>),
SymLinks(Vec<Expr>),
Sockets(Vec<Expr>),
Pipes(Vec<Expr>),
BlockDevices(Vec<Expr>),
CharDevices(Vec<Expr>),
Executables(Vec<Expr>),
Glob(Vec<Expr>),
GlobPar {
args: Vec<Expr>,
progress: Option<Box<Expr>>,
},
ParSed {
args: Vec<Expr>,
progress: Option<Box<Expr>>,
},
Bless {
ref_expr: Box<Expr>,
class: Option<Box<Expr>>,
},
Caller(Option<Box<Expr>>),
Wantarray,
List(Vec<Expr>),
PostfixIf {
expr: Box<Expr>,
condition: Box<Expr>,
},
PostfixUnless {
expr: Box<Expr>,
condition: Box<Expr>,
},
PostfixWhile {
expr: Box<Expr>,
condition: Box<Expr>,
},
PostfixUntil {
expr: Box<Expr>,
condition: Box<Expr>,
},
PostfixForeach {
expr: Box<Expr>,
list: Box<Expr>,
},
RetryBlock {
body: Block,
times: Box<Expr>,
backoff: RetryBackoff,
},
RateLimitBlock {
slot: u32,
max: Box<Expr>,
window: Box<Expr>,
body: Block,
},
EveryBlock {
interval: Box<Expr>,
body: Block,
},
GenBlock {
body: Block,
},
Yield(Box<Expr>),
AlgebraicMatch {
subject: Box<Expr>,
arms: Vec<MatchArm>,
},
}Expand description
ExprKind — see variants.
Variants§
Integer(i64)
Integer variant.
Float(f64)
Float variant.
String(String)
String variant.
Bareword(String)
Unquoted identifier used as an expression term (if (FOO)), distinct from quoted 'FOO' / "FOO".
Resolved at runtime: nullary subroutine if defined, otherwise stringifies like Perl barewords.
Regex(String, String)
Regex variant.
QW(Vec<String>)
QW variant.
Undef
Undef variant.
MagicConst(MagicConstKind)
__FILE__ / __LINE__ (Perl compile-time literals).
InterpolatedString(Vec<StringPart>)
InterpolatedString variant.
ScalarVar(String)
ScalarVar variant.
ArrayVar(String)
ArrayVar variant.
HashVar(String)
HashVar variant.
ArrayElement
ArrayElement variant.
HashElement
HashElement variant.
ArraySlice
ArraySlice variant.
HashSlice
HashSlice variant.
HashKvSlice
%h{KEYS} — Perl 5.20+ key-value slice: returns a flat list of
(key, value, key, value, …) pairs instead of just values. (BUG-008)
HashSliceDeref
@$container{keys} — hash slice when the hash is reached via a scalar ref (Perl @$href{k1,k2}).
AnonymousListSlice
(LIST)[i,...] / (sort ...)[0] — subscript after a non-arrow container (not $a[i] / $r->[i]).
ScalarRef(Box<Expr>)
ScalarRef variant.
ArrayRef(Vec<Expr>)
ArrayRef variant.
HashRef(Vec<(Expr, Expr)>)
CodeRef
CodeRef variant.
SubroutineRef(String)
Unary &name — invoke subroutine name (Perl &foo / &Foo::bar).
SubroutineCodeRef(String)
\&name — coderef to an existing named subroutine (Perl \&foo).
DynamicSubCodeRef(Box<Expr>)
\&{ EXPR } — coderef to a subroutine whose name is given by EXPR (string or expression).
Deref
Deref variant.
ArrowDeref
ArrowDeref variant.
BinOp
BinOp variant.
UnaryOp
UnaryOp variant.
PostfixOp
PostfixOp variant.
Assign
Assign variant.
CompoundAssign
CompoundAssign variant.
Ternary
Ternary variant.
Repeat
Repeat variant.
Range
Range variant.
SliceRange
Slice subscript range with optional endpoints — Python-style [start:stop:step].
Only emitted by the parser inside @arr[...] / @h{...} (and arrow-deref forms).
Open-ended forms: [::-1] (reverse), [:N], [N:], [::M], [N::M].
Compiler dispatches to typed integer-strict (array) or stringify-all (hash) ops.
MyExpr
my $x = EXPR (or our / state / local) used as an expression —
e.g. inside if (my $line = readline) / while (my $x = next()).
Evaluation: declare each var in the current scope, evaluate the initializer
(or default to undef), then return the assigned value(s).
Distinct from StmtKind::My which only appears at statement level.
var $x = EXPR and val $x = EXPR (Kotlin/Scala-style aliases for
my and const my) reach this node via parser-level normalization
— parse_primary rewrites raw_kw to "my" and threads the
mark_frozen bit through VarDecl::frozen on each decl. The
keyword field below therefore only ever holds the post-normalized
spelling; "var"/"val" do not appear at the AST layer.
FuncCall
FuncCall variant.
MethodCall
MethodCall variant.
Fields
IndirectCall
Call through a coderef or invokable scalar: $cr->(...) is [MethodCall]; this is
$coderef(...) or &$coderef(...) (the latter sets ampersand).
Fields
Typeglob(String)
Limited typeglob: *FOO → handle name FOO for open / I/O.
TypeglobExpr(Box<Expr>)
*{ EXPR } — typeglob slot by dynamic name (e.g. *{$pkg . '::import'}).
Print variant.
Say
Say variant.
Printf
Printf variant.
Die(Vec<Expr>)
Die variant.
Warn(Vec<Expr>)
Warn variant.
Match
Match variant.
Fields
Substitution
Substitution variant.
Transliterate
Transliterate variant.
MapExpr
MapExpr variant.
Fields
MapExprComma
map EXPR, LIST — EXPR is evaluated in list context with $_ set to each element.
GrepExpr
GrepExpr variant.
GrepExprComma
grep EXPR, LIST — EXPR is evaluated with $_ set to each element (Perl list vs scalar context).
SortExpr
sort BLOCK LIST, sort SUB LIST, or sort $coderef LIST (Perl uses $a/$b in the comparator).
ReverseExpr(Box<Expr>)
ReverseExpr variant.
Rev(Box<Expr>)
rev EXPR — always string-reverse (scalar reverse), stryke extension.
JoinExpr
JoinExpr variant.
SplitExpr
SplitExpr variant.
ForEachExpr
each { BLOCK } @list — execute BLOCK for each element
with $_ aliased; void context (returns count in scalar context).
PMapExpr
PMapExpr variant.
Fields
progress: Option<Box<Expr>>pmap { } @list, progress => EXPR — when truthy, print a progress bar on stderr.
flat_outputs: boolpflat_map { } — flatten each block result like ExprKind::MapExpr (arrays expand);
parallel output is stitched in input order (unlike plain pmap, which is unordered).
PMapChunkedExpr
pmap_chunked N { BLOCK } @list [, progress => EXPR] — parallel map in batches of N.
PGrepExpr
PGrepExpr variant.
Fields
PForExpr
pfor { BLOCK } @list [, progress => EXPR] — stderr progress bar when truthy.
ParExpr
par { BLOCK } INPUT — generic parallel-chunk wrapper. Splits INPUT
(string → UTF-8-aligned byte chunks; array/list → element-chunks)
into N pieces (N = available rayon threads), evaluates BLOCK per
chunk in parallel with $_ bound to the chunk, then concatenates
results. Lets any whole-input op (letters, chars, uc, freq,
regex //g, etc.) parallelize without needing a pX variant.
ParReduceExpr
par_reduce { extract } [ { merge } ] INPUT — chunk-extract-merge.
Same chunker as par {}, but each chunk’s result is reduced
pairwise across chunks instead of concatenated.
- One block: auto-merger picks based on result type (number →
+,hash<num>→ key-wise+, array → concat, string → concat). - Two blocks: explicit pairwise reducer with
$a/$b.
DistReduceExpr
Distributed counterpart of ExprKind::ParReduceExpr. Same chunk-block
semantics (stages operate on @_) but chunks ship to a RemoteCluster
of SSH workers via the existing cluster::run_cluster dispatcher.
Built by ~d> on $cluster SOURCE stage1 stage2 ....
ParLinesExpr
par_lines PATH, fn { ... } [, progress => EXPR] — optional stderr progress (per line).
ParWalkExpr
par_walk PATH, fn { ... } [, progress => EXPR] — parallel recursive directory walk; $_ is each path.
PwatchExpr
pwatch GLOB, fn { ... } — notify-based watcher (evaluated by interpreter).
PSortExpr
psort { } @list [, progress => EXPR] — stderr progress when truthy (start/end phases).
ReduceExpr
reduce { $a + $b } @list — sequential left fold over the list.
$a is the accumulator; $b is the next list element.
PReduceExpr
preduce { $a + $b } @list — parallel fold/reduce using rayon.
$a and $b are set to the accumulator and current element.
Fields
PReduceInitExpr
preduce_init EXPR, { $a / $b } @list — parallel fold with explicit identity.
Each chunk starts from a clone of EXPR; partials are merged (hash maps add counts per key;
other types use the same block with $a / $b as partial accumulators). $a is the
accumulator, $b is the next list element; @_ is ($a, $b) for my ($acc, $item) = @_.
PMapReduceExpr
pmap_reduce { map } { reduce } @list — fused parallel map + tree reduce (no full mapped array).
PcacheExpr
pcache { BLOCK } @list [, progress => EXPR] — stderr progress bar when truthy.
PselectExpr
pselect($rx1, $rx2, ...) — optional timeout => SECS for bounded wait.
FanExpr
fan [COUNT] { BLOCK } — execute BLOCK COUNT times in parallel (default COUNT = rayon pool size).
fan_cap [COUNT] { BLOCK } — same, but return value is a list of each block’s return value (index order).
$_ is set to the iteration index (0..COUNT-1).
Optional , progress => EXPR — stderr progress bar (like pmap).
AsyncBlock
async { BLOCK } — run BLOCK on a worker thread; returns a task handle.
SpawnBlock
spawn { BLOCK } — same as ExprKind::AsyncBlock (Rust thread::spawn–style naming); join with await.
Trace
trace { BLOCK } — print mysync scalar mutations to stderr (for parallel debugging).
Timer
timer { BLOCK } — run BLOCK and return elapsed wall time in milliseconds (float).
Bench
bench { BLOCK } N — run BLOCK N times (warmup + min/mean/p99 wall time, ms).
Spinner
spinner "msg" { BLOCK } — animated spinner on stderr while block runs.
Await(Box<Expr>)
await EXPR — join an async task, or return EXPR unchanged.
Slurp(Box<Expr>)
Read entire file as UTF-8 (slurp $path).
Swallow(Box<Expr>)
swallow PATTERN — expand a zsh-style glob and return a hash
{ canonicalized_abspath => raw_bytes }. Per-file body never decodes,
so binary files round-trip cleanly. Hard-fails on non-regular matches
the same way slurp does; opt out with the (N) null-glob qualifier.
Burp(Box<Expr>)
burp HASH — inverse of swallow. Take a hash { path => bytes },
write each entry to disk (creates parent directories automatically),
and return the number of files written. Hard-fails on the first I/O
error. Accepts plain hashes and hash refs; values may be bytes or any
scalar that stringifies (matches spew/spurt conventions).
God(Box<Expr>)
god EXPR — omniscient runtime introspection. Returns a structured
multi-line dump showing the type tag, heap pointer, Arc strong/weak
counts, byte hex previews, generator/pipeline state, and closure
captures. Cycle-safe via per-pointer recursion tracking. Sibling to
pp (human-friendly) and ddump (deep structure).
Ingest(Box<Expr>)
ingest PATTERN — streaming variant of swallow: returns a lazy
iterator yielding [canonicalized_abspath, raw_bytes] per file. Only
one file’s bytes are resident at a time. Path list and stat/canonicalize
are eager (full zsh qualifier support); file reads are lazy. Hard-fails
on non-regular matches up-front, matching slurp/swallow policy.
Capture(Box<Expr>)
Run shell command and return structured output (capture "cmd").
Qx(Box<Expr>)
`cmd` / qx{cmd} — run via sh -c, return stdout as a string (Perl); updates $?.
FetchUrl(Box<Expr>)
Blocking HTTP GET (fetch_url $url).
Pchannel
pchannel() — unbounded; pchannel(N) — bounded capacity N.
Push
Push variant.
Pop(Box<Expr>)
Pop variant.
Shift(Box<Expr>)
Shift variant.
Unshift
Unshift variant.
Splice
Splice variant.
Delete(Box<Expr>)
Delete variant.
Exists(Box<Expr>)
Exists variant.
Keys(Box<Expr>)
Keys variant.
Values(Box<Expr>)
Values variant.
Each(Box<Expr>)
Each variant.
Chomp(Box<Expr>)
Chomp variant.
Chop(Box<Expr>)
Chop variant.
Length(Box<Expr>)
Length variant.
Substr
Substr variant.
Index
Index variant.
Rindex
Rindex variant.
Sprintf
Sprintf variant.
Abs(Box<Expr>)
Abs variant.
Int(Box<Expr>)
Int variant.
Sqrt(Box<Expr>)
Sqrt variant.
Sin(Box<Expr>)
Sin variant.
Cos(Box<Expr>)
Cos variant.
Atan2
Atan2 variant.
Exp(Box<Expr>)
Exp variant.
Log(Box<Expr>)
Log variant.
Rand(Option<Box<Expr>>)
rand with optional upper bound (none = Perl default 1.0).
Srand(Option<Box<Expr>>)
srand with optional seed (none = time-based).
Hex(Box<Expr>)
Hex variant.
Oct(Box<Expr>)
Oct variant.
Lc(Box<Expr>)
Lc variant.
Uc(Box<Expr>)
Uc variant.
Lcfirst(Box<Expr>)
Lcfirst variant.
Ucfirst(Box<Expr>)
Ucfirst variant.
Fc(Box<Expr>)
Unicode case fold (Perl fc).
Quotemeta(Box<Expr>)
Regex-escape a string (Perl quotemeta, aliased qm). Lowers to
Op::CallBuiltin(BuiltinId::Quotemeta, 1) for JIT lowering.
Crypt
DES-style crypt (see libc crypt(3) on Unix; empty on other targets).
Pos(Option<Box<Expr>>)
pos — optional scalar lvalue target (None = $_).
Study(Box<Expr>)
study — hint for repeated matching; returns byte length of the string.
Defined(Box<Expr>)
Defined variant.
Ref(Box<Expr>)
Ref variant.
ScalarContext(Box<Expr>)
ScalarContext variant.
Chr(Box<Expr>)
Chr variant.
Ord(Box<Expr>)
Ord variant.
OpenMyHandle
open my $fh — only valid as ExprKind::Open::handle; declares $fh and binds the handle.
Open
Open variant.
Close(Box<Expr>)
Close variant.
ReadLine(Option<String>)
ReadLine variant.
Eof(Option<Box<Expr>>)
Eof variant.
OpendirMyHandle
opendir my $dh — only valid as ExprKind::Opendir::handle; declares $dh and binds the handle.
Opendir
Opendir variant.
Readdir(Box<Expr>)
Readdir variant.
Closedir(Box<Expr>)
Closedir variant.
Rewinddir(Box<Expr>)
Rewinddir variant.
Telldir(Box<Expr>)
Telldir variant.
Seekdir
Seekdir variant.
FileTest
FileTest variant.
System(Vec<Expr>)
System variant.
Exec(Vec<Expr>)
Exec variant.
Eval(Box<Expr>)
Eval variant.
Do(Box<Expr>)
Do variant.
Require(Box<Expr>)
Require variant.
Exit(Option<Box<Expr>>)
Exit variant.
Chdir(Box<Expr>)
Chdir variant.
Mkdir
Mkdir variant.
Unlink(Vec<Expr>)
Unlink variant.
Rename
Rename variant.
Chmod(Vec<Expr>)
chmod MODE, @files — first expr is mode, rest are paths.
Chown(Vec<Expr>)
chown UID, GID, @files — first two are uid/gid, rest are paths.
Stat(Box<Expr>)
Stat variant.
Lstat(Box<Expr>)
Lstat variant.
Link
Link variant.
Symlink
Symlink variant.
Readlink(Box<Expr>)
Readlink variant.
Files(Vec<Expr>)
files / files DIR — list file names in a directory (default: .).
Filesf(Vec<Expr>)
filesf / filesf DIR / f — list only regular file names in a directory (default: .).
FilesfRecursive(Vec<Expr>)
fr DIR — list only regular file names recursively (default: .).
Dirs(Vec<Expr>)
dirs / dirs DIR / d — list subdirectory names in a directory (default: .).
DirsRecursive(Vec<Expr>)
dr DIR — list subdirectory paths recursively (default: .).
SymLinks(Vec<Expr>)
sym_links / sym_links DIR — list symlink names in a directory (default: .).
Sockets(Vec<Expr>)
sockets / sockets DIR — list Unix socket names in a directory (default: .).
Pipes(Vec<Expr>)
pipes / pipes DIR — list named-pipe (FIFO) names in a directory (default: .).
BlockDevices(Vec<Expr>)
block_devices / block_devices DIR — list block device names in a directory (default: .).
CharDevices(Vec<Expr>)
char_devices / char_devices DIR — list character device names in a directory (default: .).
Executables(Vec<Expr>)
exe / exe DIR — list executable file names in a directory (default: .).
Glob(Vec<Expr>)
Glob variant.
GlobPar
Parallel recursive glob (rayon); same patterns as glob, different walk strategy.
Optional , progress => EXPR — stderr progress bar (one tick per pattern).
ParSed
par_sed PATTERN, REPLACEMENT, FILES... [, progress => EXPR] — parallel in-place regex replace per file (g semantics).
Bless
Bless variant.
Caller(Option<Box<Expr>>)
Caller variant.
Wantarray
Wantarray variant.
List(Vec<Expr>)
List variant.
PostfixIf
PostfixIf variant.
PostfixUnless
PostfixUnless variant.
PostfixWhile
PostfixWhile variant.
PostfixUntil
PostfixUntil variant.
PostfixForeach
PostfixForeach variant.
RetryBlock
retry { BLOCK } times => N [, backoff => linear|exponential|none] — re-run block until success or attempts exhausted.
RateLimitBlock
rate_limit(MAX, WINDOW) { BLOCK } — sliding window: at most MAX runs per WINDOW (e.g. "1s").
slot is assigned at parse time for per-site state in the interpreter.
EveryBlock
every(INTERVAL) { BLOCK } — repeat BLOCK forever with sleep (INTERVAL like "5s" or seconds).
GenBlock
gen { ... yield ... } — lazy generator; call ->next for each value.
Yield(Box<Expr>)
yield EXPR — only valid inside gen { } (and propagates through control flow).
AlgebraicMatch
match (EXPR) { PATTERN => EXPR, ... } — first matching arm; bindings scoped to the arm body.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ExprKind
impl<'de> Deserialize<'de> for ExprKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ExprKind
impl RefUnwindSafe for ExprKind
impl Send for ExprKind
impl Sync for ExprKind
impl Unpin for ExprKind
impl UnsafeUnpin for ExprKind
impl UnwindSafe for ExprKind
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.