pub enum Expr {
Show 14 variants
TritLiteral(i8),
IntLiteral(i64),
StringLiteral(String),
Ident(String),
BinaryOp {
op: BinOp,
lhs: Box<Expr>,
rhs: Box<Expr>,
},
UnaryOp {
op: UnOp,
expr: Box<Expr>,
},
Call {
callee: String,
args: Vec<Expr>,
},
FieldAccess {
object: Box<Expr>,
field: String,
},
Cast {
expr: Box<Expr>,
ty: Type,
},
Spawn {
agent_name: String,
node_addr: Option<String>,
},
Await {
target: Box<Expr>,
},
Index {
object: Box<Expr>,
row: Box<Expr>,
col: Box<Expr>,
},
NodeId,
Propagate {
expr: Box<Expr>,
},
}Variants§
TritLiteral(i8)
IntLiteral(i64)
StringLiteral(String)
Ident(String)
BinaryOp
UnaryOp
Call
FieldAccess
field access: object.field
Cast
cast(expr) — type coercion built-in
Spawn
spawn AgentName — creates a local agent instance, evaluates to AgentRef spawn remote “addr” AgentName — creates a remote agent instance (Phase 5.1)
Await
await <agentref_expr> — receive result from agent mailbox
Index
tensor[row, col] indexing (Phase 4.1)
NodeId
nodeid — returns the current node’s address (Phase 5.1)
Propagate
expr? — ternary error propagation. If the inner expression evaluates to -1 (conflict), the current function returns -1 immediately. Otherwise execution continues with the value.
Trait Implementations§
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
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