Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-exported private enums #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/subset/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ impl Expr {
Expr::Unop(Unop::Not, Rc::new(exp.into()))
}

pub fn new_logical_not<E>(exp: E) -> Expr
where
E: Into<Expr>,
{
Expr::Unop(Unop::LogNot, Rc::new(exp.into()))
}

pub fn new_slice<H, L>(var: &str, hi: H, lo: L) -> Expr
where
H: Into<Expr>,
Expand Down
3 changes: 3 additions & 0 deletions src/v17/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ pub type Stmt = subset::ast::GenericStmt<Decl, Parallel>;
pub type Port = subset::ast::GenericPort<Decl>;
pub type Module = subset::ast::GenericModule<Decl, Parallel>;
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 {
Expand Down