pub enum Expr {
Num(f64),
V(Ident),
I(Ident),
Bin(ExprOp, Box<Expr>, Box<Expr>),
Call(ExprFunc, Box<Expr>),
}Expand description
A B-source expression: the 3f5 parse tree (INPparseNode,
inpptree.h) as PTparse builds it — no constant folding (only
the derivative trees fold, in dune-core) and every name already
resolved. Built by crate::parse_expr.
Variants§
Num(f64)
PT_CONSTANT: a number or one of the constants e, pi.
V(Ident)
v(node) (PT_VAR of type IF_NODE). v(a,b) is parsed
into v(a) - v(b), as mkfnode does.
I(Ident)
i(vname) (PT_VAR of type IF_INSTANCE): the branch current
of a device with a branch equation (V, E, H, L, a voltage-type
B).
Bin(ExprOp, Box<Expr>, Box<Expr>)
PT_PLUS … PT_POWER.
Call(ExprFunc, Box<Expr>)
PT_FUNCTION (unary minus included, as ExprFunc::Neg).
Implementations§
Trait Implementations§
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Forget for Expr
impl Freeze for Expr
impl Move 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