diff --git a/src/subset/helpers.rs b/src/subset/helpers.rs index e4072ae3..fb4deba4 100644 --- a/src/subset/helpers.rs +++ b/src/subset/helpers.rs @@ -211,6 +211,13 @@ impl Expr { Expr::Unop(Unop::Not, Rc::new(exp.into())) } + pub fn new_logical_not(exp: E) -> Expr + where + E: Into, + { + Expr::Unop(Unop::LogNot, Rc::new(exp.into())) + } + pub fn new_slice(var: &str, hi: H, lo: L) -> Expr where H: Into, diff --git a/src/v17/ast.rs b/src/v17/ast.rs index 340f63a3..9ececdd9 100644 --- a/src/v17/ast.rs +++ b/src/v17/ast.rs @@ -16,6 +16,9 @@ pub type Stmt = subset::ast::GenericStmt; pub type Port = subset::ast::GenericPort; pub type Module = subset::ast::GenericModule; pub type ExprConcat = subset::ast::ExprConcat; +pub type Unop = subset::ast::Unop; +pub type Binop = subset::ast::Binop; +pub type Terop = subset::ast::Terop; #[derive(Clone, Debug)] pub enum Ty {