forked from libre-chip/fayalite
add support for #[hdl(sim)] enum_ty.Variant(value) and #[hdl(sim)] EnumTy::Variant(value) and non-sim variants too
This commit is contained in:
parent
9092e45447
commit
c4b6a0fee6
9 changed files with 817 additions and 370 deletions
|
|
@ -380,13 +380,13 @@ impl ToTokens for MatchPatSimple {
|
|||
}
|
||||
}
|
||||
|
||||
struct EnumPath {
|
||||
variant_path: Path,
|
||||
enum_path: Path,
|
||||
variant_name: Ident,
|
||||
pub(crate) struct EnumPath {
|
||||
pub(crate) variant_path: Path,
|
||||
pub(crate) enum_path: Path,
|
||||
pub(crate) variant_name: Ident,
|
||||
}
|
||||
|
||||
fn parse_enum_path(variant_path: TypePath) -> Result<EnumPath, TypePath> {
|
||||
pub(crate) fn parse_enum_path(variant_path: TypePath) -> Result<EnumPath, TypePath> {
|
||||
let TypePath {
|
||||
qself: None,
|
||||
path: variant_path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue