pub enum Expr {
Lit(Literal),
Var {
name: String<32>,
paradigms: ParadigmSet,
},
Unary {
op: SemanticClass,
operand: AstNode,
paradigms: ParadigmSet,
},
Binary {
op: SemanticClass,
left: AstNode,
right: AstNode,
paradigms: ParadigmSet,
},
Ternary {
op: SemanticClass,
first: AstNode,
second: AstNode,
third: AstNode,
paradigms: ParadigmSet,
},
Quantified {
quantifier: SemanticClass,
variable: String<32>,
body: AstNode,
paradigms: ParadigmSet,
},
Apply {
op: SemanticClass,
agent: String<16>,
body: AstNode,
paradigms: ParadigmSet,
},
DeonticStatement {
modality: SemanticClass,
agent: String<16>,
action: String<32>,
deadline_ns: Option<u64>,
source: Option<String<64>>,
paradigms: ParadigmSet,
},
TemporalConstraint {
op: SemanticClass,
body: AstNode,
bound_ns: Option<u64>,
paradigms: ParadigmSet,
},
}Expand description
A node in the multi-paradigm AST.
The tree mixes paradigms freely: a Deontic Obligatory node can contain
a Temporal Globally subtree. The cross-validation stage checks that such
mixtures are coherent.
Variants§
Lit(Literal)
Var
Unary
Binary
Ternary
Quantified
Apply
DeonticStatement
TemporalConstraint
Implementations§
Trait Implementations§
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