Add preprocessor

This commit is contained in:
dalance 2019-09-05 10:31:56 +09:00
parent 6cd5d30e66
commit e1d80ab007
83 changed files with 1548 additions and 1263 deletions

View File

@ -67,6 +67,38 @@ fn impl_node(ast: &DeriveInput) -> TokenStream {
} }
} }
impl<'a> From<&'a #name> for RefNode<'a> {
fn from(x: &'a #name) -> Self {
RefNode::#name(x)
}
}
impl core::convert::TryFrom<#name> for Locate {
type Error = ();
fn try_from(x: #name) -> Result<Self, Self::Error> {
Self::try_from(&x)
}
}
impl<'a> core::convert::TryFrom<&'a #name> for Locate {
type Error = ();
fn try_from(x: &'a #name) -> Result<Self, Self::Error> {
let mut locate: Option<Locate> = None;
for x in x {
match x {
RefNode::Locate(x) => if let Some(loc) = locate {
assert_eq!(x.offset, loc.offset + loc.len);
locate = Some(Locate { offset: loc.offset, line: loc.line, len: loc.len + x.len });
} else {
locate = Some(*x);
},
_ => (),
}
}
locate.ok_or(())
}
}
impl<'a> IntoIterator for &'a #name { impl<'a> IntoIterator for &'a #name {
type Item = RefNode<'a>; type Item = RefNode<'a>;
type IntoIter = Iter<'a>; type IntoIter = Iter<'a>;

View File

@ -137,7 +137,9 @@ pub(crate) fn angle_bracket_literal_impl(s: Span) -> IResult<Span, Locate> {
pub(crate) fn text_macro_definition(s: Span) -> IResult<Span, TextMacroDefinition> { pub(crate) fn text_macro_definition(s: Span) -> IResult<Span, TextMacroDefinition> {
let (s, a) = symbol("`")(s)?; let (s, a) = symbol("`")(s)?;
let (s, b) = keyword("define")(s)?; let (s, b) = keyword("define")(s)?;
begin_lb_not_space();
let (s, c) = text_macro_name(s)?; let (s, c) = text_macro_name(s)?;
end_lb_not_space();
let (s, d) = opt(macro_text)(s)?; let (s, d) = opt(macro_text)(s)?;
Ok(( Ok((
s, s,

View File

@ -302,6 +302,18 @@ mod unit {
Ok((_, _)) Ok((_, _))
); );
test!(text_macro_definition, r##"`define a"##, Ok((_, _))); test!(text_macro_definition, r##"`define a"##, Ok((_, _)));
test!(
source_text,
r##"module test(out);
`define nest_two
`ifdef wow
initial $display("wow is defined");
`else
initial $display("wow is not defined");
`endif
endmodule"##,
Ok((_, _))
);
} }
} }

View File

@ -258,18 +258,14 @@ where
pub(crate) fn white_space(s: Span) -> IResult<Span, WhiteSpace> { pub(crate) fn white_space(s: Span) -> IResult<Span, WhiteSpace> {
if in_directive() { if in_directive() {
alt(( alt((
map(multispace1, |x: Span| { map(space, |x: Span| WhiteSpace::Space(Box::new(into_locate(x)))),
WhiteSpace::Space(Box::new(into_locate(x)))
}),
map(preceded(peek(char('/')), comment), |x| { map(preceded(peek(char('/')), comment), |x| {
WhiteSpace::Comment(Box::new(x)) WhiteSpace::Comment(Box::new(x))
}), }),
))(s) ))(s)
} else { } else {
alt(( alt((
map(multispace1, |x: Span| { map(space, |x: Span| WhiteSpace::Space(Box::new(into_locate(x)))),
WhiteSpace::Space(Box::new(into_locate(x)))
}),
map(preceded(peek(char('/')), comment), |x| { map(preceded(peek(char('/')), comment), |x| {
WhiteSpace::Comment(Box::new(x)) WhiteSpace::Comment(Box::new(x))
}), }),
@ -280,6 +276,14 @@ pub(crate) fn white_space(s: Span) -> IResult<Span, WhiteSpace> {
} }
} }
pub(crate) fn space(s: Span) -> IResult<Span, Span> {
if lb_not_space() {
space1(s)
} else {
multispace1(s)
}
}
thread_local!( thread_local!(
static IN_DIRECTIVE: core::cell::RefCell<Vec<()>> = { static IN_DIRECTIVE: core::cell::RefCell<Vec<()>> = {
core::cell::RefCell::new(Vec::new()) core::cell::RefCell::new(Vec::new())
@ -301,6 +305,27 @@ pub(crate) fn end_directive() {
IN_DIRECTIVE.with(|x| x.borrow_mut().pop()); IN_DIRECTIVE.with(|x| x.borrow_mut().pop());
} }
thread_local!(
static LB_NOT_SPACE: core::cell::RefCell<Vec<()>> = {
core::cell::RefCell::new(Vec::new())
}
);
pub(crate) fn lb_not_space() -> bool {
LB_NOT_SPACE.with(|x| match x.borrow().last() {
Some(_) => true,
None => false,
})
}
pub(crate) fn begin_lb_not_space() {
LB_NOT_SPACE.with(|x| x.borrow_mut().push(()));
}
pub(crate) fn end_lb_not_space() {
LB_NOT_SPACE.with(|x| x.borrow_mut().pop());
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Copy)] #[derive(Clone, Copy)]

View File

@ -4,10 +4,11 @@ version = "0.1.0"
authors = ["dalance <dalance@gmail.com>"] authors = ["dalance <dalance@gmail.com>"]
edition = "2018" edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features]
default = []
trace = ["sv-parser-parser/trace"]
[dependencies] [dependencies]
nom = "5.0.0" nom = "5.0.0"
nom_locate = "1.0.0" sv-parser-parser = { path = "../sv-parser-parser" }
nom-tracable = "0.3.1" sv-parser-syntaxtree = { path = "../sv-parser-syntaxtree" }
str-concat = "0.1.4"

View File

@ -1,7 +1,154 @@
use std::collections::HashMap;
use std::convert::TryInto;
use sv_parser_parser::{pp_parser, Span, SpanInfo};
use sv_parser_syntaxtree::{Locate, NodeEvent, RefNode};
pub fn preprocessor(s: &str) -> String {
let mut ret = String::new();
let pp_text = pp_parser(Span::new_extra(s, SpanInfo::default()));
let mut skip = false;
let mut skip_nodes = vec![];
let mut defines = HashMap::new();
if let Ok((_, pp_text)) = pp_text {
for n in pp_text.into_iter().event() {
match n {
NodeEvent::Enter(RefNode::ResetallCompilerDirective(_)) if !skip => {
defines.clear();
}
NodeEvent::Enter(RefNode::UndefineCompilerDirective(x)) if !skip => {
let (_, _, ref name) = x.nodes;
let id = identifier((&name.nodes.0).into());
let id = String::from(id.unwrap().str(s));
defines.remove(&id);
}
NodeEvent::Enter(RefNode::UndefineallCompilerDirective(_)) if !skip => {
defines.clear();
}
NodeEvent::Enter(RefNode::SourceDescriptionNotDirective(x)) if !skip => {
let locate: Locate = x.try_into().unwrap();
ret.push_str(locate.str(s));
}
NodeEvent::Enter(RefNode::IfdefDirective(x)) if !skip => {
let (_, _, ref ifid, ref ifbody, ref elsif, ref elsebody, _, _) = x.nodes;
let ifid = identifier(ifid.into());
let ifid = String::from(ifid.unwrap().str(s));
let mut hit = false;
if defines.contains_key(&ifid) {
hit = true;
} else {
skip_nodes.push(ifbody.into());
}
for x in elsif {
let (_, _, ref elsifid, ref elsifbody) = x;
let elsifid = identifier(elsifid.into());
let elsifid = String::from(elsifid.unwrap().str(s));
if hit {
skip_nodes.push(elsifbody.into());
} else if defines.contains_key(&elsifid) {
hit = true;
} else {
skip_nodes.push(elsifbody.into());
}
}
if let Some(elsebody) = elsebody {
let (_, _, ref elsebody) = elsebody;
if hit {
skip_nodes.push(elsebody.into());
}
}
}
NodeEvent::Enter(RefNode::IfndefDirective(x)) if !skip => {
let (_, _, ref ifid, ref ifbody, ref elsif, ref elsebody, _, _) = x.nodes;
let ifid = identifier(ifid.into());
let mut hit = false;
if !defines.contains_key(&String::from(ifid.unwrap().str(s))) {
hit = true;
} else {
skip_nodes.push(ifbody.into());
}
for x in elsif {
let (_, _, ref elsifid, ref elsifbody) = x;
let elsifid = identifier(elsifid.into());
if hit {
skip_nodes.push(elsifbody.into());
} else if defines.contains_key(&String::from(elsifid.unwrap().str(s))) {
hit = true;
} else {
skip_nodes.push(elsifbody.into());
}
}
if let Some(elsebody) = elsebody {
let (_, _, ref elsebody) = elsebody;
if hit {
skip_nodes.push(elsebody.into());
}
}
}
NodeEvent::Enter(RefNode::TextMacroDefinition(x)) if !skip => {
let (_, _, ref name, _) = x.nodes;
let id = identifier((&name.nodes.0).into());
let id = String::from(id.unwrap().str(s));
defines.insert(id, x.clone());
}
NodeEvent::Enter(x) => {
if skip_nodes.contains(&x) {
skip = true;
}
}
NodeEvent::Leave(x) => {
if skip_nodes.contains(&x) {
skip = false;
}
}
}
}
}
//let ret = dbg!(ret);
println!("{}", ret);
ret
}
fn identifier(node: RefNode) -> Option<Locate> {
for x in node {
match x {
RefNode::SimpleIdentifier(x) => {
let x: Locate = x.nodes.0.try_into().unwrap();
return Some(x);
}
RefNode::EscapedIdentifier(x) => {
let x: Locate = x.nodes.0.try_into().unwrap();
return Some(x);
}
_ => (),
}
}
None
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*;
#[test] #[test]
fn it_works() { fn it_works() {
assert_eq!(2 + 2, 4); let s = r##"module and_op (a, b, c);
output a;
input b, c;
`define behavioral
`ifdef behavioral
wire a = b & c;
`else
and a1 (a,b,c);
`endif
endmodule"##;
preprocessor(s);
} }
} }

View File

@ -11,12 +11,12 @@ fn main() {
let mut out = File::create(&dest).unwrap(); let mut out = File::create(&dest).unwrap();
let mut ref_node = String::new(); let mut ref_node = String::new();
ref_node = format!("{}#[derive(Debug, Clone, RefNode)]\n", ref_node); ref_node = format!("{}#[derive(Clone, Debug, PartialEq, RefNode)]\n", ref_node);
ref_node = format!("{}pub enum RefNode<'a> {{\n", ref_node); ref_node = format!("{}pub enum RefNode<'a> {{\n", ref_node);
ref_node = format!("{} Locate(&'a Locate),\n", ref_node); ref_node = format!("{} Locate(&'a Locate),\n", ref_node);
let mut any_node = String::new(); let mut any_node = String::new();
any_node = format!("{}#[derive(Debug, Clone, AnyNode)]\n", any_node); any_node = format!("{}#[derive(Clone, Debug, PartialEq, AnyNode)]\n", any_node);
any_node = format!("{}pub enum AnyNode {{\n", any_node); any_node = format!("{}pub enum AnyNode {{\n", any_node);
any_node = format!("{} Locate(Locate),\n", any_node); any_node = format!("{} Locate(Locate),\n", any_node);

View File

@ -5,14 +5,21 @@ use core::convert::TryFrom;
include!(concat!(env!("OUT_DIR"), "/any_node.rs")); include!(concat!(env!("OUT_DIR"), "/any_node.rs"));
pub struct RefNodes<'a>(pub Vec<RefNode<'a>>);
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
pub struct RefNodes<'a>(pub Vec<RefNode<'a>>);
pub struct Iter<'a> { pub struct Iter<'a> {
pub(crate) next: RefNodes<'a>, pub(crate) next: RefNodes<'a>,
} }
impl<'a> Iter<'a> {
pub fn event(self) -> EventIter<'a> {
let next: NodeEvents = self.next.into();
EventIter { next }
}
}
impl<'a> Iterator for Iter<'a> { impl<'a> Iterator for Iter<'a> {
type Item = RefNode<'a>; type Item = RefNode<'a>;
@ -29,6 +36,59 @@ impl<'a> Iterator for Iter<'a> {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Debug, Clone)]
pub enum NodeEvent<'a> {
Enter(RefNode<'a>),
Leave(RefNode<'a>),
}
pub struct NodeEvents<'a>(pub Vec<NodeEvent<'a>>);
pub struct EventIter<'a> {
pub(crate) next: NodeEvents<'a>,
}
impl<'a> Iterator for EventIter<'a> {
type Item = NodeEvent<'a>;
fn next(&mut self) -> Option<Self::Item> {
let ret = self.next.0.pop();
if let Some(x) = ret.clone() {
if let NodeEvent::Enter(x) = x {
self.next.0.push(NodeEvent::Leave(x.clone()));
let mut x: NodeEvents = x.next().into();
x.0.reverse();
self.next.0.append(&mut x.0);
}
}
ret
}
}
// -----------------------------------------------------------------------------
impl<'a> From<Iter<'a>> for EventIter<'a> {
fn from(x: Iter<'a>) -> Self {
let mut ret = Vec::new();
for x in x.next.0 {
ret.push(NodeEvent::Enter(x));
}
EventIter {
next: NodeEvents(ret),
}
}
}
impl<'a> From<RefNodes<'a>> for NodeEvents<'a> {
fn from(x: RefNodes<'a>) -> Self {
let mut ret = Vec::new();
for x in x.0 {
ret.push(NodeEvent::Enter(x));
}
NodeEvents(ret)
}
}
impl<'a> From<Vec<RefNode<'a>>> for RefNodes<'a> { impl<'a> From<Vec<RefNode<'a>>> for RefNodes<'a> {
fn from(x: Vec<RefNode<'a>>) -> Self { fn from(x: Vec<RefNode<'a>>) -> Self {
RefNodes(x) RefNodes(x)

View File

@ -2,13 +2,13 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum AssertionItem { pub enum AssertionItem {
Concurrent(Box<ConcurrentAssertionItem>), Concurrent(Box<ConcurrentAssertionItem>),
Immediate(Box<DeferredImmediateAssetionItem>), Immediate(Box<DeferredImmediateAssetionItem>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DeferredImmediateAssetionItem { pub struct DeferredImmediateAssetionItem {
pub nodes: ( pub nodes: (
Option<(BlockIdentifier, Symbol)>, Option<(BlockIdentifier, Symbol)>,
@ -16,64 +16,64 @@ pub struct DeferredImmediateAssetionItem {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ProceduralAssertionStatement { pub enum ProceduralAssertionStatement {
Concurrent(Box<ConcurrentAssertionStatement>), Concurrent(Box<ConcurrentAssertionStatement>),
Immediate(Box<ImmediateAssetionStatement>), Immediate(Box<ImmediateAssetionStatement>),
Checker(Box<CheckerInstantiation>), Checker(Box<CheckerInstantiation>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ImmediateAssetionStatement { pub enum ImmediateAssetionStatement {
Simple(Box<SimpleImmediateAssertionStatement>), Simple(Box<SimpleImmediateAssertionStatement>),
Deferred(Box<DeferredImmediateAssertionStatement>), Deferred(Box<DeferredImmediateAssertionStatement>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SimpleImmediateAssertionStatement { pub enum SimpleImmediateAssertionStatement {
Assert(Box<SimpleImmediateAssertStatement>), Assert(Box<SimpleImmediateAssertStatement>),
Assume(Box<SimpleImmediateAssumeStatement>), Assume(Box<SimpleImmediateAssumeStatement>),
Cover(Box<SimpleImmediateCoverStatement>), Cover(Box<SimpleImmediateCoverStatement>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SimpleImmediateAssertStatement { pub struct SimpleImmediateAssertStatement {
pub nodes: (Keyword, Paren<Expression>, ActionBlock), pub nodes: (Keyword, Paren<Expression>, ActionBlock),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SimpleImmediateAssumeStatement { pub struct SimpleImmediateAssumeStatement {
pub nodes: (Keyword, Paren<Expression>, ActionBlock), pub nodes: (Keyword, Paren<Expression>, ActionBlock),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SimpleImmediateCoverStatement { pub struct SimpleImmediateCoverStatement {
pub nodes: (Keyword, Paren<Expression>, StatementOrNull), pub nodes: (Keyword, Paren<Expression>, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DeferredImmediateAssertionStatement { pub enum DeferredImmediateAssertionStatement {
Assert(Box<DeferredImmediateAssertStatement>), Assert(Box<DeferredImmediateAssertStatement>),
Assume(Box<DeferredImmediateAssumeStatement>), Assume(Box<DeferredImmediateAssumeStatement>),
Cover(Box<DeferredImmediateCoverStatement>), Cover(Box<DeferredImmediateCoverStatement>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DeferredImmediateAssertStatement { pub struct DeferredImmediateAssertStatement {
pub nodes: (Keyword, AssertTiming, Paren<Expression>, ActionBlock), pub nodes: (Keyword, AssertTiming, Paren<Expression>, ActionBlock),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DeferredImmediateAssumeStatement { pub struct DeferredImmediateAssumeStatement {
pub nodes: (Keyword, AssertTiming, Paren<Expression>, ActionBlock), pub nodes: (Keyword, AssertTiming, Paren<Expression>, ActionBlock),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DeferredImmediateCoverStatement { pub struct DeferredImmediateCoverStatement {
pub nodes: (Keyword, AssertTiming, Paren<Expression>, StatementOrNull), pub nodes: (Keyword, AssertTiming, Paren<Expression>, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum AssertTiming { pub enum AssertTiming {
Zero(Box<Symbol>), Zero(Box<Symbol>),
Final(Box<Keyword>), Final(Box<Keyword>),

View File

@ -2,14 +2,14 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CaseStatement { pub enum CaseStatement {
Normal(Box<CaseStatementNormal>), Normal(Box<CaseStatementNormal>),
Matches(Box<CaseStatementMatches>), Matches(Box<CaseStatementMatches>),
Inside(Box<CaseStatementInside>), Inside(Box<CaseStatementInside>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseStatementNormal { pub struct CaseStatementNormal {
pub nodes: ( pub nodes: (
Option<UniquePriority>, Option<UniquePriority>,
@ -21,7 +21,7 @@ pub struct CaseStatementNormal {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseStatementMatches { pub struct CaseStatementMatches {
pub nodes: ( pub nodes: (
Option<UniquePriority>, Option<UniquePriority>,
@ -34,7 +34,7 @@ pub struct CaseStatementMatches {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseStatementInside { pub struct CaseStatementInside {
pub nodes: ( pub nodes: (
Option<UniquePriority>, Option<UniquePriority>,
@ -47,41 +47,41 @@ pub struct CaseStatementInside {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CaseKeyword { pub enum CaseKeyword {
Case(Box<Keyword>), Case(Box<Keyword>),
Casez(Box<Keyword>), Casez(Box<Keyword>),
Casex(Box<Keyword>), Casex(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseExpression { pub struct CaseExpression {
pub nodes: (Expression,), pub nodes: (Expression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CaseItem { pub enum CaseItem {
NonDefault(Box<CaseItemNondefault>), NonDefault(Box<CaseItemNondefault>),
Default(Box<CaseItemDefault>), Default(Box<CaseItemDefault>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseItemNondefault { pub struct CaseItemNondefault {
pub nodes: (List<Symbol, CaseItemExpression>, Symbol, StatementOrNull), pub nodes: (List<Symbol, CaseItemExpression>, Symbol, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseItemDefault { pub struct CaseItemDefault {
pub nodes: (Keyword, Option<Symbol>, StatementOrNull), pub nodes: (Keyword, Option<Symbol>, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CasePatternItem { pub enum CasePatternItem {
NonDefault(Box<CasePatternItemNondefault>), NonDefault(Box<CasePatternItemNondefault>),
Default(Box<CaseItemDefault>), Default(Box<CaseItemDefault>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CasePatternItemNondefault { pub struct CasePatternItemNondefault {
pub nodes: ( pub nodes: (
Pattern, Pattern,
@ -91,38 +91,38 @@ pub struct CasePatternItemNondefault {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CaseInsideItem { pub enum CaseInsideItem {
NonDefault(Box<CaseInsideItemNondefault>), NonDefault(Box<CaseInsideItemNondefault>),
Default(Box<CaseItemDefault>), Default(Box<CaseItemDefault>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseInsideItemNondefault { pub struct CaseInsideItemNondefault {
pub nodes: (OpenRangeList, Symbol, StatementOrNull), pub nodes: (OpenRangeList, Symbol, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseItemExpression { pub struct CaseItemExpression {
pub nodes: (Expression,), pub nodes: (Expression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RandcaseStatement { pub struct RandcaseStatement {
pub nodes: (Keyword, RandcaseItem, Vec<RandcaseItem>, Keyword), pub nodes: (Keyword, RandcaseItem, Vec<RandcaseItem>, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RandcaseItem { pub struct RandcaseItem {
pub nodes: (Expression, Symbol, StatementOrNull), pub nodes: (Expression, Symbol, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OpenRangeList { pub struct OpenRangeList {
pub nodes: (List<Symbol, OpenValueRange>,), pub nodes: (List<Symbol, OpenValueRange>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OpenValueRange { pub struct OpenValueRange {
pub nodes: (ValueRange,), pub nodes: (ValueRange,),
} }

View File

@ -2,13 +2,13 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClockingDeclaration { pub enum ClockingDeclaration {
Local(Box<ClockingDeclarationLocal>), Local(Box<ClockingDeclarationLocal>),
Global(Box<ClockingDeclarationGlobal>), Global(Box<ClockingDeclarationGlobal>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingDeclarationLocal { pub struct ClockingDeclarationLocal {
pub nodes: ( pub nodes: (
Option<Default>, Option<Default>,
@ -22,12 +22,12 @@ pub struct ClockingDeclarationLocal {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Default { pub struct Default {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingDeclarationGlobal { pub struct ClockingDeclarationGlobal {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -40,67 +40,67 @@ pub struct ClockingDeclarationGlobal {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClockingEvent { pub enum ClockingEvent {
Identifier(Box<ClockingEventIdentifier>), Identifier(Box<ClockingEventIdentifier>),
Expression(Box<ClockingEventExpression>), Expression(Box<ClockingEventExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingEventIdentifier { pub struct ClockingEventIdentifier {
pub nodes: (Symbol, Identifier), pub nodes: (Symbol, Identifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingEventExpression { pub struct ClockingEventExpression {
pub nodes: (Symbol, Paren<EventExpression>), pub nodes: (Symbol, Paren<EventExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClockingItem { pub enum ClockingItem {
Default(Box<ClockingItemDefault>), Default(Box<ClockingItemDefault>),
Direction(Box<ClockingItemDirection>), Direction(Box<ClockingItemDirection>),
Assertion(Box<ClockingItemAssertion>), Assertion(Box<ClockingItemAssertion>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingItemDefault { pub struct ClockingItemDefault {
pub nodes: (Keyword, DefaultSkew, Symbol), pub nodes: (Keyword, DefaultSkew, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingItemDirection { pub struct ClockingItemDirection {
pub nodes: (ClockingDirection, ListOfClockingDeclAssign, Symbol), pub nodes: (ClockingDirection, ListOfClockingDeclAssign, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingItemAssertion { pub struct ClockingItemAssertion {
pub nodes: (Vec<AttributeInstance>, AssertionItemDeclaration), pub nodes: (Vec<AttributeInstance>, AssertionItemDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DefaultSkew { pub enum DefaultSkew {
Input(Box<DefaultSkewInput>), Input(Box<DefaultSkewInput>),
Output(Box<DefaultSkewOutput>), Output(Box<DefaultSkewOutput>),
InputOutput(Box<DefaultSkewInputOutput>), InputOutput(Box<DefaultSkewInputOutput>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DefaultSkewInput { pub struct DefaultSkewInput {
pub nodes: (Keyword, ClockingSkew), pub nodes: (Keyword, ClockingSkew),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DefaultSkewOutput { pub struct DefaultSkewOutput {
pub nodes: (Keyword, ClockingSkew), pub nodes: (Keyword, ClockingSkew),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DefaultSkewInputOutput { pub struct DefaultSkewInputOutput {
pub nodes: (Keyword, ClockingSkew, Keyword, ClockingSkew), pub nodes: (Keyword, ClockingSkew, Keyword, ClockingSkew),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClockingDirection { pub enum ClockingDirection {
Input(Box<ClockingDirectionInput>), Input(Box<ClockingDirectionInput>),
Output(Box<ClockingDirectionOutput>), Output(Box<ClockingDirectionOutput>),
@ -108,75 +108,75 @@ pub enum ClockingDirection {
Inout(Box<Keyword>), Inout(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingDirectionInput { pub struct ClockingDirectionInput {
pub nodes: (Keyword, Option<ClockingSkew>), pub nodes: (Keyword, Option<ClockingSkew>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingDirectionOutput { pub struct ClockingDirectionOutput {
pub nodes: (Keyword, Option<ClockingSkew>), pub nodes: (Keyword, Option<ClockingSkew>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingDirectionInputOutput { pub struct ClockingDirectionInputOutput {
pub nodes: (Keyword, Option<ClockingSkew>, Keyword, Option<ClockingSkew>), pub nodes: (Keyword, Option<ClockingSkew>, Keyword, Option<ClockingSkew>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfClockingDeclAssign { pub struct ListOfClockingDeclAssign {
pub nodes: (List<Symbol, ClockingDeclAssign>,), pub nodes: (List<Symbol, ClockingDeclAssign>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingDeclAssign { pub struct ClockingDeclAssign {
pub nodes: (SignalIdentifier, Option<(Symbol, Expression)>), pub nodes: (SignalIdentifier, Option<(Symbol, Expression)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClockingSkew { pub enum ClockingSkew {
Edge(Box<ClockingSkewEdge>), Edge(Box<ClockingSkewEdge>),
DelayControl(Box<DelayControl>), DelayControl(Box<DelayControl>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingSkewEdge { pub struct ClockingSkewEdge {
pub nodes: (EdgeIdentifier, Option<DelayControl>), pub nodes: (EdgeIdentifier, Option<DelayControl>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingDrive { pub struct ClockingDrive {
pub nodes: (ClockvarExpression, Symbol, Option<CycleDelay>, Expression), pub nodes: (ClockvarExpression, Symbol, Option<CycleDelay>, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CycleDelay { pub enum CycleDelay {
Integral(Box<CycleDelayIntegral>), Integral(Box<CycleDelayIntegral>),
Identifier(Box<CycleDelayIdentifier>), Identifier(Box<CycleDelayIdentifier>),
Expression(Box<CycleDelayExpression>), Expression(Box<CycleDelayExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CycleDelayIntegral { pub struct CycleDelayIntegral {
pub nodes: (Symbol, IntegralNumber), pub nodes: (Symbol, IntegralNumber),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CycleDelayIdentifier { pub struct CycleDelayIdentifier {
pub nodes: (Symbol, Identifier), pub nodes: (Symbol, Identifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CycleDelayExpression { pub struct CycleDelayExpression {
pub nodes: (Symbol, Paren<Expression>), pub nodes: (Symbol, Paren<Expression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Clockvar { pub struct Clockvar {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockvarExpression { pub struct ClockvarExpression {
pub nodes: (Clockvar, Select), pub nodes: (Clockvar, Select),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConditionalStatement { pub struct ConditionalStatement {
pub nodes: ( pub nodes: (
Option<UniquePriority>, Option<UniquePriority>,
@ -14,25 +14,25 @@ pub struct ConditionalStatement {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum UniquePriority { pub enum UniquePriority {
Unique(Box<Keyword>), Unique(Box<Keyword>),
Unique0(Box<Keyword>), Unique0(Box<Keyword>),
Priority(Box<Keyword>), Priority(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CondPredicate { pub struct CondPredicate {
pub nodes: (List<Symbol, ExpressionOrCondPattern>,), pub nodes: (List<Symbol, ExpressionOrCondPattern>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ExpressionOrCondPattern { pub enum ExpressionOrCondPattern {
Expression(Box<Expression>), Expression(Box<Expression>),
CondPattern(Box<CondPattern>), CondPattern(Box<CondPattern>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CondPattern { pub struct CondPattern {
pub nodes: (Expression, Keyword, Pattern), pub nodes: (Expression, Keyword, Pattern),
} }

View File

@ -2,13 +2,13 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ContinuousAssign { pub enum ContinuousAssign {
Net(Box<ContinuousAssignNet>), Net(Box<ContinuousAssignNet>),
Variable(Box<ContinuousAssignVariable>), Variable(Box<ContinuousAssignVariable>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ContinuousAssignNet { pub struct ContinuousAssignNet {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -19,7 +19,7 @@ pub struct ContinuousAssignNet {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ContinuousAssignVariable { pub struct ContinuousAssignVariable {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -29,22 +29,22 @@ pub struct ContinuousAssignVariable {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfNetAssignments { pub struct ListOfNetAssignments {
pub nodes: (List<Symbol, NetAssignment>,), pub nodes: (List<Symbol, NetAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfVariableAssignments { pub struct ListOfVariableAssignments {
pub nodes: (List<Symbol, VariableAssignment>,), pub nodes: (List<Symbol, VariableAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetAlias { pub struct NetAlias {
pub nodes: (Keyword, NetLvalue, Symbol, List<Symbol, NetLvalue>, Symbol), pub nodes: (Keyword, NetLvalue, Symbol, List<Symbol, NetLvalue>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetAssignment { pub struct NetAssignment {
pub nodes: (NetLvalue, Symbol, Expression), pub nodes: (NetLvalue, Symbol, Expression),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum LoopStatement { pub enum LoopStatement {
Forever(Box<LoopStatementForever>), Forever(Box<LoopStatementForever>),
Repeat(Box<LoopStatementRepeat>), Repeat(Box<LoopStatementRepeat>),
@ -12,22 +12,22 @@ pub enum LoopStatement {
Foreach(Box<LoopStatementForeach>), Foreach(Box<LoopStatementForeach>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LoopStatementForever { pub struct LoopStatementForever {
pub nodes: (Keyword, StatementOrNull), pub nodes: (Keyword, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LoopStatementRepeat { pub struct LoopStatementRepeat {
pub nodes: (Keyword, Paren<Expression>, StatementOrNull), pub nodes: (Keyword, Paren<Expression>, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LoopStatementWhile { pub struct LoopStatementWhile {
pub nodes: (Keyword, Paren<Expression>, StatementOrNull), pub nodes: (Keyword, Paren<Expression>, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LoopStatementFor { pub struct LoopStatementFor {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -42,12 +42,12 @@ pub struct LoopStatementFor {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LoopStatementDoWhile { pub struct LoopStatementDoWhile {
pub nodes: (Keyword, StatementOrNull, Keyword, Paren<Expression>, Symbol), pub nodes: (Keyword, StatementOrNull, Keyword, Paren<Expression>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LoopStatementForeach { pub struct LoopStatementForeach {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -56,18 +56,18 @@ pub struct LoopStatementForeach {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ForInitialization { pub enum ForInitialization {
ListOfVariableAssignments(Box<ListOfVariableAssignments>), ListOfVariableAssignments(Box<ListOfVariableAssignments>),
Declaration(Box<ForInitializationDeclaration>), Declaration(Box<ForInitializationDeclaration>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ForInitializationDeclaration { pub struct ForInitializationDeclaration {
pub nodes: (List<Symbol, ForVariableDeclaration>,), pub nodes: (List<Symbol, ForVariableDeclaration>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ForVariableDeclaration { pub struct ForVariableDeclaration {
pub nodes: ( pub nodes: (
Option<Var>, Option<Var>,
@ -76,24 +76,24 @@ pub struct ForVariableDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Var { pub struct Var {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ForStep { pub struct ForStep {
pub nodes: (List<Symbol, ForStepAssignment>,), pub nodes: (List<Symbol, ForStepAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ForStepAssignment { pub enum ForStepAssignment {
OperatorAssignment(Box<OperatorAssignment>), OperatorAssignment(Box<OperatorAssignment>),
IncOrDecExpression(Box<IncOrDecExpression>), IncOrDecExpression(Box<IncOrDecExpression>),
FunctionSubroutineCall(Box<FunctionSubroutineCall>), FunctionSubroutineCall(Box<FunctionSubroutineCall>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LoopVariables { pub struct LoopVariables {
pub nodes: (List<Symbol, Option<IndexVariableIdentifier>>,), pub nodes: (List<Symbol, Option<IndexVariableIdentifier>>,),
} }

View File

@ -2,18 +2,18 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ActionBlock { pub enum ActionBlock {
StatementOrNull(Box<StatementOrNull>), StatementOrNull(Box<StatementOrNull>),
Else(Box<ActionBlockElse>), Else(Box<ActionBlockElse>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ActionBlockElse { pub struct ActionBlockElse {
pub nodes: (Option<Statement>, Keyword, StatementOrNull), pub nodes: (Option<Statement>, Keyword, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SeqBlock { pub struct SeqBlock {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -25,7 +25,7 @@ pub struct SeqBlock {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParBlock { pub struct ParBlock {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -37,7 +37,7 @@ pub struct ParBlock {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum JoinKeyword { pub enum JoinKeyword {
Join(Box<Keyword>), Join(Box<Keyword>),
JoinAny(Box<Keyword>), JoinAny(Box<Keyword>),

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Pattern { pub enum Pattern {
Variable(Box<PatternVariable>), Variable(Box<PatternVariable>),
Asterisk(Box<Symbol>), Asterisk(Box<Symbol>),
@ -12,27 +12,27 @@ pub enum Pattern {
IdentifierList(Box<PatternIdentifierList>), IdentifierList(Box<PatternIdentifierList>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PatternVariable { pub struct PatternVariable {
pub nodes: (Symbol, VariableIdentifier), pub nodes: (Symbol, VariableIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PatternTagged { pub struct PatternTagged {
pub nodes: (Keyword, MemberIdentifier, Option<Pattern>), pub nodes: (Keyword, MemberIdentifier, Option<Pattern>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PatternList { pub struct PatternList {
pub nodes: (ApostropheBrace<List<Symbol, Pattern>>,), pub nodes: (ApostropheBrace<List<Symbol, Pattern>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PatternIdentifierList { pub struct PatternIdentifierList {
pub nodes: (ApostropheBrace<List<Symbol, (MemberIdentifier, Symbol, Pattern)>>,), pub nodes: (ApostropheBrace<List<Symbol, (MemberIdentifier, Symbol, Pattern)>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum AssignmentPattern { pub enum AssignmentPattern {
List(Box<AssignmentPatternList>), List(Box<AssignmentPatternList>),
Structure(Box<AssignmentPatternStructure>), Structure(Box<AssignmentPatternStructure>),
@ -40,50 +40,50 @@ pub enum AssignmentPattern {
Repeat(Box<AssignmentPatternRepeat>), Repeat(Box<AssignmentPatternRepeat>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternList { pub struct AssignmentPatternList {
pub nodes: (ApostropheBrace<List<Symbol, Expression>>,), pub nodes: (ApostropheBrace<List<Symbol, Expression>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternStructure { pub struct AssignmentPatternStructure {
pub nodes: (ApostropheBrace<List<Symbol, (StructurePatternKey, Symbol, Expression)>>,), pub nodes: (ApostropheBrace<List<Symbol, (StructurePatternKey, Symbol, Expression)>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternArray { pub struct AssignmentPatternArray {
pub nodes: (ApostropheBrace<List<Symbol, (ArrayPatternKey, Symbol, Expression)>>,), pub nodes: (ApostropheBrace<List<Symbol, (ArrayPatternKey, Symbol, Expression)>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternRepeat { pub struct AssignmentPatternRepeat {
pub nodes: (ApostropheBrace<(ConstantExpression, Brace<List<Symbol, Expression>>)>,), pub nodes: (ApostropheBrace<(ConstantExpression, Brace<List<Symbol, Expression>>)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum StructurePatternKey { pub enum StructurePatternKey {
MemberIdentifier(Box<MemberIdentifier>), MemberIdentifier(Box<MemberIdentifier>),
AssignmentPatternKey(Box<AssignmentPatternKey>), AssignmentPatternKey(Box<AssignmentPatternKey>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ArrayPatternKey { pub enum ArrayPatternKey {
ConstantExpression(Box<ConstantExpression>), ConstantExpression(Box<ConstantExpression>),
AssignmentPatternKey(Box<AssignmentPatternKey>), AssignmentPatternKey(Box<AssignmentPatternKey>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum AssignmentPatternKey { pub enum AssignmentPatternKey {
SimpleType(Box<SimpleType>), SimpleType(Box<SimpleType>),
Default(Box<Keyword>), Default(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternExpression { pub struct AssignmentPatternExpression {
pub nodes: (Option<AssignmentPatternExpressionType>, AssignmentPattern), pub nodes: (Option<AssignmentPatternExpressionType>, AssignmentPattern),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum AssignmentPatternExpressionType { pub enum AssignmentPatternExpressionType {
PsTypeIdentifier(Box<PsTypeIdentifier>), PsTypeIdentifier(Box<PsTypeIdentifier>),
PsParameterIdentifier(Box<PsParameterIdentifier>), PsParameterIdentifier(Box<PsParameterIdentifier>),
@ -91,17 +91,17 @@ pub enum AssignmentPatternExpressionType {
TypeReference(Box<TypeReference>), TypeReference(Box<TypeReference>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantAssignmentPatternExpression { pub struct ConstantAssignmentPatternExpression {
pub nodes: (AssignmentPatternExpression,), pub nodes: (AssignmentPatternExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternNetLvalue { pub struct AssignmentPatternNetLvalue {
pub nodes: (ApostropheBrace<List<Symbol, NetLvalue>>,), pub nodes: (ApostropheBrace<List<Symbol, NetLvalue>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternVariableLvalue { pub struct AssignmentPatternVariableLvalue {
pub nodes: (ApostropheBrace<List<Symbol, VariableLvalue>>,), pub nodes: (ApostropheBrace<List<Symbol, VariableLvalue>>,),
} }

View File

@ -2,17 +2,17 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InitialConstruct { pub struct InitialConstruct {
pub nodes: (Keyword, StatementOrNull), pub nodes: (Keyword, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AlwaysConstruct { pub struct AlwaysConstruct {
pub nodes: (AlwaysKeyword, Statement), pub nodes: (AlwaysKeyword, Statement),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum AlwaysKeyword { pub enum AlwaysKeyword {
Always(Box<Keyword>), Always(Box<Keyword>),
AlwaysComb(Box<Keyword>), AlwaysComb(Box<Keyword>),
@ -20,12 +20,12 @@ pub enum AlwaysKeyword {
AlwaysFf(Box<Keyword>), AlwaysFf(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FinalConstruct { pub struct FinalConstruct {
pub nodes: (Keyword, FunctionStatement), pub nodes: (Keyword, FunctionStatement),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BlockingAssignment { pub enum BlockingAssignment {
Variable(Box<BlockingAssignmentVariable>), Variable(Box<BlockingAssignmentVariable>),
NonrangeVariable(Box<BlockingAssignmentNonrangeVariable>), NonrangeVariable(Box<BlockingAssignmentNonrangeVariable>),
@ -33,17 +33,17 @@ pub enum BlockingAssignment {
OperatorAssignment(Box<OperatorAssignment>), OperatorAssignment(Box<OperatorAssignment>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockingAssignmentVariable { pub struct BlockingAssignmentVariable {
pub nodes: (VariableLvalue, Symbol, DelayOrEventControl, Expression), pub nodes: (VariableLvalue, Symbol, DelayOrEventControl, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockingAssignmentNonrangeVariable { pub struct BlockingAssignmentNonrangeVariable {
pub nodes: (NonrangeVariableLvalue, Symbol, DynamicArrayNew), pub nodes: (NonrangeVariableLvalue, Symbol, DynamicArrayNew),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockingAssignmentHierarchicalVariable { pub struct BlockingAssignmentHierarchicalVariable {
pub nodes: ( pub nodes: (
Option<ImplicitClassHandleOrClassScopeOrPackageScope>, Option<ImplicitClassHandleOrClassScopeOrPackageScope>,
@ -54,17 +54,17 @@ pub struct BlockingAssignmentHierarchicalVariable {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OperatorAssignment { pub struct OperatorAssignment {
pub nodes: (VariableLvalue, AssignmentOperator, Expression), pub nodes: (VariableLvalue, AssignmentOperator, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentOperator { pub struct AssignmentOperator {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonblockingAssignment { pub struct NonblockingAssignment {
pub nodes: ( pub nodes: (
VariableLvalue, VariableLvalue,
@ -74,7 +74,7 @@ pub struct NonblockingAssignment {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ProceduralContinuousAssignment { pub enum ProceduralContinuousAssignment {
Assign(Box<ProceduralContinuousAssignmentAssign>), Assign(Box<ProceduralContinuousAssignmentAssign>),
Deassign(Box<ProceduralContinuousAssignmentDeassign>), Deassign(Box<ProceduralContinuousAssignmentDeassign>),
@ -84,37 +84,37 @@ pub enum ProceduralContinuousAssignment {
ReleaseNet(Box<ProceduralContinuousAssignmentReleaseNet>), ReleaseNet(Box<ProceduralContinuousAssignmentReleaseNet>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProceduralContinuousAssignmentAssign { pub struct ProceduralContinuousAssignmentAssign {
pub nodes: (Keyword, VariableAssignment), pub nodes: (Keyword, VariableAssignment),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProceduralContinuousAssignmentDeassign { pub struct ProceduralContinuousAssignmentDeassign {
pub nodes: (Keyword, VariableLvalue), pub nodes: (Keyword, VariableLvalue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProceduralContinuousAssignmentForceVariable { pub struct ProceduralContinuousAssignmentForceVariable {
pub nodes: (Keyword, VariableAssignment), pub nodes: (Keyword, VariableAssignment),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProceduralContinuousAssignmentForceNet { pub struct ProceduralContinuousAssignmentForceNet {
pub nodes: (Keyword, NetAssignment), pub nodes: (Keyword, NetAssignment),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProceduralContinuousAssignmentReleaseVariable { pub struct ProceduralContinuousAssignmentReleaseVariable {
pub nodes: (Keyword, VariableLvalue), pub nodes: (Keyword, VariableLvalue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProceduralContinuousAssignmentReleaseNet { pub struct ProceduralContinuousAssignmentReleaseNet {
pub nodes: (Keyword, NetLvalue), pub nodes: (Keyword, NetLvalue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariableAssignment { pub struct VariableAssignment {
pub nodes: (VariableLvalue, Symbol, Expression), pub nodes: (VariableLvalue, Symbol, Expression),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RandsequenceStatement { pub struct RandsequenceStatement {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -13,7 +13,7 @@ pub struct RandsequenceStatement {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Production { pub struct Production {
pub nodes: ( pub nodes: (
Option<DataTypeOrVoid>, Option<DataTypeOrVoid>,
@ -25,7 +25,7 @@ pub struct Production {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RsRule { pub struct RsRule {
pub nodes: ( pub nodes: (
RsProductionList, RsProductionList,
@ -33,18 +33,18 @@ pub struct RsRule {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum RsProductionList { pub enum RsProductionList {
Prod(Box<RsProductionListProd>), Prod(Box<RsProductionListProd>),
Join(Box<RsProductionListJoin>), Join(Box<RsProductionListJoin>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RsProductionListProd { pub struct RsProductionListProd {
pub nodes: (RsProd, Vec<RsProd>), pub nodes: (RsProd, Vec<RsProd>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RsProductionListJoin { pub struct RsProductionListJoin {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -56,24 +56,24 @@ pub struct RsProductionListJoin {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum WeightSpecification { pub enum WeightSpecification {
IntegralNumber(Box<IntegralNumber>), IntegralNumber(Box<IntegralNumber>),
PsIdentifier(Box<PsIdentifier>), PsIdentifier(Box<PsIdentifier>),
Expression(Box<WeightSpecificationExpression>), Expression(Box<WeightSpecificationExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct WeightSpecificationExpression { pub struct WeightSpecificationExpression {
pub nodes: (Paren<Expression>,), pub nodes: (Paren<Expression>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RsCodeBlock { pub struct RsCodeBlock {
pub nodes: (Brace<(Vec<DataDeclaration>, Vec<StatementOrNull>)>,), pub nodes: (Brace<(Vec<DataDeclaration>, Vec<StatementOrNull>)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum RsProd { pub enum RsProd {
ProductionItem(Box<ProductionItem>), ProductionItem(Box<ProductionItem>),
RsCodeBlock(Box<RsCodeBlock>), RsCodeBlock(Box<RsCodeBlock>),
@ -82,12 +82,12 @@ pub enum RsProd {
RsCase(Box<RsCase>), RsCase(Box<RsCase>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProductionItem { pub struct ProductionItem {
pub nodes: (ProductionIdentifier, Option<Paren<ListOfArguments>>), pub nodes: (ProductionIdentifier, Option<Paren<ListOfArguments>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RsIfElse { pub struct RsIfElse {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -97,12 +97,12 @@ pub struct RsIfElse {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RsRepeat { pub struct RsRepeat {
pub nodes: (Keyword, Paren<Expression>, ProductionItem), pub nodes: (Keyword, Paren<Expression>, ProductionItem),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RsCase { pub struct RsCase {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -113,13 +113,13 @@ pub struct RsCase {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum RsCaseItem { pub enum RsCaseItem {
NonDefault(Box<RsCaseItemNondefault>), NonDefault(Box<RsCaseItemNondefault>),
Default(Box<RsCaseItemDefault>), Default(Box<RsCaseItemDefault>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RsCaseItemNondefault { pub struct RsCaseItemNondefault {
pub nodes: ( pub nodes: (
List<Symbol, CaseItemExpression>, List<Symbol, CaseItemExpression>,
@ -129,7 +129,7 @@ pub struct RsCaseItemNondefault {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RsCaseItemDefault { pub struct RsCaseItemDefault {
pub nodes: (Keyword, Option<Symbol>, ProductionItem, Symbol), pub nodes: (Keyword, Option<Symbol>, ProductionItem, Symbol),
} }

View File

@ -2,18 +2,18 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum StatementOrNull { pub enum StatementOrNull {
Statement(Box<Statement>), Statement(Box<Statement>),
Attribute(Box<StatementOrNullAttribute>), Attribute(Box<StatementOrNullAttribute>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StatementOrNullAttribute { pub struct StatementOrNullAttribute {
pub nodes: (Vec<AttributeInstance>, Symbol), pub nodes: (Vec<AttributeInstance>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Statement { pub struct Statement {
pub nodes: ( pub nodes: (
Option<(BlockIdentifier, Symbol)>, Option<(BlockIdentifier, Symbol)>,
@ -22,7 +22,7 @@ pub struct Statement {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum StatementItem { pub enum StatementItem {
BlockingAssignment(Box<(BlockingAssignment, Symbol)>), BlockingAssignment(Box<(BlockingAssignment, Symbol)>),
NonblockingAssignment(Box<(NonblockingAssignment, Symbol)>), NonblockingAssignment(Box<(NonblockingAssignment, Symbol)>),
@ -46,23 +46,23 @@ pub enum StatementItem {
ExpectPropertyStatement(Box<ExpectPropertyStatement>), ExpectPropertyStatement(Box<ExpectPropertyStatement>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FunctionStatement { pub struct FunctionStatement {
pub nodes: (Statement,), pub nodes: (Statement,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum FunctionStatementOrNull { pub enum FunctionStatementOrNull {
Statement(Box<FunctionStatement>), Statement(Box<FunctionStatement>),
Attribute(Box<FunctionStatementOrNullAttribute>), Attribute(Box<FunctionStatementOrNullAttribute>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FunctionStatementOrNullAttribute { pub struct FunctionStatementOrNullAttribute {
pub nodes: (Vec<AttributeInstance>, Symbol), pub nodes: (Vec<AttributeInstance>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariableIdentifierList { pub struct VariableIdentifierList {
pub nodes: (List<Symbol, VariableIdentifier>,), pub nodes: (List<Symbol, VariableIdentifier>,),
} }

View File

@ -2,13 +2,13 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SubroutineCallStatement { pub enum SubroutineCallStatement {
SubroutineCall(Box<(SubroutineCall, Symbol)>), SubroutineCall(Box<(SubroutineCall, Symbol)>),
Function(Box<SubroutineCallStatementFunction>), Function(Box<SubroutineCallStatementFunction>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SubroutineCallStatementFunction { pub struct SubroutineCallStatementFunction {
pub nodes: (Keyword, Symbol, Paren<FunctionSubroutineCall>, Symbol), pub nodes: (Keyword, Symbol, Paren<FunctionSubroutineCall>, Symbol),
} }

View File

@ -2,40 +2,40 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProceduralTimingControlStatement { pub struct ProceduralTimingControlStatement {
pub nodes: (ProceduralTimingControl, StatementOrNull), pub nodes: (ProceduralTimingControl, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DelayOrEventControl { pub enum DelayOrEventControl {
Delay(Box<DelayControl>), Delay(Box<DelayControl>),
Event(Box<EventControl>), Event(Box<EventControl>),
Repeat(Box<DelayOrEventControlRepeat>), Repeat(Box<DelayOrEventControlRepeat>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DelayOrEventControlRepeat { pub struct DelayOrEventControlRepeat {
pub nodes: (Keyword, Paren<Expression>, EventControl), pub nodes: (Keyword, Paren<Expression>, EventControl),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DelayControl { pub enum DelayControl {
Delay(Box<DelayControlDelay>), Delay(Box<DelayControlDelay>),
Mintypmax(Box<DelayControlMintypmax>), Mintypmax(Box<DelayControlMintypmax>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DelayControlDelay { pub struct DelayControlDelay {
pub nodes: (Symbol, DelayValue), pub nodes: (Symbol, DelayValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DelayControlMintypmax { pub struct DelayControlMintypmax {
pub nodes: (Symbol, Paren<MintypmaxExpression>), pub nodes: (Symbol, Paren<MintypmaxExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum EventControl { pub enum EventControl {
EventIdentifier(Box<EventControlEventIdentifier>), EventIdentifier(Box<EventControlEventIdentifier>),
EventExpression(Box<EventControlEventExpression>), EventExpression(Box<EventControlEventExpression>),
@ -44,32 +44,32 @@ pub enum EventControl {
SequenceIdentifier(Box<EventControlSequenceIdentifier>), SequenceIdentifier(Box<EventControlSequenceIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventControlEventIdentifier { pub struct EventControlEventIdentifier {
pub nodes: (Symbol, HierarchicalEventIdentifier), pub nodes: (Symbol, HierarchicalEventIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventControlEventExpression { pub struct EventControlEventExpression {
pub nodes: (Symbol, Paren<EventExpression>), pub nodes: (Symbol, Paren<EventExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventControlAsterisk { pub struct EventControlAsterisk {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventControlParenAsterisk { pub struct EventControlParenAsterisk {
pub nodes: (Symbol, Paren<Symbol>), pub nodes: (Symbol, Paren<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventControlSequenceIdentifier { pub struct EventControlSequenceIdentifier {
pub nodes: (Symbol, PsOrHierarchicalSequenceIdentifier), pub nodes: (Symbol, PsOrHierarchicalSequenceIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum EventExpression { pub enum EventExpression {
Expression(Box<EventExpressionExpression>), Expression(Box<EventExpressionExpression>),
Sequence(Box<EventExpressionSequence>), Sequence(Box<EventExpressionSequence>),
@ -78,7 +78,7 @@ pub enum EventExpression {
Paren(Box<EventExpressionParen>), Paren(Box<EventExpressionParen>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventExpressionExpression { pub struct EventExpressionExpression {
pub nodes: ( pub nodes: (
Option<EdgeIdentifier>, Option<EdgeIdentifier>,
@ -87,73 +87,73 @@ pub struct EventExpressionExpression {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventExpressionSequence { pub struct EventExpressionSequence {
pub nodes: (SequenceInstance, Option<(Keyword, Expression)>), pub nodes: (SequenceInstance, Option<(Keyword, Expression)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventExpressionOr { pub struct EventExpressionOr {
pub nodes: (EventExpression, Keyword, EventExpression), pub nodes: (EventExpression, Keyword, EventExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventExpressionComma { pub struct EventExpressionComma {
pub nodes: (EventExpression, Symbol, EventExpression), pub nodes: (EventExpression, Symbol, EventExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventExpressionParen { pub struct EventExpressionParen {
pub nodes: (Paren<EventExpression>,), pub nodes: (Paren<EventExpression>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ProceduralTimingControl { pub enum ProceduralTimingControl {
DelayControl(Box<DelayControl>), DelayControl(Box<DelayControl>),
EventControl(Box<EventControl>), EventControl(Box<EventControl>),
CycleDelay(Box<CycleDelay>), CycleDelay(Box<CycleDelay>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum JumpStatement { pub enum JumpStatement {
Return(Box<JumpStatementReturn>), Return(Box<JumpStatementReturn>),
Break(Box<JumpStatementBreak>), Break(Box<JumpStatementBreak>),
Continue(Box<JumpStatementContinue>), Continue(Box<JumpStatementContinue>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct JumpStatementReturn { pub struct JumpStatementReturn {
pub nodes: (Keyword, Option<Expression>, Symbol), pub nodes: (Keyword, Option<Expression>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct JumpStatementBreak { pub struct JumpStatementBreak {
pub nodes: (Keyword, Symbol), pub nodes: (Keyword, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct JumpStatementContinue { pub struct JumpStatementContinue {
pub nodes: (Keyword, Symbol), pub nodes: (Keyword, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum WaitStatement { pub enum WaitStatement {
Wait(Box<WaitStatementWait>), Wait(Box<WaitStatementWait>),
Fork(Box<WaitStatementFork>), Fork(Box<WaitStatementFork>),
Order(Box<WaitStatementOrder>), Order(Box<WaitStatementOrder>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct WaitStatementWait { pub struct WaitStatementWait {
pub nodes: (Keyword, Paren<Expression>, StatementOrNull), pub nodes: (Keyword, Paren<Expression>, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct WaitStatementFork { pub struct WaitStatementFork {
pub nodes: (Keyword, Keyword, Symbol), pub nodes: (Keyword, Keyword, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct WaitStatementOrder { pub struct WaitStatementOrder {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -162,18 +162,18 @@ pub struct WaitStatementOrder {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum EventTrigger { pub enum EventTrigger {
Named(Box<EventTriggerNamed>), Named(Box<EventTriggerNamed>),
Nonblocking(Box<EventTriggerNonblocking>), Nonblocking(Box<EventTriggerNonblocking>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventTriggerNamed { pub struct EventTriggerNamed {
pub nodes: (Symbol, HierarchicalEventIdentifier, Symbol), pub nodes: (Symbol, HierarchicalEventIdentifier, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventTriggerNonblocking { pub struct EventTriggerNonblocking {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -183,24 +183,24 @@ pub struct EventTriggerNonblocking {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DisableStatement { pub enum DisableStatement {
Task(Box<DisableStatementTask>), Task(Box<DisableStatementTask>),
Block(Box<DisableStatementBlock>), Block(Box<DisableStatementBlock>),
Fork(Box<DisableStatementFork>), Fork(Box<DisableStatementFork>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DisableStatementTask { pub struct DisableStatementTask {
pub nodes: (Keyword, HierarchicalTaskIdentifier, Symbol), pub nodes: (Keyword, HierarchicalTaskIdentifier, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DisableStatementBlock { pub struct DisableStatementBlock {
pub nodes: (Keyword, HierarchicalBlockIdentifier, Symbol), pub nodes: (Keyword, HierarchicalBlockIdentifier, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DisableStatementFork { pub struct DisableStatementFork {
pub nodes: (Keyword, Keyword, Symbol), pub nodes: (Keyword, Keyword, Symbol),
} }

View File

@ -2,13 +2,13 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConcurrentAssertionItem { pub enum ConcurrentAssertionItem {
Statement(Box<ConcurrentAssertionItemStatement>), Statement(Box<ConcurrentAssertionItemStatement>),
CheckerInstantiation(Box<CheckerInstantiation>), CheckerInstantiation(Box<CheckerInstantiation>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConcurrentAssertionItemStatement { pub struct ConcurrentAssertionItemStatement {
pub nodes: ( pub nodes: (
Option<(BlockIdentifier, Symbol)>, Option<(BlockIdentifier, Symbol)>,
@ -16,7 +16,7 @@ pub struct ConcurrentAssertionItemStatement {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConcurrentAssertionStatement { pub enum ConcurrentAssertionStatement {
AssertPropertyStatement(Box<AssertPropertyStatement>), AssertPropertyStatement(Box<AssertPropertyStatement>),
AssumePropertyStatement(Box<AssumePropertyStatement>), AssumePropertyStatement(Box<AssumePropertyStatement>),
@ -25,27 +25,27 @@ pub enum ConcurrentAssertionStatement {
RestrictPropertyStatement(Box<RestrictPropertyStatement>), RestrictPropertyStatement(Box<RestrictPropertyStatement>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssertPropertyStatement { pub struct AssertPropertyStatement {
pub nodes: (Keyword, Keyword, Paren<PropertySpec>, ActionBlock), pub nodes: (Keyword, Keyword, Paren<PropertySpec>, ActionBlock),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssumePropertyStatement { pub struct AssumePropertyStatement {
pub nodes: (Keyword, Keyword, Paren<PropertySpec>, ActionBlock), pub nodes: (Keyword, Keyword, Paren<PropertySpec>, ActionBlock),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverPropertyStatement { pub struct CoverPropertyStatement {
pub nodes: (Keyword, Keyword, Paren<PropertySpec>, StatementOrNull), pub nodes: (Keyword, Keyword, Paren<PropertySpec>, StatementOrNull),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ExpectPropertyStatement { pub struct ExpectPropertyStatement {
pub nodes: (Keyword, Paren<PropertySpec>, ActionBlock), pub nodes: (Keyword, Paren<PropertySpec>, ActionBlock),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverSequenceStatement { pub struct CoverSequenceStatement {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -59,12 +59,12 @@ pub struct CoverSequenceStatement {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RestrictPropertyStatement { pub struct RestrictPropertyStatement {
pub nodes: (Keyword, Keyword, Paren<PropertySpec>, Symbol), pub nodes: (Keyword, Keyword, Paren<PropertySpec>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyInstance { pub struct PropertyInstance {
pub nodes: ( pub nodes: (
PsOrHierarchicalPropertyIdentifier, PsOrHierarchicalPropertyIdentifier,
@ -72,13 +72,13 @@ pub struct PropertyInstance {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PropertyListOfArguments { pub enum PropertyListOfArguments {
Ordered(Box<PropertyListOfArgumentsOrdered>), Ordered(Box<PropertyListOfArgumentsOrdered>),
Named(Box<PropertyListOfArgumentsNamed>), Named(Box<PropertyListOfArgumentsNamed>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyListOfArgumentsOrdered { pub struct PropertyListOfArgumentsOrdered {
pub nodes: ( pub nodes: (
List<Symbol, Option<PropertyActualArg>>, List<Symbol, Option<PropertyActualArg>>,
@ -86,25 +86,25 @@ pub struct PropertyListOfArgumentsOrdered {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyListOfArgumentsNamed { pub struct PropertyListOfArgumentsNamed {
pub nodes: (List<Symbol, (Symbol, Identifier, Paren<Option<PropertyActualArg>>)>,), pub nodes: (List<Symbol, (Symbol, Identifier, Paren<Option<PropertyActualArg>>)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PropertyActualArg { pub enum PropertyActualArg {
PropertyExpr(Box<PropertyExpr>), PropertyExpr(Box<PropertyExpr>),
SequenceActualArg(Box<SequenceActualArg>), SequenceActualArg(Box<SequenceActualArg>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum AssertionItemDeclaration { pub enum AssertionItemDeclaration {
PropertyDeclaration(Box<PropertyDeclaration>), PropertyDeclaration(Box<PropertyDeclaration>),
SequenceDeclaration(Box<SequenceDeclaration>), SequenceDeclaration(Box<SequenceDeclaration>),
LetDeclaration(Box<LetDeclaration>), LetDeclaration(Box<LetDeclaration>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyDeclaration { pub struct PropertyDeclaration {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -119,12 +119,12 @@ pub struct PropertyDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyPortList { pub struct PropertyPortList {
pub nodes: (List<Symbol, PropertyPortItem>,), pub nodes: (List<Symbol, PropertyPortItem>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyPortItem { pub struct PropertyPortItem {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -136,18 +136,18 @@ pub struct PropertyPortItem {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PropertyLvarPortDirection { pub enum PropertyLvarPortDirection {
Input(Box<Keyword>), Input(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PropertyFormalType { pub enum PropertyFormalType {
SequenceFormalType(Box<SequenceFormalType>), SequenceFormalType(Box<SequenceFormalType>),
Property(Box<Keyword>), Property(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertySpec { pub struct PropertySpec {
pub nodes: ( pub nodes: (
Option<ClockingEvent>, Option<ClockingEvent>,
@ -156,7 +156,7 @@ pub struct PropertySpec {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PropertyExpr { pub enum PropertyExpr {
SequenceExpr(Box<SequenceExpr>), SequenceExpr(Box<SequenceExpr>),
Strong(Box<PropertyExprStrong>), Strong(Box<PropertyExprStrong>),
@ -181,37 +181,37 @@ pub enum PropertyExpr {
ClockingEvent(Box<PropertyExprClockingEvent>), ClockingEvent(Box<PropertyExprClockingEvent>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprStrong { pub struct PropertyExprStrong {
pub nodes: (Keyword, Paren<SequenceExpr>), pub nodes: (Keyword, Paren<SequenceExpr>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprWeak { pub struct PropertyExprWeak {
pub nodes: (Keyword, Paren<SequenceExpr>), pub nodes: (Keyword, Paren<SequenceExpr>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprParen { pub struct PropertyExprParen {
pub nodes: (Paren<PropertyExpr>,), pub nodes: (Paren<PropertyExpr>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprNot { pub struct PropertyExprNot {
pub nodes: (Keyword, PropertyExpr), pub nodes: (Keyword, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprBinaryProperty { pub struct PropertyExprBinaryProperty {
pub nodes: (PropertyExpr, Keyword, PropertyExpr), pub nodes: (PropertyExpr, Keyword, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprBinarySequence { pub struct PropertyExprBinarySequence {
pub nodes: (SequenceExpr, Symbol, PropertyExpr), pub nodes: (SequenceExpr, Symbol, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprIf { pub struct PropertyExprIf {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -221,7 +221,7 @@ pub struct PropertyExprIf {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprCase { pub struct PropertyExprCase {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -232,17 +232,17 @@ pub struct PropertyExprCase {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprNexttime { pub struct PropertyExprNexttime {
pub nodes: (Keyword, Option<Bracket<ConstantExpression>>, PropertyExpr), pub nodes: (Keyword, Option<Bracket<ConstantExpression>>, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprSNexttime { pub struct PropertyExprSNexttime {
pub nodes: (Keyword, Option<Bracket<ConstantExpression>>, PropertyExpr), pub nodes: (Keyword, Option<Bracket<ConstantExpression>>, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprAlways { pub struct PropertyExprAlways {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -251,7 +251,7 @@ pub struct PropertyExprAlways {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprSAlways { pub struct PropertyExprSAlways {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -260,12 +260,12 @@ pub struct PropertyExprSAlways {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprEventually { pub struct PropertyExprEventually {
pub nodes: (Keyword, Bracket<ConstantRange>, PropertyExpr), pub nodes: (Keyword, Bracket<ConstantRange>, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprSEventually { pub struct PropertyExprSEventually {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -274,48 +274,48 @@ pub struct PropertyExprSEventually {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprAcceptOn { pub struct PropertyExprAcceptOn {
pub nodes: (Keyword, Paren<ExpressionOrDist>, PropertyExpr), pub nodes: (Keyword, Paren<ExpressionOrDist>, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprRejectOn { pub struct PropertyExprRejectOn {
pub nodes: (Keyword, Paren<ExpressionOrDist>, PropertyExpr), pub nodes: (Keyword, Paren<ExpressionOrDist>, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprSyncAcceptOn { pub struct PropertyExprSyncAcceptOn {
pub nodes: (Keyword, Paren<ExpressionOrDist>, PropertyExpr), pub nodes: (Keyword, Paren<ExpressionOrDist>, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprSyncRejectOn { pub struct PropertyExprSyncRejectOn {
pub nodes: (Keyword, Paren<ExpressionOrDist>, PropertyExpr), pub nodes: (Keyword, Paren<ExpressionOrDist>, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyExprClockingEvent { pub struct PropertyExprClockingEvent {
pub nodes: (ClockingEvent, PropertyExpr), pub nodes: (ClockingEvent, PropertyExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PropertyCaseItem { pub enum PropertyCaseItem {
Nondefault(Box<PropertyCaseItemNondefault>), Nondefault(Box<PropertyCaseItemNondefault>),
Default(Box<PropertyCaseItemDefault>), Default(Box<PropertyCaseItemDefault>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyCaseItemNondefault { pub struct PropertyCaseItemNondefault {
pub nodes: (List<Symbol, ExpressionOrDist>, Symbol, PropertyExpr, Symbol), pub nodes: (List<Symbol, ExpressionOrDist>, Symbol, PropertyExpr, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyCaseItemDefault { pub struct PropertyCaseItemDefault {
pub nodes: (Keyword, Option<Symbol>, PropertyExpr, Symbol), pub nodes: (Keyword, Option<Symbol>, PropertyExpr, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceDeclaration { pub struct SequenceDeclaration {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -330,12 +330,12 @@ pub struct SequenceDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequencePortList { pub struct SequencePortList {
pub nodes: (List<Symbol, SequencePortItem>,), pub nodes: (List<Symbol, SequencePortItem>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequencePortItem { pub struct SequencePortItem {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -347,21 +347,21 @@ pub struct SequencePortItem {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SequenceLvarPortDirection { pub enum SequenceLvarPortDirection {
Input(Box<Keyword>), Input(Box<Keyword>),
Inout(Box<Keyword>), Inout(Box<Keyword>),
Output(Box<Keyword>), Output(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SequenceFormalType { pub enum SequenceFormalType {
DataTypeOrImplicit(Box<DataTypeOrImplicit>), DataTypeOrImplicit(Box<DataTypeOrImplicit>),
Sequence(Box<Keyword>), Sequence(Box<Keyword>),
Untyped(Box<Keyword>), Untyped(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SequenceExpr { pub enum SequenceExpr {
CycleDelayExpr(Box<SequenceExprCycleDelayExpr>), CycleDelayExpr(Box<SequenceExprCycleDelayExpr>),
ExprCycleDelayExpr(Box<SequenceExprExprCycleDelayExpr>), ExprCycleDelayExpr(Box<SequenceExprExprCycleDelayExpr>),
@ -374,7 +374,7 @@ pub enum SequenceExpr {
ClockingEvent(Box<SequenceExprClockingEvent>), ClockingEvent(Box<SequenceExprClockingEvent>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceExprCycleDelayExpr { pub struct SequenceExprCycleDelayExpr {
pub nodes: ( pub nodes: (
CycleDelayRange, CycleDelayRange,
@ -383,7 +383,7 @@ pub struct SequenceExprCycleDelayExpr {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceExprExprCycleDelayExpr { pub struct SequenceExprExprCycleDelayExpr {
pub nodes: ( pub nodes: (
SequenceExpr, SequenceExpr,
@ -393,17 +393,17 @@ pub struct SequenceExprExprCycleDelayExpr {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceExprExpression { pub struct SequenceExprExpression {
pub nodes: (ExpressionOrDist, Option<BooleanAbbrev>), pub nodes: (ExpressionOrDist, Option<BooleanAbbrev>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceExprInstance { pub struct SequenceExprInstance {
pub nodes: (SequenceInstance, Option<SequenceAbbrev>), pub nodes: (SequenceInstance, Option<SequenceAbbrev>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceExprParen { pub struct SequenceExprParen {
pub nodes: ( pub nodes: (
Paren<(SequenceExpr, Vec<(Symbol, SequenceMatchItem)>)>, Paren<(SequenceExpr, Vec<(Symbol, SequenceMatchItem)>)>,
@ -411,12 +411,12 @@ pub struct SequenceExprParen {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceExprBinary { pub struct SequenceExprBinary {
pub nodes: (SequenceExpr, Keyword, SequenceExpr), pub nodes: (SequenceExpr, Keyword, SequenceExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceExprFirstMatch { pub struct SequenceExprFirstMatch {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -424,17 +424,17 @@ pub struct SequenceExprFirstMatch {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceExprThroughout { pub struct SequenceExprThroughout {
pub nodes: (ExpressionOrDist, Keyword, SequenceExpr), pub nodes: (ExpressionOrDist, Keyword, SequenceExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceExprClockingEvent { pub struct SequenceExprClockingEvent {
pub nodes: (ClockingEvent, SequenceExpr), pub nodes: (ClockingEvent, SequenceExpr),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CycleDelayRange { pub enum CycleDelayRange {
Primary(Box<CycleDelayRangePrimary>), Primary(Box<CycleDelayRangePrimary>),
Expression(Box<CycleDelayRangeExpression>), Expression(Box<CycleDelayRangeExpression>),
@ -442,39 +442,39 @@ pub enum CycleDelayRange {
Plus(Box<CycleDelayRangePlus>), Plus(Box<CycleDelayRangePlus>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CycleDelayRangePrimary { pub struct CycleDelayRangePrimary {
pub nodes: (Symbol, ConstantPrimary), pub nodes: (Symbol, ConstantPrimary),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CycleDelayRangeExpression { pub struct CycleDelayRangeExpression {
pub nodes: (Symbol, Bracket<CycleDelayConstRangeExpression>), pub nodes: (Symbol, Bracket<CycleDelayConstRangeExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CycleDelayRangeAsterisk { pub struct CycleDelayRangeAsterisk {
pub nodes: (Symbol, Bracket<Symbol>), pub nodes: (Symbol, Bracket<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CycleDelayRangePlus { pub struct CycleDelayRangePlus {
pub nodes: (Symbol, Bracket<Symbol>), pub nodes: (Symbol, Bracket<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceMethodCall { pub struct SequenceMethodCall {
pub nodes: (SequenceInstance, Symbol, MethodIdentifier), pub nodes: (SequenceInstance, Symbol, MethodIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SequenceMatchItem { pub enum SequenceMatchItem {
OperatorAssignment(Box<OperatorAssignment>), OperatorAssignment(Box<OperatorAssignment>),
IncOrDecExpression(Box<IncOrDecExpression>), IncOrDecExpression(Box<IncOrDecExpression>),
SubroutineCall(Box<SubroutineCall>), SubroutineCall(Box<SubroutineCall>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceInstance { pub struct SequenceInstance {
pub nodes: ( pub nodes: (
PsOrHierarchicalSequenceIdentifier, PsOrHierarchicalSequenceIdentifier,
@ -482,13 +482,13 @@ pub struct SequenceInstance {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SequenceListOfArguments { pub enum SequenceListOfArguments {
Ordered(Box<SequenceListOfArgumentsOrdered>), Ordered(Box<SequenceListOfArgumentsOrdered>),
Named(Box<SequenceListOfArgumentsNamed>), Named(Box<SequenceListOfArgumentsNamed>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceListOfArgumentsOrdered { pub struct SequenceListOfArgumentsOrdered {
pub nodes: ( pub nodes: (
List<Symbol, Option<SequenceActualArg>>, List<Symbol, Option<SequenceActualArg>>,
@ -496,89 +496,89 @@ pub struct SequenceListOfArgumentsOrdered {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceListOfArgumentsNamed { pub struct SequenceListOfArgumentsNamed {
pub nodes: (List<Symbol, (Symbol, Identifier, Paren<Option<SequenceActualArg>>)>,), pub nodes: (List<Symbol, (Symbol, Identifier, Paren<Option<SequenceActualArg>>)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SequenceActualArg { pub enum SequenceActualArg {
EventExpression(Box<EventExpression>), EventExpression(Box<EventExpression>),
SequenceExpr(Box<SequenceExpr>), SequenceExpr(Box<SequenceExpr>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BooleanAbbrev { pub enum BooleanAbbrev {
ConsecutiveRepetition(Box<ConsecutiveRepetition>), ConsecutiveRepetition(Box<ConsecutiveRepetition>),
NonConsecutiveRepetition(Box<NonConsecutiveRepetition>), NonConsecutiveRepetition(Box<NonConsecutiveRepetition>),
GotoRepetition(Box<GotoRepetition>), GotoRepetition(Box<GotoRepetition>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceAbbrev { pub struct SequenceAbbrev {
pub nodes: (ConsecutiveRepetition,), pub nodes: (ConsecutiveRepetition,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConsecutiveRepetition { pub enum ConsecutiveRepetition {
Expression(Box<ConsecutiveRepetitionExpression>), Expression(Box<ConsecutiveRepetitionExpression>),
Asterisk(Box<ConsecutiveRepetitionAsterisk>), Asterisk(Box<ConsecutiveRepetitionAsterisk>),
Plus(Box<ConsecutiveRepetitionPlus>), Plus(Box<ConsecutiveRepetitionPlus>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConsecutiveRepetitionExpression { pub struct ConsecutiveRepetitionExpression {
pub nodes: (Bracket<(Symbol, ConstOrRangeExpression)>,), pub nodes: (Bracket<(Symbol, ConstOrRangeExpression)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConsecutiveRepetitionAsterisk { pub struct ConsecutiveRepetitionAsterisk {
pub nodes: (Bracket<Symbol>,), pub nodes: (Bracket<Symbol>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConsecutiveRepetitionPlus { pub struct ConsecutiveRepetitionPlus {
pub nodes: (Bracket<Symbol>,), pub nodes: (Bracket<Symbol>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonConsecutiveRepetition { pub struct NonConsecutiveRepetition {
pub nodes: (Bracket<(Symbol, ConstOrRangeExpression)>,), pub nodes: (Bracket<(Symbol, ConstOrRangeExpression)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GotoRepetition { pub struct GotoRepetition {
pub nodes: (Bracket<(Symbol, ConstOrRangeExpression)>,), pub nodes: (Bracket<(Symbol, ConstOrRangeExpression)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstOrRangeExpression { pub enum ConstOrRangeExpression {
ConstantExpression(Box<ConstantExpression>), ConstantExpression(Box<ConstantExpression>),
CycleDelayConstRangeExpression(Box<CycleDelayConstRangeExpression>), CycleDelayConstRangeExpression(Box<CycleDelayConstRangeExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CycleDelayConstRangeExpression { pub enum CycleDelayConstRangeExpression {
Binary(Box<CycleDelayConstRangeExpressionBinary>), Binary(Box<CycleDelayConstRangeExpressionBinary>),
Dollar(Box<CycleDelayConstRangeExpressionDollar>), Dollar(Box<CycleDelayConstRangeExpressionDollar>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CycleDelayConstRangeExpressionBinary { pub struct CycleDelayConstRangeExpressionBinary {
pub nodes: (ConstantExpression, Symbol, ConstantExpression), pub nodes: (ConstantExpression, Symbol, ConstantExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CycleDelayConstRangeExpressionDollar { pub struct CycleDelayConstRangeExpressionDollar {
pub nodes: (ConstantExpression, Symbol, Symbol), pub nodes: (ConstantExpression, Symbol, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ExpressionOrDist { pub struct ExpressionOrDist {
pub nodes: (Expression, Option<(Keyword, Brace<DistList>)>), pub nodes: (Expression, Option<(Keyword, Brace<DistList>)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssertionVariableDeclaration { pub struct AssertionVariableDeclaration {
pub nodes: (VarDataType, ListOfVariableDeclAssignments, Symbol), pub nodes: (VarDataType, ListOfVariableDeclAssignments, Symbol),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BlockItemDeclaration { pub enum BlockItemDeclaration {
Data(Box<BlockItemDeclarationData>), Data(Box<BlockItemDeclarationData>),
LocalParameter(Box<BlockItemDeclarationLocalParameter>), LocalParameter(Box<BlockItemDeclarationLocalParameter>),
@ -10,22 +10,22 @@ pub enum BlockItemDeclaration {
Let(Box<BlockItemDeclarationLet>), Let(Box<BlockItemDeclarationLet>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockItemDeclarationData { pub struct BlockItemDeclarationData {
pub nodes: (Vec<AttributeInstance>, DataDeclaration), pub nodes: (Vec<AttributeInstance>, DataDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockItemDeclarationLocalParameter { pub struct BlockItemDeclarationLocalParameter {
pub nodes: (Vec<AttributeInstance>, LocalParameterDeclaration, Symbol), pub nodes: (Vec<AttributeInstance>, LocalParameterDeclaration, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockItemDeclarationParameter { pub struct BlockItemDeclarationParameter {
pub nodes: (Vec<AttributeInstance>, ParameterDeclaration, Symbol), pub nodes: (Vec<AttributeInstance>, ParameterDeclaration, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockItemDeclarationLet { pub struct BlockItemDeclarationLet {
pub nodes: (Vec<AttributeInstance>, LetDeclaration), pub nodes: (Vec<AttributeInstance>, LetDeclaration),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CovergroupDeclaration { pub struct CovergroupDeclaration {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -16,34 +16,34 @@ pub struct CovergroupDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CoverageSpecOrOption { pub enum CoverageSpecOrOption {
Spec(Box<CoverageSpecOrOptionSpec>), Spec(Box<CoverageSpecOrOptionSpec>),
Option(Box<CoverageSpecOrOptionOption>), Option(Box<CoverageSpecOrOptionOption>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverageSpecOrOptionSpec { pub struct CoverageSpecOrOptionSpec {
pub nodes: (Vec<AttributeInstance>, CoverageSpec), pub nodes: (Vec<AttributeInstance>, CoverageSpec),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverageSpecOrOptionOption { pub struct CoverageSpecOrOptionOption {
pub nodes: (Vec<AttributeInstance>, CoverageOption, Symbol), pub nodes: (Vec<AttributeInstance>, CoverageOption, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CoverageOption { pub enum CoverageOption {
Option(Box<CoverageOptionOption>), Option(Box<CoverageOptionOption>),
TypeOption(Box<CoverageOptionTypeOption>), TypeOption(Box<CoverageOptionTypeOption>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverageOptionOption { pub struct CoverageOptionOption {
pub nodes: (Keyword, Symbol, MemberIdentifier, Symbol, Expression), pub nodes: (Keyword, Symbol, MemberIdentifier, Symbol, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverageOptionTypeOption { pub struct CoverageOptionTypeOption {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -54,70 +54,70 @@ pub struct CoverageOptionTypeOption {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CoverageSpec { pub enum CoverageSpec {
CoverPoint(Box<CoverPoint>), CoverPoint(Box<CoverPoint>),
CoverCross(Box<CoverCross>), CoverCross(Box<CoverCross>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CoverageEvent { pub enum CoverageEvent {
ClockingEvent(Box<ClockingEvent>), ClockingEvent(Box<ClockingEvent>),
Sample(Box<CoverageEventSample>), Sample(Box<CoverageEventSample>),
At(Box<CoverageEventAt>), At(Box<CoverageEventAt>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverageEventSample { pub struct CoverageEventSample {
pub nodes: (Keyword, Keyword, Keyword, Paren<Option<TfPortList>>), pub nodes: (Keyword, Keyword, Keyword, Paren<Option<TfPortList>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverageEventAt { pub struct CoverageEventAt {
pub nodes: (Symbol, Paren<BlockEventExpression>), pub nodes: (Symbol, Paren<BlockEventExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BlockEventExpression { pub enum BlockEventExpression {
Or(Box<BlockEventExpressionOr>), Or(Box<BlockEventExpressionOr>),
Begin(Box<BlockEventExpressionBegin>), Begin(Box<BlockEventExpressionBegin>),
End(Box<BlockEventExpressionEnd>), End(Box<BlockEventExpressionEnd>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockEventExpressionOr { pub struct BlockEventExpressionOr {
pub nodes: (BlockEventExpression, Keyword, BlockEventExpression), pub nodes: (BlockEventExpression, Keyword, BlockEventExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockEventExpressionBegin { pub struct BlockEventExpressionBegin {
pub nodes: (Keyword, HierarchicalBtfIdentifier), pub nodes: (Keyword, HierarchicalBtfIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockEventExpressionEnd { pub struct BlockEventExpressionEnd {
pub nodes: (Keyword, HierarchicalBtfIdentifier), pub nodes: (Keyword, HierarchicalBtfIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum HierarchicalBtfIdentifier { pub enum HierarchicalBtfIdentifier {
HierarchicalTfIdentifier(Box<HierarchicalTfIdentifier>), HierarchicalTfIdentifier(Box<HierarchicalTfIdentifier>),
HierarchicalBlockIdentifier(Box<HierarchicalBlockIdentifier>), HierarchicalBlockIdentifier(Box<HierarchicalBlockIdentifier>),
Method(Box<HierarchicalBtfIdentifierMethod>), Method(Box<HierarchicalBtfIdentifierMethod>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalBtfIdentifierMethod { pub struct HierarchicalBtfIdentifierMethod {
pub nodes: (Option<HierarchicalIdentifierOrClassScope>, MethodIdentifier), pub nodes: (Option<HierarchicalIdentifierOrClassScope>, MethodIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum HierarchicalIdentifierOrClassScope { pub enum HierarchicalIdentifierOrClassScope {
HierarchicalIdentifier(Box<(HierarchicalIdentifier, Symbol)>), HierarchicalIdentifier(Box<(HierarchicalIdentifier, Symbol)>),
ClassScope(Box<ClassScope>), ClassScope(Box<ClassScope>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverPoint { pub struct CoverPoint {
pub nodes: ( pub nodes: (
Option<(Option<DataTypeOrImplicit>, CoverPointIdentifier, Symbol)>, Option<(Option<DataTypeOrImplicit>, CoverPointIdentifier, Symbol)>,
@ -128,18 +128,18 @@ pub struct CoverPoint {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BinsOrEmpty { pub enum BinsOrEmpty {
NonEmpty(Box<BinsOrEmptyNonEmpty>), NonEmpty(Box<BinsOrEmptyNonEmpty>),
Empty(Box<Symbol>), Empty(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsOrEmptyNonEmpty { pub struct BinsOrEmptyNonEmpty {
pub nodes: (Brace<(Vec<AttributeInstance>, Vec<(BinsOrOptions, Symbol)>)>,), pub nodes: (Brace<(Vec<AttributeInstance>, Vec<(BinsOrOptions, Symbol)>)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BinsOrOptions { pub enum BinsOrOptions {
CoverageOption(Box<CoverageOption>), CoverageOption(Box<CoverageOption>),
Covergroup(Box<BinsOrOptionsCovergroup>), Covergroup(Box<BinsOrOptionsCovergroup>),
@ -150,7 +150,7 @@ pub enum BinsOrOptions {
DefaultSequence(Box<BinsOrOptionsDefaultSequence>), DefaultSequence(Box<BinsOrOptionsDefaultSequence>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsOrOptionsCovergroup { pub struct BinsOrOptionsCovergroup {
pub nodes: ( pub nodes: (
Option<Wildcard>, Option<Wildcard>,
@ -164,12 +164,12 @@ pub struct BinsOrOptionsCovergroup {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Wildcard { pub struct Wildcard {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsOrOptionsCoverPoint { pub struct BinsOrOptionsCoverPoint {
pub nodes: ( pub nodes: (
Option<Wildcard>, Option<Wildcard>,
@ -184,7 +184,7 @@ pub struct BinsOrOptionsCoverPoint {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsOrOptionsSetCovergroup { pub struct BinsOrOptionsSetCovergroup {
pub nodes: ( pub nodes: (
Option<Wildcard>, Option<Wildcard>,
@ -197,7 +197,7 @@ pub struct BinsOrOptionsSetCovergroup {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsOrOptionsTransList { pub struct BinsOrOptionsTransList {
pub nodes: ( pub nodes: (
Option<Wildcard>, Option<Wildcard>,
@ -210,7 +210,7 @@ pub struct BinsOrOptionsTransList {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsOrOptionsDefault { pub struct BinsOrOptionsDefault {
pub nodes: ( pub nodes: (
BinsKeyword, BinsKeyword,
@ -222,7 +222,7 @@ pub struct BinsOrOptionsDefault {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsOrOptionsDefaultSequence { pub struct BinsOrOptionsDefaultSequence {
pub nodes: ( pub nodes: (
BinsKeyword, BinsKeyword,
@ -234,24 +234,24 @@ pub struct BinsOrOptionsDefaultSequence {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BinsKeyword { pub enum BinsKeyword {
Bins(Box<Keyword>), Bins(Box<Keyword>),
IllegalBins(Box<Keyword>), IllegalBins(Box<Keyword>),
IgnoreBins(Box<Keyword>), IgnoreBins(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TransList { pub struct TransList {
pub nodes: (List<Symbol, Paren<TransSet>>,), pub nodes: (List<Symbol, Paren<TransSet>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TransSet { pub struct TransSet {
pub nodes: (List<Symbol, TransRangeList>,), pub nodes: (List<Symbol, TransRangeList>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TransRangeList { pub enum TransRangeList {
TransItem(Box<TransItem>), TransItem(Box<TransItem>),
Asterisk(Box<TransRangeListAsterisk>), Asterisk(Box<TransRangeListAsterisk>),
@ -259,38 +259,38 @@ pub enum TransRangeList {
Equal(Box<TransRangeListEqual>), Equal(Box<TransRangeListEqual>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TransRangeListAsterisk { pub struct TransRangeListAsterisk {
pub nodes: (TransItem, Bracket<(Symbol, RepeatRange)>), pub nodes: (TransItem, Bracket<(Symbol, RepeatRange)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TransRangeListArrow { pub struct TransRangeListArrow {
pub nodes: (TransItem, Bracket<(Symbol, RepeatRange)>), pub nodes: (TransItem, Bracket<(Symbol, RepeatRange)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TransRangeListEqual { pub struct TransRangeListEqual {
pub nodes: (TransItem, Bracket<(Symbol, RepeatRange)>), pub nodes: (TransItem, Bracket<(Symbol, RepeatRange)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TransItem { pub struct TransItem {
pub nodes: (CovergroupRangeList,), pub nodes: (CovergroupRangeList,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum RepeatRange { pub enum RepeatRange {
CovergroupExpression(Box<CovergroupExpression>), CovergroupExpression(Box<CovergroupExpression>),
Binary(Box<RepeatRangeBinary>), Binary(Box<RepeatRangeBinary>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RepeatRangeBinary { pub struct RepeatRangeBinary {
pub nodes: (CovergroupExpression, Symbol, CovergroupExpression), pub nodes: (CovergroupExpression, Symbol, CovergroupExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverCross { pub struct CoverCross {
pub nodes: ( pub nodes: (
Option<(CrossIdentifier, Symbol)>, Option<(CrossIdentifier, Symbol)>,
@ -301,51 +301,51 @@ pub struct CoverCross {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfCrossItems { pub struct ListOfCrossItems {
pub nodes: (CrossItem, Symbol, List<Symbol, CrossItem>), pub nodes: (CrossItem, Symbol, List<Symbol, CrossItem>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CrossItem { pub enum CrossItem {
CoverPointIdentifier(Box<CoverPointIdentifier>), CoverPointIdentifier(Box<CoverPointIdentifier>),
VariableIdentifier(Box<VariableIdentifier>), VariableIdentifier(Box<VariableIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CrossBody { pub enum CrossBody {
NonEmpty(Box<CrossBodyNonEmpty>), NonEmpty(Box<CrossBodyNonEmpty>),
Empty(Box<Symbol>), Empty(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CrossBodyNonEmpty { pub struct CrossBodyNonEmpty {
pub nodes: (Brace<Vec<CrossBodyItem>>,), pub nodes: (Brace<Vec<CrossBodyItem>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CrossBodyItem { pub enum CrossBodyItem {
FunctionDeclaration(Box<FunctionDeclaration>), FunctionDeclaration(Box<FunctionDeclaration>),
BinsSelectionOrOption(Box<(BinsSelectionOrOption, Symbol)>), BinsSelectionOrOption(Box<(BinsSelectionOrOption, Symbol)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BinsSelectionOrOption { pub enum BinsSelectionOrOption {
Coverage(Box<BinsSelectionOrOptionCoverage>), Coverage(Box<BinsSelectionOrOptionCoverage>),
Bins(Box<BinsSelectionOrOptionBins>), Bins(Box<BinsSelectionOrOptionBins>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsSelectionOrOptionCoverage { pub struct BinsSelectionOrOptionCoverage {
pub nodes: (Vec<AttributeInstance>, CoverageOption), pub nodes: (Vec<AttributeInstance>, CoverageOption),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsSelectionOrOptionBins { pub struct BinsSelectionOrOptionBins {
pub nodes: (Vec<AttributeInstance>, BinsSelection), pub nodes: (Vec<AttributeInstance>, BinsSelection),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsSelection { pub struct BinsSelection {
pub nodes: ( pub nodes: (
BinsKeyword, BinsKeyword,
@ -356,7 +356,7 @@ pub struct BinsSelection {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SelectExpression { pub enum SelectExpression {
SelectCondition(Box<SelectCondition>), SelectCondition(Box<SelectCondition>),
Not(Box<SelectExpressionNot>), Not(Box<SelectExpressionNot>),
@ -368,27 +368,27 @@ pub enum SelectExpression {
CrossSet(Box<SelectExpressionCrossSet>), CrossSet(Box<SelectExpressionCrossSet>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SelectExpressionNot { pub struct SelectExpressionNot {
pub nodes: (Symbol, SelectCondition), pub nodes: (Symbol, SelectCondition),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SelectExpressionAnd { pub struct SelectExpressionAnd {
pub nodes: (SelectExpression, Symbol, SelectExpression), pub nodes: (SelectExpression, Symbol, SelectExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SelectExpressionOr { pub struct SelectExpressionOr {
pub nodes: (SelectExpression, Symbol, SelectExpression), pub nodes: (SelectExpression, Symbol, SelectExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SelectExpressionParen { pub struct SelectExpressionParen {
pub nodes: (Paren<SelectExpression>,), pub nodes: (Paren<SelectExpression>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SelectExpressionWith { pub struct SelectExpressionWith {
pub nodes: ( pub nodes: (
SelectExpression, SelectExpression,
@ -398,7 +398,7 @@ pub struct SelectExpressionWith {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SelectExpressionCrossSet { pub struct SelectExpressionCrossSet {
pub nodes: ( pub nodes: (
CrossSetExpression, CrossSetExpression,
@ -406,7 +406,7 @@ pub struct SelectExpressionCrossSet {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SelectCondition { pub struct SelectCondition {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -415,54 +415,54 @@ pub struct SelectCondition {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BinsExpression { pub enum BinsExpression {
VariableIdentifier(Box<VariableIdentifier>), VariableIdentifier(Box<VariableIdentifier>),
CoverPoint(Box<BinsExpressionCoverPoint>), CoverPoint(Box<BinsExpressionCoverPoint>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinsExpressionCoverPoint { pub struct BinsExpressionCoverPoint {
pub nodes: (CoverPointIdentifier, Option<(Symbol, BinIdentifier)>), pub nodes: (CoverPointIdentifier, Option<(Symbol, BinIdentifier)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CovergroupRangeList { pub struct CovergroupRangeList {
pub nodes: (List<Symbol, CovergroupValueRange>,), pub nodes: (List<Symbol, CovergroupValueRange>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CovergroupValueRange { pub enum CovergroupValueRange {
CovergroupExpression(Box<CovergroupExpression>), CovergroupExpression(Box<CovergroupExpression>),
Binary(Box<CovergroupValueRangeBinary>), Binary(Box<CovergroupValueRangeBinary>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CovergroupValueRangeBinary { pub struct CovergroupValueRangeBinary {
pub nodes: (Bracket<(CovergroupExpression, Symbol, CovergroupExpression)>,), pub nodes: (Bracket<(CovergroupExpression, Symbol, CovergroupExpression)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct WithCovergroupExpression { pub struct WithCovergroupExpression {
pub nodes: (CovergroupExpression,), pub nodes: (CovergroupExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SetCovergroupExpression { pub struct SetCovergroupExpression {
pub nodes: (CovergroupExpression,), pub nodes: (CovergroupExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IntegerCovergroupExpression { pub struct IntegerCovergroupExpression {
pub nodes: (CovergroupExpression,), pub nodes: (CovergroupExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CrossSetExpression { pub struct CrossSetExpression {
pub nodes: (CovergroupExpression,), pub nodes: (CovergroupExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CovergroupExpression { pub struct CovergroupExpression {
pub nodes: (Expression,), pub nodes: (Expression,),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DefparamAssignment { pub struct DefparamAssignment {
pub nodes: ( pub nodes: (
HierarchicalParameterIdentifier, HierarchicalParameterIdentifier,
@ -11,7 +11,7 @@ pub struct DefparamAssignment {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetDeclAssignment { pub struct NetDeclAssignment {
pub nodes: ( pub nodes: (
NetIdentifier, NetIdentifier,
@ -20,7 +20,7 @@ pub struct NetDeclAssignment {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParamAssignment { pub struct ParamAssignment {
pub nodes: ( pub nodes: (
ParameterIdentifier, ParameterIdentifier,
@ -29,29 +29,29 @@ pub struct ParamAssignment {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SpecparamAssignment { pub enum SpecparamAssignment {
Mintypmax(Box<SpecparamAssignmentMintypmax>), Mintypmax(Box<SpecparamAssignmentMintypmax>),
PulseControlSpecparam(Box<PulseControlSpecparam>), PulseControlSpecparam(Box<PulseControlSpecparam>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SpecparamAssignmentMintypmax { pub struct SpecparamAssignmentMintypmax {
pub nodes: (SpecparamIdentifier, Symbol, ConstantMintypmaxExpression), pub nodes: (SpecparamIdentifier, Symbol, ConstantMintypmaxExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TypeAssignment { pub struct TypeAssignment {
pub nodes: (TypeIdentifier, Option<(Symbol, DataType)>), pub nodes: (TypeIdentifier, Option<(Symbol, DataType)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PulseControlSpecparam { pub enum PulseControlSpecparam {
WithoutDescriptor(Box<PulseControlSpecparamWithoutDescriptor>), WithoutDescriptor(Box<PulseControlSpecparamWithoutDescriptor>),
WithDescriptor(Box<PulseControlSpecparamWithDescriptor>), WithDescriptor(Box<PulseControlSpecparamWithDescriptor>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PulseControlSpecparamWithoutDescriptor { pub struct PulseControlSpecparamWithoutDescriptor {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -60,7 +60,7 @@ pub struct PulseControlSpecparamWithoutDescriptor {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PulseControlSpecparamWithDescriptor { pub struct PulseControlSpecparamWithDescriptor {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -72,29 +72,29 @@ pub struct PulseControlSpecparamWithDescriptor {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ErrorLimitValue { pub struct ErrorLimitValue {
pub nodes: (LimitValue,), pub nodes: (LimitValue,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RejectLimitValue { pub struct RejectLimitValue {
pub nodes: (LimitValue,), pub nodes: (LimitValue,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LimitValue { pub struct LimitValue {
pub nodes: (ConstantMintypmaxExpression,), pub nodes: (ConstantMintypmaxExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum VariableDeclAssignment { pub enum VariableDeclAssignment {
Variable(Box<VariableDeclAssignmentVariable>), Variable(Box<VariableDeclAssignmentVariable>),
DynamicArray(Box<VariableDeclAssignmentDynamicArray>), DynamicArray(Box<VariableDeclAssignmentDynamicArray>),
Class(Box<VariableDeclAssignmentClass>), Class(Box<VariableDeclAssignmentClass>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariableDeclAssignmentVariable { pub struct VariableDeclAssignmentVariable {
pub nodes: ( pub nodes: (
VariableIdentifier, VariableIdentifier,
@ -103,7 +103,7 @@ pub struct VariableDeclAssignmentVariable {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariableDeclAssignmentDynamicArray { pub struct VariableDeclAssignmentDynamicArray {
pub nodes: ( pub nodes: (
DynamicArrayVariableIdentifier, DynamicArrayVariableIdentifier,
@ -113,28 +113,28 @@ pub struct VariableDeclAssignmentDynamicArray {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariableDeclAssignmentClass { pub struct VariableDeclAssignmentClass {
pub nodes: (ClassVariableIdentifier, (Symbol, ClassNew)), pub nodes: (ClassVariableIdentifier, (Symbol, ClassNew)),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClassNew { pub enum ClassNew {
Argument(Box<ClassNewArgument>), Argument(Box<ClassNewArgument>),
Expression(Box<ClassNewExpression>), Expression(Box<ClassNewExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassNewArgument { pub struct ClassNewArgument {
pub nodes: (Option<ClassScope>, Keyword, Option<Paren<ListOfArguments>>), pub nodes: (Option<ClassScope>, Keyword, Option<Paren<ListOfArguments>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassNewExpression { pub struct ClassNewExpression {
pub nodes: (Keyword, Expression), pub nodes: (Keyword, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DynamicArrayNew { pub struct DynamicArrayNew {
pub nodes: (Keyword, Bracket<Expression>, Option<Paren<Expression>>), pub nodes: (Keyword, Bracket<Expression>, Option<Paren<Expression>>),
} }

View File

@ -2,47 +2,47 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfDefparamAssignments { pub struct ListOfDefparamAssignments {
pub nodes: (List<Symbol, DefparamAssignment>,), pub nodes: (List<Symbol, DefparamAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfGenvarIdentifiers { pub struct ListOfGenvarIdentifiers {
pub nodes: (List<Symbol, GenvarIdentifier>,), pub nodes: (List<Symbol, GenvarIdentifier>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfInterfaceIdentifiers { pub struct ListOfInterfaceIdentifiers {
pub nodes: (List<Symbol, (InterfaceIdentifier, Vec<UnpackedDimension>)>,), pub nodes: (List<Symbol, (InterfaceIdentifier, Vec<UnpackedDimension>)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfNetDeclAssignments { pub struct ListOfNetDeclAssignments {
pub nodes: (List<Symbol, NetDeclAssignment>,), pub nodes: (List<Symbol, NetDeclAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfParamAssignments { pub struct ListOfParamAssignments {
pub nodes: (List<Symbol, ParamAssignment>,), pub nodes: (List<Symbol, ParamAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfPortIdentifiers { pub struct ListOfPortIdentifiers {
pub nodes: (List<Symbol, (PortIdentifier, Vec<UnpackedDimension>)>,), pub nodes: (List<Symbol, (PortIdentifier, Vec<UnpackedDimension>)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfUdpPortIdentifiers { pub struct ListOfUdpPortIdentifiers {
pub nodes: (List<Symbol, PortIdentifier>,), pub nodes: (List<Symbol, PortIdentifier>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfSpecparamAssignments { pub struct ListOfSpecparamAssignments {
pub nodes: (List<Symbol, SpecparamAssignment>,), pub nodes: (List<Symbol, SpecparamAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfTfVariableIdentifiers { pub struct ListOfTfVariableIdentifiers {
pub nodes: ( pub nodes: (
List< List<
@ -56,22 +56,22 @@ pub struct ListOfTfVariableIdentifiers {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfTypeAssignments { pub struct ListOfTypeAssignments {
pub nodes: (List<Symbol, TypeAssignment>,), pub nodes: (List<Symbol, TypeAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfVariableDeclAssignments { pub struct ListOfVariableDeclAssignments {
pub nodes: (List<Symbol, VariableDeclAssignment>,), pub nodes: (List<Symbol, VariableDeclAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfVariableIdentifiers { pub struct ListOfVariableIdentifiers {
pub nodes: (List<Symbol, (VariableIdentifier, Vec<VariableDimension>)>,), pub nodes: (List<Symbol, (VariableIdentifier, Vec<VariableDimension>)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfVariablePortIdentifiers { pub struct ListOfVariablePortIdentifiers {
pub nodes: ( pub nodes: (
List< List<

View File

@ -2,50 +2,50 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum UnpackedDimension { pub enum UnpackedDimension {
Range(Box<UnpackedDimensionRange>), Range(Box<UnpackedDimensionRange>),
Expression(Box<UnpackedDimensionExpression>), Expression(Box<UnpackedDimensionExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UnpackedDimensionRange { pub struct UnpackedDimensionRange {
pub nodes: (Bracket<ConstantRange>,), pub nodes: (Bracket<ConstantRange>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UnpackedDimensionExpression { pub struct UnpackedDimensionExpression {
pub nodes: (Bracket<ConstantExpression>,), pub nodes: (Bracket<ConstantExpression>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PackedDimension { pub enum PackedDimension {
Range(Box<PackedDimensionRange>), Range(Box<PackedDimensionRange>),
UnsizedDimension(Box<UnsizedDimension>), UnsizedDimension(Box<UnsizedDimension>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PackedDimensionRange { pub struct PackedDimensionRange {
pub nodes: (Bracket<ConstantRange>,), pub nodes: (Bracket<ConstantRange>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum AssociativeDimension { pub enum AssociativeDimension {
DataType(Box<AssociativeDimensionDataType>), DataType(Box<AssociativeDimensionDataType>),
Asterisk(Box<AssociativeDimensionAsterisk>), Asterisk(Box<AssociativeDimensionAsterisk>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssociativeDimensionDataType { pub struct AssociativeDimensionDataType {
pub nodes: (Bracket<DataType>,), pub nodes: (Bracket<DataType>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AssociativeDimensionAsterisk { pub struct AssociativeDimensionAsterisk {
pub nodes: (Bracket<Symbol>,), pub nodes: (Bracket<Symbol>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum VariableDimension { pub enum VariableDimension {
UnsizedDimension(Box<UnsizedDimension>), UnsizedDimension(Box<UnsizedDimension>),
UnpackedDimension(Box<UnpackedDimension>), UnpackedDimension(Box<UnpackedDimension>),
@ -53,12 +53,12 @@ pub enum VariableDimension {
QueueDimension(Box<QueueDimension>), QueueDimension(Box<QueueDimension>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct QueueDimension { pub struct QueueDimension {
pub nodes: (Bracket<(Symbol, Option<(Symbol, ConstantExpression)>)>,), pub nodes: (Bracket<(Symbol, Option<(Symbol, ConstantExpression)>)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UnsizedDimension { pub struct UnsizedDimension {
pub nodes: (Symbol, Symbol), pub nodes: (Symbol, Symbol),
} }

View File

@ -2,18 +2,18 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Delay3 { pub enum Delay3 {
Single(Box<Delay3Single>), Single(Box<Delay3Single>),
Mintypmax(Box<Delay3Mintypmax>), Mintypmax(Box<Delay3Mintypmax>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Delay3Single { pub struct Delay3Single {
pub nodes: (Symbol, DelayValue), pub nodes: (Symbol, DelayValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Delay3Mintypmax { pub struct Delay3Mintypmax {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -28,18 +28,18 @@ pub struct Delay3Mintypmax {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Delay2 { pub enum Delay2 {
Single(Box<Delay2Single>), Single(Box<Delay2Single>),
Mintypmax(Box<Delay2Mintypmax>), Mintypmax(Box<Delay2Mintypmax>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Delay2Single { pub struct Delay2Single {
pub nodes: (Symbol, DelayValue), pub nodes: (Symbol, DelayValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Delay2Mintypmax { pub struct Delay2Mintypmax {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -47,7 +47,7 @@ pub struct Delay2Mintypmax {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DelayValue { pub enum DelayValue {
UnsignedNumber(Box<UnsignedNumber>), UnsignedNumber(Box<UnsignedNumber>),
RealNumber(Box<RealNumber>), RealNumber(Box<RealNumber>),

View File

@ -2,24 +2,24 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum FunctionDataTypeOrImplicit { pub enum FunctionDataTypeOrImplicit {
DataTypeOrVoid(Box<DataTypeOrVoid>), DataTypeOrVoid(Box<DataTypeOrVoid>),
ImplicitDataType(Box<ImplicitDataType>), ImplicitDataType(Box<ImplicitDataType>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FunctionDeclaration { pub struct FunctionDeclaration {
pub nodes: (Keyword, Option<Lifetime>, FunctionBodyDeclaration), pub nodes: (Keyword, Option<Lifetime>, FunctionBodyDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum FunctionBodyDeclaration { pub enum FunctionBodyDeclaration {
WithoutPort(Box<FunctionBodyDeclarationWithoutPort>), WithoutPort(Box<FunctionBodyDeclarationWithoutPort>),
WithPort(Box<FunctionBodyDeclarationWithPort>), WithPort(Box<FunctionBodyDeclarationWithPort>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FunctionBodyDeclarationWithoutPort { pub struct FunctionBodyDeclarationWithoutPort {
pub nodes: ( pub nodes: (
FunctionDataTypeOrImplicit, FunctionDataTypeOrImplicit,
@ -33,7 +33,7 @@ pub struct FunctionBodyDeclarationWithoutPort {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FunctionBodyDeclarationWithPort { pub struct FunctionBodyDeclarationWithPort {
pub nodes: ( pub nodes: (
FunctionDataTypeOrImplicit, FunctionDataTypeOrImplicit,
@ -48,13 +48,13 @@ pub struct FunctionBodyDeclarationWithPort {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum InterfaceIdentifierOrClassScope { pub enum InterfaceIdentifierOrClassScope {
InterfaceIdentifier(Box<(InterfaceIdentifier, Symbol)>), InterfaceIdentifier(Box<(InterfaceIdentifier, Symbol)>),
ClassScope(Box<ClassScope>), ClassScope(Box<ClassScope>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FunctionPrototype { pub struct FunctionPrototype {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -64,7 +64,7 @@ pub struct FunctionPrototype {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DpiImportExport { pub enum DpiImportExport {
ImportFunction(Box<DpiImportExportImportFunction>), ImportFunction(Box<DpiImportExportImportFunction>),
ImportTask(Box<DpiImportExportImportTask>), ImportTask(Box<DpiImportExportImportTask>),
@ -72,7 +72,7 @@ pub enum DpiImportExport {
ExportTask(Box<DpiImportExportExportTask>), ExportTask(Box<DpiImportExportExportTask>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DpiImportExportImportFunction { pub struct DpiImportExportImportFunction {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -84,7 +84,7 @@ pub struct DpiImportExportImportFunction {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DpiImportExportImportTask { pub struct DpiImportExportImportTask {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -96,7 +96,7 @@ pub struct DpiImportExportImportTask {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DpiImportExportExportFunction { pub struct DpiImportExportExportFunction {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -108,7 +108,7 @@ pub struct DpiImportExportExportFunction {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DpiImportExportExportTask { pub struct DpiImportExportExportTask {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -120,29 +120,29 @@ pub struct DpiImportExportExportTask {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DpiSpecString { pub enum DpiSpecString {
DpiC(Box<Keyword>), DpiC(Box<Keyword>),
Dpi(Box<Keyword>), Dpi(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DpiFunctionImportProperty { pub enum DpiFunctionImportProperty {
Context(Box<Keyword>), Context(Box<Keyword>),
Pure(Box<Keyword>), Pure(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DpiTaskImportProperty { pub enum DpiTaskImportProperty {
Context(Box<Keyword>), Context(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DpiFunctionProto { pub struct DpiFunctionProto {
pub nodes: (FunctionPrototype,), pub nodes: (FunctionPrototype,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DpiTaskProto { pub struct DpiTaskProto {
pub nodes: (TaskPrototype,), pub nodes: (TaskPrototype,),
} }

View File

@ -2,12 +2,12 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportDeclaration { pub struct ModportDeclaration {
pub nodes: (Keyword, List<Symbol, ModportItem>, Symbol), pub nodes: (Keyword, List<Symbol, ModportItem>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportItem { pub struct ModportItem {
pub nodes: ( pub nodes: (
ModportIdentifier, ModportIdentifier,
@ -15,66 +15,66 @@ pub struct ModportItem {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModportPortsDeclaraton { pub enum ModportPortsDeclaraton {
Simple(Box<ModportPortsDeclaratonSimple>), Simple(Box<ModportPortsDeclaratonSimple>),
Tf(Box<ModportPortsDeclaratonTf>), Tf(Box<ModportPortsDeclaratonTf>),
Clocking(Box<ModportPortsDeclaratonClocking>), Clocking(Box<ModportPortsDeclaratonClocking>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportPortsDeclaratonSimple { pub struct ModportPortsDeclaratonSimple {
pub nodes: (Vec<AttributeInstance>, ModportSimplePortsDeclaration), pub nodes: (Vec<AttributeInstance>, ModportSimplePortsDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportPortsDeclaratonTf { pub struct ModportPortsDeclaratonTf {
pub nodes: (Vec<AttributeInstance>, ModportTfPortsDeclaration), pub nodes: (Vec<AttributeInstance>, ModportTfPortsDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportPortsDeclaratonClocking { pub struct ModportPortsDeclaratonClocking {
pub nodes: (Vec<AttributeInstance>, ModportClockingDeclaration), pub nodes: (Vec<AttributeInstance>, ModportClockingDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportClockingDeclaration { pub struct ModportClockingDeclaration {
pub nodes: (Keyword, ClockingIdentifier), pub nodes: (Keyword, ClockingIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportSimplePortsDeclaration { pub struct ModportSimplePortsDeclaration {
pub nodes: (PortDirection, List<Symbol, ModportSimplePort>), pub nodes: (PortDirection, List<Symbol, ModportSimplePort>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModportSimplePort { pub enum ModportSimplePort {
Ordered(Box<ModportSimplePortOrdered>), Ordered(Box<ModportSimplePortOrdered>),
Named(Box<ModportSimplePortNamed>), Named(Box<ModportSimplePortNamed>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportSimplePortOrdered { pub struct ModportSimplePortOrdered {
pub nodes: (PortIdentifier,), pub nodes: (PortIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportSimplePortNamed { pub struct ModportSimplePortNamed {
pub nodes: (Symbol, PortIdentifier, Paren<Option<Expression>>), pub nodes: (Symbol, PortIdentifier, Paren<Option<Expression>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportTfPortsDeclaration { pub struct ModportTfPortsDeclaration {
pub nodes: (ImportExport, List<Symbol, ModportTfPort>), pub nodes: (ImportExport, List<Symbol, ModportTfPort>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModportTfPort { pub enum ModportTfPort {
MethodPrototype(Box<MethodPrototype>), MethodPrototype(Box<MethodPrototype>),
TfIdentifier(Box<TfIdentifier>), TfIdentifier(Box<TfIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ImportExport { pub enum ImportExport {
Import(Box<Keyword>), Import(Box<Keyword>),
Export(Box<Keyword>), Export(Box<Keyword>),

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LetDeclaration { pub struct LetDeclaration {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -14,17 +14,17 @@ pub struct LetDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LetIdentifier { pub struct LetIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LetPortList { pub struct LetPortList {
pub nodes: (List<Symbol, LetPortItem>,), pub nodes: (List<Symbol, LetPortItem>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LetPortItem { pub struct LetPortItem {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -35,13 +35,13 @@ pub struct LetPortItem {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum LetFormalType { pub enum LetFormalType {
DataTypeOrImplicit(Box<DataTypeOrImplicit>), DataTypeOrImplicit(Box<DataTypeOrImplicit>),
Untyped(Box<Keyword>), Untyped(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LetExpression { pub struct LetExpression {
pub nodes: ( pub nodes: (
Option<PackageScope>, Option<PackageScope>,
@ -50,13 +50,13 @@ pub struct LetExpression {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum LetListOfArguments { pub enum LetListOfArguments {
Ordered(Box<LetListOfArgumentsOrdered>), Ordered(Box<LetListOfArgumentsOrdered>),
Named(Box<LetListOfArgumentsNamed>), Named(Box<LetListOfArgumentsNamed>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LetListOfArgumentsOrdered { pub struct LetListOfArgumentsOrdered {
pub nodes: ( pub nodes: (
List<Symbol, Option<LetActualArg>>, List<Symbol, Option<LetActualArg>>,
@ -64,12 +64,12 @@ pub struct LetListOfArgumentsOrdered {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LetListOfArgumentsNamed { pub struct LetListOfArgumentsNamed {
pub nodes: (List<Symbol, (Symbol, Identifier, Paren<Option<LetActualArg>>)>,), pub nodes: (List<Symbol, (Symbol, Identifier, Paren<Option<LetActualArg>>)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LetActualArg { pub struct LetActualArg {
pub nodes: (Expression,), pub nodes: (Expression,),
} }

View File

@ -2,39 +2,39 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum LocalParameterDeclaration { pub enum LocalParameterDeclaration {
Param(Box<LocalParameterDeclarationParam>), Param(Box<LocalParameterDeclarationParam>),
Type(Box<LocalParameterDeclarationType>), Type(Box<LocalParameterDeclarationType>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LocalParameterDeclarationParam { pub struct LocalParameterDeclarationParam {
pub nodes: (Keyword, DataTypeOrImplicit, ListOfParamAssignments), pub nodes: (Keyword, DataTypeOrImplicit, ListOfParamAssignments),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LocalParameterDeclarationType { pub struct LocalParameterDeclarationType {
pub nodes: (Keyword, Keyword, ListOfTypeAssignments), pub nodes: (Keyword, Keyword, ListOfTypeAssignments),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ParameterDeclaration { pub enum ParameterDeclaration {
Param(Box<ParameterDeclarationParam>), Param(Box<ParameterDeclarationParam>),
Type(Box<ParameterDeclarationType>), Type(Box<ParameterDeclarationType>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParameterDeclarationParam { pub struct ParameterDeclarationParam {
pub nodes: (Keyword, DataTypeOrImplicit, ListOfParamAssignments), pub nodes: (Keyword, DataTypeOrImplicit, ListOfParamAssignments),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParameterDeclarationType { pub struct ParameterDeclarationType {
pub nodes: (Keyword, Keyword, ListOfTypeAssignments), pub nodes: (Keyword, Keyword, ListOfTypeAssignments),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SpecparamDeclaration { pub struct SpecparamDeclaration {
pub nodes: ( pub nodes: (
Keyword, Keyword,

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CastingType { pub enum CastingType {
SimpleType(Box<SimpleType>), SimpleType(Box<SimpleType>),
ConstantPrimary(Box<ConstantPrimary>), ConstantPrimary(Box<ConstantPrimary>),
@ -11,7 +11,7 @@ pub enum CastingType {
Const(Box<Keyword>), Const(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DataType { pub enum DataType {
Vector(Box<DataTypeVector>), Vector(Box<DataTypeVector>),
Atom(Box<DataTypeAtom>), Atom(Box<DataTypeAtom>),
@ -28,17 +28,17 @@ pub enum DataType {
TypeReference(Box<TypeReference>), TypeReference(Box<TypeReference>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DataTypeVector { pub struct DataTypeVector {
pub nodes: (IntegerVectorType, Option<Signing>, Vec<PackedDimension>), pub nodes: (IntegerVectorType, Option<Signing>, Vec<PackedDimension>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DataTypeAtom { pub struct DataTypeAtom {
pub nodes: (IntegerAtomType, Option<Signing>), pub nodes: (IntegerAtomType, Option<Signing>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DataTypeStructUnion { pub struct DataTypeStructUnion {
pub nodes: ( pub nodes: (
StructUnion, StructUnion,
@ -48,12 +48,12 @@ pub struct DataTypeStructUnion {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Packed { pub struct Packed {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DataTypeEnum { pub struct DataTypeEnum {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -63,7 +63,7 @@ pub struct DataTypeEnum {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DataTypeVirtual { pub struct DataTypeVirtual {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -74,12 +74,12 @@ pub struct DataTypeVirtual {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Interface { pub struct Interface {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DataTypeType { pub struct DataTypeType {
pub nodes: ( pub nodes: (
Option<PackageScopeOrClassScope>, Option<PackageScopeOrClassScope>,
@ -88,40 +88,40 @@ pub struct DataTypeType {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DataTypeOrImplicit { pub enum DataTypeOrImplicit {
DataType(Box<DataType>), DataType(Box<DataType>),
ImplicitDataType(Box<ImplicitDataType>), ImplicitDataType(Box<ImplicitDataType>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ImplicitDataType { pub struct ImplicitDataType {
pub nodes: (Option<Signing>, Vec<PackedDimension>), pub nodes: (Option<Signing>, Vec<PackedDimension>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum EnumBaseType { pub enum EnumBaseType {
Atom(Box<EnumBaseTypeAtom>), Atom(Box<EnumBaseTypeAtom>),
Vector(Box<EnumBaseTypeVector>), Vector(Box<EnumBaseTypeVector>),
Type(Box<EnumBaseTypeType>), Type(Box<EnumBaseTypeType>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EnumBaseTypeAtom { pub struct EnumBaseTypeAtom {
pub nodes: (IntegerAtomType, Option<Signing>), pub nodes: (IntegerAtomType, Option<Signing>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EnumBaseTypeVector { pub struct EnumBaseTypeVector {
pub nodes: (IntegerVectorType, Option<Signing>, Option<PackedDimension>), pub nodes: (IntegerVectorType, Option<Signing>, Option<PackedDimension>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EnumBaseTypeType { pub struct EnumBaseTypeType {
pub nodes: (TypeIdentifier, Option<PackedDimension>), pub nodes: (TypeIdentifier, Option<PackedDimension>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EnumNameDeclaration { pub struct EnumNameDeclaration {
pub nodes: ( pub nodes: (
EnumIdentifier, EnumIdentifier,
@ -130,12 +130,12 @@ pub struct EnumNameDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassScope { pub struct ClassScope {
pub nodes: (ClassType, Symbol), pub nodes: (ClassType, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassType { pub struct ClassType {
pub nodes: ( pub nodes: (
PsClassIdentifier, PsClassIdentifier,
@ -144,13 +144,13 @@ pub struct ClassType {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum IntegerType { pub enum IntegerType {
IntegerVectorType(Box<IntegerVectorType>), IntegerVectorType(Box<IntegerVectorType>),
IntegerAtomType(Box<IntegerAtomType>), IntegerAtomType(Box<IntegerAtomType>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum IntegerAtomType { pub enum IntegerAtomType {
Byte(Box<Keyword>), Byte(Box<Keyword>),
Shortint(Box<Keyword>), Shortint(Box<Keyword>),
@ -160,21 +160,21 @@ pub enum IntegerAtomType {
Time(Box<Keyword>), Time(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum IntegerVectorType { pub enum IntegerVectorType {
Bit(Box<Keyword>), Bit(Box<Keyword>),
Logic(Box<Keyword>), Logic(Box<Keyword>),
Reg(Box<Keyword>), Reg(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NonIntegerType { pub enum NonIntegerType {
Shortreal(Box<Keyword>), Shortreal(Box<Keyword>),
Real(Box<Keyword>), Real(Box<Keyword>),
Realtime(Box<Keyword>), Realtime(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NetType { pub enum NetType {
Supply0(Box<Keyword>), Supply0(Box<Keyword>),
Supply1(Box<Keyword>), Supply1(Box<Keyword>),
@ -190,46 +190,46 @@ pub enum NetType {
Wor(Box<Keyword>), Wor(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NetPortType { pub enum NetPortType {
DataType(Box<NetPortTypeDataType>), DataType(Box<NetPortTypeDataType>),
NetTypeIdentifier(Box<NetTypeIdentifier>), NetTypeIdentifier(Box<NetTypeIdentifier>),
Interconnect(Box<NetPortTypeInterconnect>), Interconnect(Box<NetPortTypeInterconnect>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetPortTypeDataType { pub struct NetPortTypeDataType {
pub nodes: (Option<NetType>, DataTypeOrImplicit), pub nodes: (Option<NetType>, DataTypeOrImplicit),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetPortTypeInterconnect { pub struct NetPortTypeInterconnect {
pub nodes: (Keyword, ImplicitDataType), pub nodes: (Keyword, ImplicitDataType),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariablePortType { pub struct VariablePortType {
pub nodes: (VarDataType,), pub nodes: (VarDataType,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum VarDataType { pub enum VarDataType {
DataType(Box<DataType>), DataType(Box<DataType>),
Var(Box<VarDataTypeVar>), Var(Box<VarDataTypeVar>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VarDataTypeVar { pub struct VarDataTypeVar {
pub nodes: (Keyword, DataTypeOrImplicit), pub nodes: (Keyword, DataTypeOrImplicit),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Signing { pub enum Signing {
Signed(Box<Keyword>), Signed(Box<Keyword>),
Unsigned(Box<Keyword>), Unsigned(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SimpleType { pub enum SimpleType {
IntegerType(Box<IntegerType>), IntegerType(Box<IntegerType>),
NonIntegerType(Box<NonIntegerType>), NonIntegerType(Box<NonIntegerType>),
@ -237,7 +237,7 @@ pub enum SimpleType {
PsParameterIdentifier(Box<PsParameterIdentifier>), PsParameterIdentifier(Box<PsParameterIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StructUnionMember { pub struct StructUnionMember {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -248,31 +248,31 @@ pub struct StructUnionMember {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DataTypeOrVoid { pub enum DataTypeOrVoid {
DataType(Box<DataType>), DataType(Box<DataType>),
Void(Box<Keyword>), Void(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum StructUnion { pub enum StructUnion {
Struct(Box<Keyword>), Struct(Box<Keyword>),
Union(Box<Keyword>), Union(Box<Keyword>),
UnionTagged(Box<(Keyword, Keyword)>), UnionTagged(Box<(Keyword, Keyword)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TypeReference { pub enum TypeReference {
Expression(Box<TypeReferenceExpression>), Expression(Box<TypeReferenceExpression>),
DataType(Box<TypeReferenceDataType>), DataType(Box<TypeReferenceDataType>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TypeReferenceExpression { pub struct TypeReferenceExpression {
pub nodes: (Keyword, Paren<Expression>), pub nodes: (Keyword, Paren<Expression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TypeReferenceDataType { pub struct TypeReferenceDataType {
pub nodes: (Keyword, Paren<DataType>), pub nodes: (Keyword, Paren<DataType>),
} }

View File

@ -2,44 +2,44 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InoutDeclaration { pub struct InoutDeclaration {
pub nodes: (Keyword, NetPortType, ListOfPortIdentifiers), pub nodes: (Keyword, NetPortType, ListOfPortIdentifiers),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum InputDeclaration { pub enum InputDeclaration {
Net(Box<InputDeclarationNet>), Net(Box<InputDeclarationNet>),
Variable(Box<InputDeclarationVariable>), Variable(Box<InputDeclarationVariable>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InputDeclarationNet { pub struct InputDeclarationNet {
pub nodes: (Keyword, NetPortType, ListOfPortIdentifiers), pub nodes: (Keyword, NetPortType, ListOfPortIdentifiers),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InputDeclarationVariable { pub struct InputDeclarationVariable {
pub nodes: (Keyword, VariablePortType, ListOfVariableIdentifiers), pub nodes: (Keyword, VariablePortType, ListOfVariableIdentifiers),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum OutputDeclaration { pub enum OutputDeclaration {
Net(Box<OutputDeclarationNet>), Net(Box<OutputDeclarationNet>),
Variable(Box<OutputDeclarationVariable>), Variable(Box<OutputDeclarationVariable>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OutputDeclarationNet { pub struct OutputDeclarationNet {
pub nodes: (Keyword, NetPortType, ListOfPortIdentifiers), pub nodes: (Keyword, NetPortType, ListOfPortIdentifiers),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OutputDeclarationVariable { pub struct OutputDeclarationVariable {
pub nodes: (Keyword, VariablePortType, ListOfVariablePortIdentifiers), pub nodes: (Keyword, VariablePortType, ListOfVariablePortIdentifiers),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfacePortDeclaration { pub struct InterfacePortDeclaration {
pub nodes: ( pub nodes: (
InterfaceIdentifier, InterfaceIdentifier,
@ -48,7 +48,7 @@ pub struct InterfacePortDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RefDeclaration { pub struct RefDeclaration {
pub nodes: (Keyword, VariablePortType, ListOfVariableIdentifiers), pub nodes: (Keyword, VariablePortType, ListOfVariableIdentifiers),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DriveStrength { pub enum DriveStrength {
Strength01(Box<DriveStrength01>), Strength01(Box<DriveStrength01>),
Strength10(Box<DriveStrength10>), Strength10(Box<DriveStrength10>),
@ -12,37 +12,37 @@ pub enum DriveStrength {
Strengthz1(Box<DriveStrengthz1>), Strengthz1(Box<DriveStrengthz1>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DriveStrength01 { pub struct DriveStrength01 {
pub nodes: (Paren<(Strength0, Symbol, Strength1)>,), pub nodes: (Paren<(Strength0, Symbol, Strength1)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DriveStrength10 { pub struct DriveStrength10 {
pub nodes: (Paren<(Strength1, Symbol, Strength0)>,), pub nodes: (Paren<(Strength1, Symbol, Strength0)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DriveStrength0z { pub struct DriveStrength0z {
pub nodes: (Paren<(Strength0, Symbol, Keyword)>,), pub nodes: (Paren<(Strength0, Symbol, Keyword)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DriveStrength1z { pub struct DriveStrength1z {
pub nodes: (Paren<(Strength1, Symbol, Keyword)>,), pub nodes: (Paren<(Strength1, Symbol, Keyword)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DriveStrengthz1 { pub struct DriveStrengthz1 {
pub nodes: (Paren<(Keyword, Symbol, Strength1)>,), pub nodes: (Paren<(Keyword, Symbol, Strength1)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DriveStrengthz0 { pub struct DriveStrengthz0 {
pub nodes: (Paren<(Keyword, Symbol, Strength0)>,), pub nodes: (Paren<(Keyword, Symbol, Strength0)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Strength0 { pub enum Strength0 {
Supply0(Box<Keyword>), Supply0(Box<Keyword>),
Strong0(Box<Keyword>), Strong0(Box<Keyword>),
@ -50,7 +50,7 @@ pub enum Strength0 {
Weak0(Box<Keyword>), Weak0(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Strength1 { pub enum Strength1 {
Supply1(Box<Keyword>), Supply1(Box<Keyword>),
Strong1(Box<Keyword>), Strong1(Box<Keyword>),
@ -58,24 +58,24 @@ pub enum Strength1 {
Weak1(Box<Keyword>), Weak1(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ChargeStrength { pub enum ChargeStrength {
Small(Box<ChargeStrengthSmall>), Small(Box<ChargeStrengthSmall>),
Medium(Box<ChargeStrengthMedium>), Medium(Box<ChargeStrengthMedium>),
Large(Box<ChargeStrengthLarge>), Large(Box<ChargeStrengthLarge>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ChargeStrengthSmall { pub struct ChargeStrengthSmall {
pub nodes: (Paren<Keyword>,), pub nodes: (Paren<Keyword>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ChargeStrengthMedium { pub struct ChargeStrengthMedium {
pub nodes: (Paren<Keyword>,), pub nodes: (Paren<Keyword>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ChargeStrengthLarge { pub struct ChargeStrengthLarge {
pub nodes: (Paren<Keyword>,), pub nodes: (Paren<Keyword>,),
} }

View File

@ -2,18 +2,18 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TaskDeclaration { pub struct TaskDeclaration {
pub nodes: (Keyword, Option<Lifetime>, TaskBodyDeclaration), pub nodes: (Keyword, Option<Lifetime>, TaskBodyDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TaskBodyDeclaration { pub enum TaskBodyDeclaration {
WithoutPort(Box<TaskBodyDeclarationWithoutPort>), WithoutPort(Box<TaskBodyDeclarationWithoutPort>),
WithPort(Box<TaskBodyDeclarationWithPort>), WithPort(Box<TaskBodyDeclarationWithPort>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TaskBodyDeclarationWithoutPort { pub struct TaskBodyDeclarationWithoutPort {
pub nodes: ( pub nodes: (
Option<InterfaceIdentifierOrClassScope>, Option<InterfaceIdentifierOrClassScope>,
@ -26,7 +26,7 @@ pub struct TaskBodyDeclarationWithoutPort {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TaskBodyDeclarationWithPort { pub struct TaskBodyDeclarationWithPort {
pub nodes: ( pub nodes: (
Option<InterfaceIdentifierOrClassScope>, Option<InterfaceIdentifierOrClassScope>,
@ -40,18 +40,18 @@ pub struct TaskBodyDeclarationWithPort {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TfItemDeclaration { pub enum TfItemDeclaration {
BlockItemDeclaration(Box<BlockItemDeclaration>), BlockItemDeclaration(Box<BlockItemDeclaration>),
TfPortDeclaration(Box<TfPortDeclaration>), TfPortDeclaration(Box<TfPortDeclaration>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TfPortList { pub struct TfPortList {
pub nodes: (List<Symbol, TfPortItem>,), pub nodes: (List<Symbol, TfPortItem>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TfPortItem { pub struct TfPortItem {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -66,13 +66,13 @@ pub struct TfPortItem {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TfPortDirection { pub enum TfPortDirection {
PortDirection(Box<PortDirection>), PortDirection(Box<PortDirection>),
ConstRef(Box<(Keyword, Keyword)>), ConstRef(Box<(Keyword, Keyword)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TfPortDeclaration { pub struct TfPortDeclaration {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -84,7 +84,7 @@ pub struct TfPortDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TaskPrototype { pub struct TaskPrototype {
pub nodes: (Keyword, TaskIdentifier, Option<Paren<Option<TfPortList>>>), pub nodes: (Keyword, TaskIdentifier, Option<Paren<Option<TfPortList>>>),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DataDeclaration { pub enum DataDeclaration {
Variable(Box<DataDeclarationVariable>), Variable(Box<DataDeclarationVariable>),
TypeDeclaration(Box<TypeDeclaration>), TypeDeclaration(Box<TypeDeclaration>),
@ -10,7 +10,7 @@ pub enum DataDeclaration {
NetTypeDeclaration(Box<NetTypeDeclaration>), NetTypeDeclaration(Box<NetTypeDeclaration>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DataDeclarationVariable { pub struct DataDeclarationVariable {
pub nodes: ( pub nodes: (
Option<Const>, Option<Const>,
@ -22,61 +22,61 @@ pub struct DataDeclarationVariable {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Const { pub struct Const {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PackageImportDeclaration { pub struct PackageImportDeclaration {
pub nodes: (Keyword, List<Symbol, PackageImportItem>, Symbol), pub nodes: (Keyword, List<Symbol, PackageImportItem>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PackageImportItem { pub enum PackageImportItem {
Identifier(Box<PackageImportItemIdentifier>), Identifier(Box<PackageImportItemIdentifier>),
Asterisk(Box<PackageImportItemAsterisk>), Asterisk(Box<PackageImportItemAsterisk>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PackageImportItemIdentifier { pub struct PackageImportItemIdentifier {
pub nodes: (PackageIdentifier, Symbol, Identifier), pub nodes: (PackageIdentifier, Symbol, Identifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PackageImportItemAsterisk { pub struct PackageImportItemAsterisk {
pub nodes: (PackageIdentifier, Symbol, Symbol), pub nodes: (PackageIdentifier, Symbol, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PackageExportDeclaration { pub enum PackageExportDeclaration {
Asterisk(Box<PackageExportDeclarationAsterisk>), Asterisk(Box<PackageExportDeclarationAsterisk>),
Item(Box<PackageExportDeclarationItem>), Item(Box<PackageExportDeclarationItem>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PackageExportDeclarationAsterisk { pub struct PackageExportDeclarationAsterisk {
pub nodes: (Keyword, Symbol, Symbol), pub nodes: (Keyword, Symbol, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PackageExportDeclarationItem { pub struct PackageExportDeclarationItem {
pub nodes: (Keyword, List<Symbol, PackageImportItem>, Symbol), pub nodes: (Keyword, List<Symbol, PackageImportItem>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GenvarDeclaration { pub struct GenvarDeclaration {
pub nodes: (Keyword, ListOfGenvarIdentifiers, Symbol), pub nodes: (Keyword, ListOfGenvarIdentifiers, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NetDeclaration { pub enum NetDeclaration {
NetType(Box<NetDeclarationNetType>), NetType(Box<NetDeclarationNetType>),
NetTypeIdentifier(Box<NetDeclarationNetTypeIdentifier>), NetTypeIdentifier(Box<NetDeclarationNetTypeIdentifier>),
Interconnect(Box<NetDeclarationInterconnect>), Interconnect(Box<NetDeclarationInterconnect>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetDeclarationNetType { pub struct NetDeclarationNetType {
pub nodes: ( pub nodes: (
NetType, NetType,
@ -89,19 +89,19 @@ pub struct NetDeclarationNetType {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Strength { pub enum Strength {
Drive(Box<DriveStrength>), Drive(Box<DriveStrength>),
Charge(Box<ChargeStrength>), Charge(Box<ChargeStrength>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum VectorScalar { pub enum VectorScalar {
Vectored(Box<Keyword>), Vectored(Box<Keyword>),
Scalared(Box<Keyword>), Scalared(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetDeclarationNetTypeIdentifier { pub struct NetDeclarationNetTypeIdentifier {
pub nodes: ( pub nodes: (
NetTypeIdentifier, NetTypeIdentifier,
@ -111,7 +111,7 @@ pub struct NetDeclarationNetTypeIdentifier {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetDeclarationInterconnect { pub struct NetDeclarationInterconnect {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -124,14 +124,14 @@ pub struct NetDeclarationInterconnect {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TypeDeclaration { pub enum TypeDeclaration {
DataType(Box<TypeDeclarationDataType>), DataType(Box<TypeDeclarationDataType>),
Interface(Box<TypeDeclarationInterface>), Interface(Box<TypeDeclarationInterface>),
Reserved(Box<TypeDeclarationReserved>), Reserved(Box<TypeDeclarationReserved>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TypeDeclarationDataType { pub struct TypeDeclarationDataType {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -142,7 +142,7 @@ pub struct TypeDeclarationDataType {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TypeDeclarationInterface { pub struct TypeDeclarationInterface {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -155,7 +155,7 @@ pub struct TypeDeclarationInterface {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TypeDeclarationReserved { pub struct TypeDeclarationReserved {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -165,7 +165,7 @@ pub struct TypeDeclarationReserved {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TypeDeclarationKeyword { pub enum TypeDeclarationKeyword {
Enum(Box<Keyword>), Enum(Box<Keyword>),
Struct(Box<Keyword>), Struct(Box<Keyword>),
@ -174,13 +174,13 @@ pub enum TypeDeclarationKeyword {
InterfaceClass(Box<(Keyword, Keyword)>), InterfaceClass(Box<(Keyword, Keyword)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NetTypeDeclaration { pub enum NetTypeDeclaration {
DataType(Box<NetTypeDeclarationDataType>), DataType(Box<NetTypeDeclarationDataType>),
NetType(Box<NetTypeDeclarationNetType>), NetType(Box<NetTypeDeclarationNetType>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetTypeDeclarationDataType { pub struct NetTypeDeclarationDataType {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -191,7 +191,7 @@ pub struct NetTypeDeclarationDataType {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetTypeDeclarationNetType { pub struct NetTypeDeclarationNetType {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -202,7 +202,7 @@ pub struct NetTypeDeclarationNetType {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Lifetime { pub enum Lifetime {
Static(Box<Keyword>), Static(Box<Keyword>),
Automatic(Box<Keyword>), Automatic(Box<Keyword>),

View File

@ -2,63 +2,63 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Concatenation { pub struct Concatenation {
pub nodes: (Brace<List<Symbol, Expression>>,), pub nodes: (Brace<List<Symbol, Expression>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantConcatenation { pub struct ConstantConcatenation {
pub nodes: (Brace<List<Symbol, ConstantExpression>>,), pub nodes: (Brace<List<Symbol, ConstantExpression>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantMultipleConcatenation { pub struct ConstantMultipleConcatenation {
pub nodes: (Brace<(ConstantExpression, ConstantConcatenation)>,), pub nodes: (Brace<(ConstantExpression, ConstantConcatenation)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModulePathConcatenation { pub struct ModulePathConcatenation {
pub nodes: (Brace<List<Symbol, ModulePathExpression>>,), pub nodes: (Brace<List<Symbol, ModulePathExpression>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModulePathMultipleConcatenation { pub struct ModulePathMultipleConcatenation {
pub nodes: (Brace<(ConstantExpression, ModulePathConcatenation)>,), pub nodes: (Brace<(ConstantExpression, ModulePathConcatenation)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct MultipleConcatenation { pub struct MultipleConcatenation {
pub nodes: (Brace<(Expression, Concatenation)>,), pub nodes: (Brace<(Expression, Concatenation)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StreamingConcatenation { pub struct StreamingConcatenation {
pub nodes: (Brace<(StreamOperator, Option<SliceSize>, StreamConcatenation)>,), pub nodes: (Brace<(StreamOperator, Option<SliceSize>, StreamConcatenation)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StreamOperator { pub struct StreamOperator {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SliceSize { pub enum SliceSize {
SimpleType(Box<SimpleType>), SimpleType(Box<SimpleType>),
ConstantExpression(Box<ConstantExpression>), ConstantExpression(Box<ConstantExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StreamConcatenation { pub struct StreamConcatenation {
pub nodes: (Brace<List<Symbol, StreamExpression>>,), pub nodes: (Brace<List<Symbol, StreamExpression>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StreamExpression { pub struct StreamExpression {
pub nodes: (Expression, Option<(Keyword, Bracket<ArrayRangeExpression>)>), pub nodes: (Expression, Option<(Keyword, Bracket<ArrayRangeExpression>)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ArrayRangeExpression { pub enum ArrayRangeExpression {
Expression(Box<Expression>), Expression(Box<Expression>),
Colon(Box<ArrayRangeExpressionColon>), Colon(Box<ArrayRangeExpressionColon>),
@ -66,22 +66,22 @@ pub enum ArrayRangeExpression {
MinusColon(Box<ArrayRangeExpressionMinusColon>), MinusColon(Box<ArrayRangeExpressionMinusColon>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ArrayRangeExpressionColon { pub struct ArrayRangeExpressionColon {
pub nodes: (Expression, Symbol, Expression), pub nodes: (Expression, Symbol, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ArrayRangeExpressionPlusColon { pub struct ArrayRangeExpressionPlusColon {
pub nodes: (Expression, Symbol, Expression), pub nodes: (Expression, Symbol, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ArrayRangeExpressionMinusColon { pub struct ArrayRangeExpressionMinusColon {
pub nodes: (Expression, Symbol, Expression), pub nodes: (Expression, Symbol, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EmptyUnpackedArrayConcatenation { pub struct EmptyUnpackedArrayConcatenation {
pub nodes: (Symbol, Symbol), pub nodes: (Symbol, Symbol),
} }

View File

@ -2,24 +2,24 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NetLvalue { pub enum NetLvalue {
Identifier(Box<NetLvalueIdentifier>), Identifier(Box<NetLvalueIdentifier>),
Lvalue(Box<NetLvalueLvalue>), Lvalue(Box<NetLvalueLvalue>),
Pattern(Box<NetLvaluePattern>), Pattern(Box<NetLvaluePattern>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetLvalueIdentifier { pub struct NetLvalueIdentifier {
pub nodes: (PsOrHierarchicalNetIdentifier, ConstantSelect), pub nodes: (PsOrHierarchicalNetIdentifier, ConstantSelect),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetLvalueLvalue { pub struct NetLvalueLvalue {
pub nodes: (Brace<List<Symbol, NetLvalue>>,), pub nodes: (Brace<List<Symbol, NetLvalue>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetLvaluePattern { pub struct NetLvaluePattern {
pub nodes: ( pub nodes: (
Option<AssignmentPatternExpressionType>, Option<AssignmentPatternExpressionType>,
@ -27,7 +27,7 @@ pub struct NetLvaluePattern {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum VariableLvalue { pub enum VariableLvalue {
Identifier(Box<VariableLvalueIdentifier>), Identifier(Box<VariableLvalueIdentifier>),
Lvalue(Box<VariableLvalueLvalue>), Lvalue(Box<VariableLvalueLvalue>),
@ -35,7 +35,7 @@ pub enum VariableLvalue {
StreamingConcatenation(Box<StreamingConcatenation>), StreamingConcatenation(Box<StreamingConcatenation>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariableLvalueIdentifier { pub struct VariableLvalueIdentifier {
pub nodes: ( pub nodes: (
Option<ImplicitClassHandleOrPackageScope>, Option<ImplicitClassHandleOrPackageScope>,
@ -44,12 +44,12 @@ pub struct VariableLvalueIdentifier {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariableLvalueLvalue { pub struct VariableLvalueLvalue {
pub nodes: (Brace<List<Symbol, VariableLvalue>>,), pub nodes: (Brace<List<Symbol, VariableLvalue>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariableLvaluePattern { pub struct VariableLvaluePattern {
pub nodes: ( pub nodes: (
Option<AssignmentPatternExpressionType>, Option<AssignmentPatternExpressionType>,
@ -57,7 +57,7 @@ pub struct VariableLvaluePattern {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonrangeVariableLvalue { pub struct NonrangeVariableLvalue {
pub nodes: ( pub nodes: (
Option<ImplicitClassHandleOrPackageScope>, Option<ImplicitClassHandleOrPackageScope>,

View File

@ -2,23 +2,23 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum IncOrDecExpression { pub enum IncOrDecExpression {
Prefix(Box<IncOrDecExpressionPrefix>), Prefix(Box<IncOrDecExpressionPrefix>),
Suffix(Box<IncOrDecExpressionSuffix>), Suffix(Box<IncOrDecExpressionSuffix>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IncOrDecExpressionPrefix { pub struct IncOrDecExpressionPrefix {
pub nodes: (IncOrDecOperator, Vec<AttributeInstance>, VariableLvalue), pub nodes: (IncOrDecOperator, Vec<AttributeInstance>, VariableLvalue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IncOrDecExpressionSuffix { pub struct IncOrDecExpressionSuffix {
pub nodes: (VariableLvalue, Vec<AttributeInstance>, IncOrDecOperator), pub nodes: (VariableLvalue, Vec<AttributeInstance>, IncOrDecOperator),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConditionalExpression { pub struct ConditionalExpression {
pub nodes: ( pub nodes: (
CondPredicate, CondPredicate,
@ -30,7 +30,7 @@ pub struct ConditionalExpression {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstantExpression { pub enum ConstantExpression {
ConstantPrimary(Box<ConstantPrimary>), ConstantPrimary(Box<ConstantPrimary>),
Unary(Box<ConstantExpressionUnary>), Unary(Box<ConstantExpressionUnary>),
@ -38,12 +38,12 @@ pub enum ConstantExpression {
Ternary(Box<ConstantExpressionTernary>), Ternary(Box<ConstantExpressionTernary>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantExpressionUnary { pub struct ConstantExpressionUnary {
pub nodes: (UnaryOperator, Vec<AttributeInstance>, ConstantPrimary), pub nodes: (UnaryOperator, Vec<AttributeInstance>, ConstantPrimary),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantExpressionBinary { pub struct ConstantExpressionBinary {
pub nodes: ( pub nodes: (
ConstantExpression, ConstantExpression,
@ -53,7 +53,7 @@ pub struct ConstantExpressionBinary {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantExpressionTernary { pub struct ConstantExpressionTernary {
pub nodes: ( pub nodes: (
ConstantExpression, ConstantExpression,
@ -65,13 +65,13 @@ pub struct ConstantExpressionTernary {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstantMintypmaxExpression { pub enum ConstantMintypmaxExpression {
Unary(Box<ConstantExpression>), Unary(Box<ConstantExpression>),
Ternary(Box<ConstantMintypmaxExpressionTernary>), Ternary(Box<ConstantMintypmaxExpressionTernary>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantMintypmaxExpressionTernary { pub struct ConstantMintypmaxExpressionTernary {
pub nodes: ( pub nodes: (
ConstantExpression, ConstantExpression,
@ -82,43 +82,43 @@ pub struct ConstantMintypmaxExpressionTernary {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstantParamExpression { pub enum ConstantParamExpression {
ConstantMintypmaxExpression(Box<ConstantMintypmaxExpression>), ConstantMintypmaxExpression(Box<ConstantMintypmaxExpression>),
DataType(Box<DataType>), DataType(Box<DataType>),
Dollar(Box<Symbol>), Dollar(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ParamExpression { pub enum ParamExpression {
MintypmaxExpression(Box<MintypmaxExpression>), MintypmaxExpression(Box<MintypmaxExpression>),
DataType(Box<DataType>), DataType(Box<DataType>),
Dollar(Box<Symbol>), Dollar(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstantRangeExpression { pub enum ConstantRangeExpression {
ConstantExpression(Box<ConstantExpression>), ConstantExpression(Box<ConstantExpression>),
ConstantPartSelectRange(Box<ConstantPartSelectRange>), ConstantPartSelectRange(Box<ConstantPartSelectRange>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstantPartSelectRange { pub enum ConstantPartSelectRange {
ConstantRange(Box<ConstantRange>), ConstantRange(Box<ConstantRange>),
ConstantIndexedRange(Box<ConstantIndexedRange>), ConstantIndexedRange(Box<ConstantIndexedRange>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantRange { pub struct ConstantRange {
pub nodes: (ConstantExpression, Symbol, ConstantExpression), pub nodes: (ConstantExpression, Symbol, ConstantExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantIndexedRange { pub struct ConstantIndexedRange {
pub nodes: (ConstantExpression, Symbol, ConstantExpression), pub nodes: (ConstantExpression, Symbol, ConstantExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Expression { pub enum Expression {
Primary(Box<Primary>), Primary(Box<Primary>),
Unary(Box<ExpressionUnary>), Unary(Box<ExpressionUnary>),
@ -130,17 +130,17 @@ pub enum Expression {
TaggedUnionExpression(Box<TaggedUnionExpression>), TaggedUnionExpression(Box<TaggedUnionExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ExpressionUnary { pub struct ExpressionUnary {
pub nodes: (UnaryOperator, Vec<AttributeInstance>, Primary), pub nodes: (UnaryOperator, Vec<AttributeInstance>, Primary),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ExpressionOperatorAssignment { pub struct ExpressionOperatorAssignment {
pub nodes: (Paren<OperatorAssignment>,), pub nodes: (Paren<OperatorAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ExpressionBinary { pub struct ExpressionBinary {
pub nodes: ( pub nodes: (
Expression, Expression,
@ -150,39 +150,39 @@ pub struct ExpressionBinary {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TaggedUnionExpression { pub struct TaggedUnionExpression {
pub nodes: (Keyword, MemberIdentifier, Option<Expression>), pub nodes: (Keyword, MemberIdentifier, Option<Expression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InsideExpression { pub struct InsideExpression {
pub nodes: (Expression, Keyword, Brace<OpenRangeList>), pub nodes: (Expression, Keyword, Brace<OpenRangeList>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ValueRange { pub enum ValueRange {
Expression(Box<Expression>), Expression(Box<Expression>),
Binary(Box<ValueRangeBinary>), Binary(Box<ValueRangeBinary>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ValueRangeBinary { pub struct ValueRangeBinary {
pub nodes: (Bracket<(Expression, Symbol, Expression)>,), pub nodes: (Bracket<(Expression, Symbol, Expression)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum MintypmaxExpression { pub enum MintypmaxExpression {
Expression(Box<Expression>), Expression(Box<Expression>),
Ternary(Box<MintypmaxExpressionTernary>), Ternary(Box<MintypmaxExpressionTernary>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct MintypmaxExpressionTernary { pub struct MintypmaxExpressionTernary {
pub nodes: (Expression, Symbol, Expression, Symbol, Expression), pub nodes: (Expression, Symbol, Expression, Symbol, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModulePathConditionalExpression { pub struct ModulePathConditionalExpression {
pub nodes: ( pub nodes: (
ModulePathExpression, ModulePathExpression,
@ -194,7 +194,7 @@ pub struct ModulePathConditionalExpression {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModulePathExpression { pub enum ModulePathExpression {
ModulePathPrimary(Box<ModulePathPrimary>), ModulePathPrimary(Box<ModulePathPrimary>),
Unary(Box<ModulePathExpressionUnary>), Unary(Box<ModulePathExpressionUnary>),
@ -202,7 +202,7 @@ pub enum ModulePathExpression {
ModulePathConditionalExpression(Box<ModulePathConditionalExpression>), ModulePathConditionalExpression(Box<ModulePathConditionalExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModulePathExpressionUnary { pub struct ModulePathExpressionUnary {
pub nodes: ( pub nodes: (
UnaryModulePathOperator, UnaryModulePathOperator,
@ -211,7 +211,7 @@ pub struct ModulePathExpressionUnary {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModulePathExpressionBinary { pub struct ModulePathExpressionBinary {
pub nodes: ( pub nodes: (
ModulePathExpression, ModulePathExpression,
@ -221,13 +221,13 @@ pub struct ModulePathExpressionBinary {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModulePathMintypmaxExpression { pub enum ModulePathMintypmaxExpression {
ModulePathExpression(Box<ModulePathExpression>), ModulePathExpression(Box<ModulePathExpression>),
Ternary(Box<ModulePathMintypmaxExpressionTernary>), Ternary(Box<ModulePathMintypmaxExpressionTernary>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModulePathMintypmaxExpressionTernary { pub struct ModulePathMintypmaxExpressionTernary {
pub nodes: ( pub nodes: (
ModulePathExpression, ModulePathExpression,
@ -238,18 +238,18 @@ pub struct ModulePathMintypmaxExpressionTernary {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PartSelectRange { pub enum PartSelectRange {
ConstantRange(Box<ConstantRange>), ConstantRange(Box<ConstantRange>),
IndexedRange(Box<IndexedRange>), IndexedRange(Box<IndexedRange>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IndexedRange { pub struct IndexedRange {
pub nodes: (Expression, Symbol, ConstantExpression), pub nodes: (Expression, Symbol, ConstantExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GenvarExpression { pub struct GenvarExpression {
pub nodes: (ConstantExpression,), pub nodes: (ConstantExpression,),
} }

View File

@ -2,13 +2,13 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Number { pub enum Number {
IntegralNumber(Box<IntegralNumber>), IntegralNumber(Box<IntegralNumber>),
RealNumber(Box<RealNumber>), RealNumber(Box<RealNumber>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum IntegralNumber { pub enum IntegralNumber {
DecimalNumber(Box<DecimalNumber>), DecimalNumber(Box<DecimalNumber>),
OctalNumber(Box<OctalNumber>), OctalNumber(Box<OctalNumber>),
@ -16,7 +16,7 @@ pub enum IntegralNumber {
HexNumber(Box<HexNumber>), HexNumber(Box<HexNumber>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DecimalNumber { pub enum DecimalNumber {
UnsignedNumber(Box<UnsignedNumber>), UnsignedNumber(Box<UnsignedNumber>),
BaseUnsigned(Box<DecimalNumberBaseUnsigned>), BaseUnsigned(Box<DecimalNumberBaseUnsigned>),
@ -24,59 +24,59 @@ pub enum DecimalNumber {
BaseZNumber(Box<DecimalNumberBaseZNumber>), BaseZNumber(Box<DecimalNumberBaseZNumber>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DecimalNumberBaseUnsigned { pub struct DecimalNumberBaseUnsigned {
pub nodes: (Option<Size>, DecimalBase, UnsignedNumber), pub nodes: (Option<Size>, DecimalBase, UnsignedNumber),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DecimalNumberBaseXNumber { pub struct DecimalNumberBaseXNumber {
pub nodes: (Option<Size>, DecimalBase, XNumber), pub nodes: (Option<Size>, DecimalBase, XNumber),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DecimalNumberBaseZNumber { pub struct DecimalNumberBaseZNumber {
pub nodes: (Option<Size>, DecimalBase, ZNumber), pub nodes: (Option<Size>, DecimalBase, ZNumber),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinaryNumber { pub struct BinaryNumber {
pub nodes: (Option<Size>, BinaryBase, BinaryValue), pub nodes: (Option<Size>, BinaryBase, BinaryValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OctalNumber { pub struct OctalNumber {
pub nodes: (Option<Size>, OctalBase, OctalValue), pub nodes: (Option<Size>, OctalBase, OctalValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HexNumber { pub struct HexNumber {
pub nodes: (Option<Size>, HexBase, HexValue), pub nodes: (Option<Size>, HexBase, HexValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Sign { pub enum Sign {
Plus(Box<Symbol>), Plus(Box<Symbol>),
Minus(Box<Symbol>), Minus(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Size { pub struct Size {
pub nodes: (NonZeroUnsignedNumber,), pub nodes: (NonZeroUnsignedNumber,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonZeroUnsignedNumber { pub struct NonZeroUnsignedNumber {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum RealNumber { pub enum RealNumber {
FixedPointNumber(Box<FixedPointNumber>), FixedPointNumber(Box<FixedPointNumber>),
Floating(Box<RealNumberFloating>), Floating(Box<RealNumberFloating>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RealNumberFloating { pub struct RealNumberFloating {
pub nodes: ( pub nodes: (
UnsignedNumber, UnsignedNumber,
@ -87,67 +87,67 @@ pub struct RealNumberFloating {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FixedPointNumber { pub struct FixedPointNumber {
pub nodes: (UnsignedNumber, Symbol, UnsignedNumber), pub nodes: (UnsignedNumber, Symbol, UnsignedNumber),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Exp { pub struct Exp {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UnsignedNumber { pub struct UnsignedNumber {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinaryValue { pub struct BinaryValue {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OctalValue { pub struct OctalValue {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HexValue { pub struct HexValue {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DecimalBase { pub struct DecimalBase {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinaryBase { pub struct BinaryBase {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OctalBase { pub struct OctalBase {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HexBase { pub struct HexBase {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct XNumber { pub struct XNumber {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ZNumber { pub struct ZNumber {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UnbasedUnsizedLiteral { pub struct UnbasedUnsizedLiteral {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }

View File

@ -2,27 +2,27 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UnaryOperator { pub struct UnaryOperator {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinaryOperator { pub struct BinaryOperator {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IncOrDecOperator { pub struct IncOrDecOperator {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UnaryModulePathOperator { pub struct UnaryModulePathOperator {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinaryModulePathOperator { pub struct BinaryModulePathOperator {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstantPrimary { pub enum ConstantPrimary {
PrimaryLiteral(Box<PrimaryLiteral>), PrimaryLiteral(Box<PrimaryLiteral>),
PsParameter(Box<ConstantPrimaryPsParameter>), PsParameter(Box<ConstantPrimaryPsParameter>),
@ -21,12 +21,12 @@ pub enum ConstantPrimary {
Null(Box<Keyword>), Null(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantPrimaryPsParameter { pub struct ConstantPrimaryPsParameter {
pub nodes: (PsParameterIdentifier, ConstantSelect), pub nodes: (PsParameterIdentifier, ConstantSelect),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantPrimarySpecparam { pub struct ConstantPrimarySpecparam {
pub nodes: ( pub nodes: (
SpecparamIdentifier, SpecparamIdentifier,
@ -34,17 +34,17 @@ pub struct ConstantPrimarySpecparam {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantPrimaryFormalPort { pub struct ConstantPrimaryFormalPort {
pub nodes: (FormalPortIdentifier, ConstantSelect), pub nodes: (FormalPortIdentifier, ConstantSelect),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantPrimaryEnum { pub struct ConstantPrimaryEnum {
pub nodes: (PackageScopeOrClassScope, EnumIdentifier), pub nodes: (PackageScopeOrClassScope, EnumIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantPrimaryConcatenation { pub struct ConstantPrimaryConcatenation {
pub nodes: ( pub nodes: (
ConstantConcatenation, ConstantConcatenation,
@ -52,7 +52,7 @@ pub struct ConstantPrimaryConcatenation {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantPrimaryMultipleConcatenation { pub struct ConstantPrimaryMultipleConcatenation {
pub nodes: ( pub nodes: (
ConstantMultipleConcatenation, ConstantMultipleConcatenation,
@ -60,12 +60,12 @@ pub struct ConstantPrimaryMultipleConcatenation {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantPrimaryMintypmaxExpression { pub struct ConstantPrimaryMintypmaxExpression {
pub nodes: (Paren<ConstantMintypmaxExpression>,), pub nodes: (Paren<ConstantMintypmaxExpression>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModulePathPrimary { pub enum ModulePathPrimary {
Number(Box<Number>), Number(Box<Number>),
Identifier(Box<Identifier>), Identifier(Box<Identifier>),
@ -75,12 +75,12 @@ pub enum ModulePathPrimary {
Mintypmax(Box<ModulePathPrimaryMintypmax>), Mintypmax(Box<ModulePathPrimaryMintypmax>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModulePathPrimaryMintypmax { pub struct ModulePathPrimaryMintypmax {
pub nodes: (Paren<ModulePathMintypmaxExpression>,), pub nodes: (Paren<ModulePathMintypmaxExpression>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Primary { pub enum Primary {
PrimaryLiteral(Box<PrimaryLiteral>), PrimaryLiteral(Box<PrimaryLiteral>),
Hierarchical(Box<PrimaryHierarchical>), Hierarchical(Box<PrimaryHierarchical>),
@ -99,7 +99,7 @@ pub enum Primary {
Null(Box<Keyword>), Null(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PrimaryHierarchical { pub struct PrimaryHierarchical {
pub nodes: ( pub nodes: (
Option<ClassQualifierOrPackageScope>, Option<ClassQualifierOrPackageScope>,
@ -108,39 +108,39 @@ pub struct PrimaryHierarchical {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PrimaryConcatenation { pub struct PrimaryConcatenation {
pub nodes: (Concatenation, Option<Bracket<RangeExpression>>), pub nodes: (Concatenation, Option<Bracket<RangeExpression>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PrimaryMultipleConcatenation { pub struct PrimaryMultipleConcatenation {
pub nodes: (MultipleConcatenation, Option<Bracket<RangeExpression>>), pub nodes: (MultipleConcatenation, Option<Bracket<RangeExpression>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PrimaryMintypmaxExpression { pub struct PrimaryMintypmaxExpression {
pub nodes: (Paren<MintypmaxExpression>,), pub nodes: (Paren<MintypmaxExpression>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClassQualifierOrPackageScope { pub enum ClassQualifierOrPackageScope {
ClassQualifier(Box<ClassQualifier>), ClassQualifier(Box<ClassQualifier>),
PackageScope(Box<PackageScope>), PackageScope(Box<PackageScope>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassQualifier { pub struct ClassQualifier {
pub nodes: (Option<Local>, Option<ImplicitClassHandleOrClassScope>), pub nodes: (Option<Local>, Option<ImplicitClassHandleOrClassScope>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum RangeExpression { pub enum RangeExpression {
Expression(Box<Expression>), Expression(Box<Expression>),
PartSelectRange(Box<PartSelectRange>), PartSelectRange(Box<PartSelectRange>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PrimaryLiteral { pub enum PrimaryLiteral {
Number(Box<Number>), Number(Box<Number>),
TimeLiteral(Box<TimeLiteral>), TimeLiteral(Box<TimeLiteral>),
@ -148,23 +148,23 @@ pub enum PrimaryLiteral {
StringLiteral(Box<StringLiteral>), StringLiteral(Box<StringLiteral>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TimeLiteral { pub enum TimeLiteral {
Unsigned(Box<TimeLiteralUnsigned>), Unsigned(Box<TimeLiteralUnsigned>),
FixedPoint(Box<TimeLiteralFixedPoint>), FixedPoint(Box<TimeLiteralFixedPoint>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimeLiteralUnsigned { pub struct TimeLiteralUnsigned {
pub nodes: (UnsignedNumber, TimeUnit), pub nodes: (UnsignedNumber, TimeUnit),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimeLiteralFixedPoint { pub struct TimeLiteralFixedPoint {
pub nodes: (FixedPointNumber, TimeUnit), pub nodes: (FixedPointNumber, TimeUnit),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TimeUnit { pub enum TimeUnit {
S(Box<Keyword>), S(Box<Keyword>),
MS(Box<Keyword>), MS(Box<Keyword>),
@ -174,19 +174,19 @@ pub enum TimeUnit {
FS(Box<Keyword>), FS(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ImplicitClassHandle { pub enum ImplicitClassHandle {
This(Box<Keyword>), This(Box<Keyword>),
Super(Box<Keyword>), Super(Box<Keyword>),
ThisSuper(Box<(Keyword, Symbol, Keyword)>), ThisSuper(Box<(Keyword, Symbol, Keyword)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BitSelect { pub struct BitSelect {
pub nodes: (Vec<Bracket<Expression>>,), pub nodes: (Vec<Bracket<Expression>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Select { pub struct Select {
pub nodes: ( pub nodes: (
Option<( Option<(
@ -199,7 +199,7 @@ pub struct Select {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonrangeSelect { pub struct NonrangeSelect {
pub nodes: ( pub nodes: (
Option<( Option<(
@ -211,12 +211,12 @@ pub struct NonrangeSelect {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantBitSelect { pub struct ConstantBitSelect {
pub nodes: (Vec<Bracket<ConstantExpression>>,), pub nodes: (Vec<Bracket<ConstantExpression>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantSelect { pub struct ConstantSelect {
pub nodes: ( pub nodes: (
Option<( Option<(
@ -229,17 +229,17 @@ pub struct ConstantSelect {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantCast { pub struct ConstantCast {
pub nodes: (CastingType, Symbol, Paren<ConstantExpression>), pub nodes: (CastingType, Symbol, Paren<ConstantExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantLetExpression { pub struct ConstantLetExpression {
pub nodes: (LetExpression,), pub nodes: (LetExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Cast { pub struct Cast {
pub nodes: (CastingType, Symbol, Paren<Expression>), pub nodes: (CastingType, Symbol, Paren<Expression>),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StringLiteral { pub struct StringLiteral {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }

View File

@ -2,12 +2,12 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantFunctionCall { pub struct ConstantFunctionCall {
pub nodes: (FunctionSubroutineCall,), pub nodes: (FunctionSubroutineCall,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TfCall { pub struct TfCall {
pub nodes: ( pub nodes: (
PsOrHierarchicalTfIdentifier, PsOrHierarchicalTfIdentifier,
@ -16,19 +16,19 @@ pub struct TfCall {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SystemTfCall { pub enum SystemTfCall {
ArgOptionl(Box<SystemTfCallArgOptional>), ArgOptionl(Box<SystemTfCallArgOptional>),
ArgDataType(Box<SystemTfCallArgDataType>), ArgDataType(Box<SystemTfCallArgDataType>),
ArgExpression(Box<SystemTfCallArgExpression>), ArgExpression(Box<SystemTfCallArgExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SystemTfCallArgOptional { pub struct SystemTfCallArgOptional {
pub nodes: (SystemTfIdentifier, Option<Paren<ListOfArguments>>), pub nodes: (SystemTfIdentifier, Option<Paren<ListOfArguments>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SystemTfCallArgDataType { pub struct SystemTfCallArgDataType {
pub nodes: ( pub nodes: (
SystemTfIdentifier, SystemTfIdentifier,
@ -36,7 +36,7 @@ pub struct SystemTfCallArgDataType {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SystemTfCallArgExpression { pub struct SystemTfCallArgExpression {
pub nodes: ( pub nodes: (
SystemTfIdentifier, SystemTfIdentifier,
@ -47,7 +47,7 @@ pub struct SystemTfCallArgExpression {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SubroutineCall { pub enum SubroutineCall {
TfCall(Box<TfCall>), TfCall(Box<TfCall>),
SystemTfCall(Box<SystemTfCall>), SystemTfCall(Box<SystemTfCall>),
@ -55,23 +55,23 @@ pub enum SubroutineCall {
Randomize(Box<SubroutineCallRandomize>), Randomize(Box<SubroutineCallRandomize>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SubroutineCallRandomize { pub struct SubroutineCallRandomize {
pub nodes: (Option<(Keyword, Symbol)>, RandomizeCall), pub nodes: (Option<(Keyword, Symbol)>, RandomizeCall),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FunctionSubroutineCall { pub struct FunctionSubroutineCall {
pub nodes: (SubroutineCall,), pub nodes: (SubroutineCall,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ListOfArguments { pub enum ListOfArguments {
Ordered(Box<ListOfArgumentsOrdered>), Ordered(Box<ListOfArgumentsOrdered>),
Named(Box<ListOfArgumentsNamed>), Named(Box<ListOfArgumentsNamed>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfArgumentsOrdered { pub struct ListOfArgumentsOrdered {
pub nodes: ( pub nodes: (
List<Symbol, Option<Expression>>, List<Symbol, Option<Expression>>,
@ -79,7 +79,7 @@ pub struct ListOfArgumentsOrdered {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfArgumentsNamed { pub struct ListOfArgumentsNamed {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -89,18 +89,18 @@ pub struct ListOfArgumentsNamed {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct MethodCall { pub struct MethodCall {
pub nodes: (MethodCallRoot, Symbol, MethodCallBody), pub nodes: (MethodCallRoot, Symbol, MethodCallBody),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum MethodCallBody { pub enum MethodCallBody {
User(Box<MethodCallBodyUser>), User(Box<MethodCallBodyUser>),
BuiltInMethodCall(Box<BuiltInMethodCall>), BuiltInMethodCall(Box<BuiltInMethodCall>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct MethodCallBodyUser { pub struct MethodCallBodyUser {
pub nodes: ( pub nodes: (
MethodIdentifier, MethodIdentifier,
@ -109,13 +109,13 @@ pub struct MethodCallBodyUser {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BuiltInMethodCall { pub enum BuiltInMethodCall {
ArrayManipulationCall(Box<ArrayManipulationCall>), ArrayManipulationCall(Box<ArrayManipulationCall>),
RandomizeCall(Box<RandomizeCall>), RandomizeCall(Box<RandomizeCall>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ArrayManipulationCall { pub struct ArrayManipulationCall {
pub nodes: ( pub nodes: (
ArrayMethodName, ArrayMethodName,
@ -125,7 +125,7 @@ pub struct ArrayManipulationCall {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RandomizeCall { pub struct RandomizeCall {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -139,19 +139,19 @@ pub struct RandomizeCall {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum VariableIdentifierListOrNull { pub enum VariableIdentifierListOrNull {
VariableIdentifierList(Box<VariableIdentifierList>), VariableIdentifierList(Box<VariableIdentifierList>),
Null(Box<Keyword>), Null(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum MethodCallRoot { pub enum MethodCallRoot {
Primary(Box<Primary>), Primary(Box<Primary>),
ImplicitClassHandle(Box<ImplicitClassHandle>), ImplicitClassHandle(Box<ImplicitClassHandle>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ArrayMethodName { pub enum ArrayMethodName {
MethodIdentifier(Box<MethodIdentifier>), MethodIdentifier(Box<MethodIdentifier>),
Unique(Box<Keyword>), Unique(Box<Keyword>),

View File

@ -2,12 +2,12 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AttributeInstance { pub struct AttributeInstance {
pub nodes: (Symbol, List<Symbol, AttrSpec>, Symbol), pub nodes: (Symbol, List<Symbol, AttrSpec>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AttrSpec { pub struct AttrSpec {
pub nodes: (Identifier, Option<(Symbol, ConstantExpression)>), pub nodes: (Identifier, Option<(Symbol, ConstantExpression)>),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Comment { pub struct Comment {
pub nodes: (Locate,), pub nodes: (Locate,),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CompilerDirective { pub enum CompilerDirective {
ResetallCompilerDirective(Box<ResetallCompilerDirective>), ResetallCompilerDirective(Box<ResetallCompilerDirective>),
IncludeCompilerDirective(Box<IncludeCompilerDirective>), IncludeCompilerDirective(Box<IncludeCompilerDirective>),
@ -24,68 +24,68 @@ pub enum CompilerDirective {
EndkeywordsDirective(Box<EndkeywordsDirective>), EndkeywordsDirective(Box<EndkeywordsDirective>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ResetallCompilerDirective { pub struct ResetallCompilerDirective {
pub nodes: (Symbol, Keyword), pub nodes: (Symbol, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum IncludeCompilerDirective { pub enum IncludeCompilerDirective {
DoubleQuote(Box<IncludeCompilerDirectiveDoubleQuote>), DoubleQuote(Box<IncludeCompilerDirectiveDoubleQuote>),
AngleBracket(Box<IncludeCompilerDirectiveAngleBracket>), AngleBracket(Box<IncludeCompilerDirectiveAngleBracket>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IncludeCompilerDirectiveDoubleQuote { pub struct IncludeCompilerDirectiveDoubleQuote {
pub nodes: (Symbol, Keyword, StringLiteral), pub nodes: (Symbol, Keyword, StringLiteral),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IncludeCompilerDirectiveAngleBracket { pub struct IncludeCompilerDirectiveAngleBracket {
pub nodes: (Symbol, Keyword, AngleBracketLiteral), pub nodes: (Symbol, Keyword, AngleBracketLiteral),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AngleBracketLiteral { pub struct AngleBracketLiteral {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TextMacroDefinition { pub struct TextMacroDefinition {
pub nodes: (Symbol, Keyword, TextMacroName, Option<MacroText>), pub nodes: (Symbol, Keyword, TextMacroName, Option<MacroText>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TextMacroName { pub struct TextMacroName {
pub nodes: (TextMacroIdentifier, Option<Paren<ListOfFormalArguments>>), pub nodes: (TextMacroIdentifier, Option<Paren<ListOfFormalArguments>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfFormalArguments { pub struct ListOfFormalArguments {
pub nodes: (List<Symbol, FormalArgument>,), pub nodes: (List<Symbol, FormalArgument>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FormalArgument { pub struct FormalArgument {
pub nodes: (SimpleIdentifier, Option<(Symbol, DefaultText)>), pub nodes: (SimpleIdentifier, Option<(Symbol, DefaultText)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TextMacroIdentifier { pub struct TextMacroIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct MacroText { pub struct MacroText {
pub nodes: (Locate,), pub nodes: (Locate,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DefaultText { pub struct DefaultText {
pub nodes: (Locate,), pub nodes: (Locate,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TextMacroUsage { pub struct TextMacroUsage {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -94,33 +94,33 @@ pub struct TextMacroUsage {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfActualArguments { pub struct ListOfActualArguments {
pub nodes: (List<Symbol, ActualArgument>,), pub nodes: (List<Symbol, ActualArgument>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ActualArgument { pub struct ActualArgument {
pub nodes: (Expression,), pub nodes: (Expression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UndefineCompilerDirective { pub struct UndefineCompilerDirective {
pub nodes: (Symbol, Keyword, TextMacroIdentifier), pub nodes: (Symbol, Keyword, TextMacroIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UndefineallCompilerDirective { pub struct UndefineallCompilerDirective {
pub nodes: (Symbol, Keyword), pub nodes: (Symbol, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConditionalCompilerDirective { pub enum ConditionalCompilerDirective {
IfdefDirective(Box<IfdefDirective>), IfdefDirective(Box<IfdefDirective>),
IfndefDirective(Box<IfndefDirective>), IfndefDirective(Box<IfndefDirective>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IfdefDirective { pub struct IfdefDirective {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -134,7 +134,7 @@ pub struct IfdefDirective {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IfndefDirective { pub struct IfndefDirective {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -148,74 +148,74 @@ pub struct IfndefDirective {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IfdefGroupOfLines { pub struct IfdefGroupOfLines {
pub nodes: (Vec<SourceDescription>,), pub nodes: (Vec<SourceDescription>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IfndefGroupOfLines { pub struct IfndefGroupOfLines {
pub nodes: (Vec<SourceDescription>,), pub nodes: (Vec<SourceDescription>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ElsifGroupOfLines { pub struct ElsifGroupOfLines {
pub nodes: (Vec<SourceDescription>,), pub nodes: (Vec<SourceDescription>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ElseGroupOfLines { pub struct ElseGroupOfLines {
pub nodes: (Vec<SourceDescription>,), pub nodes: (Vec<SourceDescription>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SourceDescription { pub enum SourceDescription {
Comment(Box<Comment>), Comment(Box<Comment>),
NotDirective(Box<SourceDescriptionNotDirective>), NotDirective(Box<SourceDescriptionNotDirective>),
CompilerDirective(Box<CompilerDirective>), CompilerDirective(Box<CompilerDirective>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SourceDescriptionNotDirective { pub struct SourceDescriptionNotDirective {
pub nodes: (Locate,), pub nodes: (Locate,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimescaleCompilerDirective { pub struct TimescaleCompilerDirective {
pub nodes: (Symbol, Keyword, TimeLiteral, Symbol, TimeLiteral), pub nodes: (Symbol, Keyword, TimeLiteral, Symbol, TimeLiteral),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DefaultNettypeCompilerDirective { pub struct DefaultNettypeCompilerDirective {
pub nodes: (Symbol, Keyword, DefaultNettypeValue), pub nodes: (Symbol, Keyword, DefaultNettypeValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DefaultNettypeValue { pub struct DefaultNettypeValue {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UnconnectedDriveCompilerDirective { pub struct UnconnectedDriveCompilerDirective {
pub nodes: (Symbol, Keyword, Keyword), pub nodes: (Symbol, Keyword, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NounconnectedDriveCompilerDirective { pub struct NounconnectedDriveCompilerDirective {
pub nodes: (Symbol, Keyword), pub nodes: (Symbol, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CelldefineDriveCompilerDirective { pub struct CelldefineDriveCompilerDirective {
pub nodes: (Symbol, Keyword), pub nodes: (Symbol, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EndcelldefineDriveCompilerDirective { pub struct EndcelldefineDriveCompilerDirective {
pub nodes: (Symbol, Keyword), pub nodes: (Symbol, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Pragma { pub struct Pragma {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -225,24 +225,24 @@ pub struct Pragma {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PragmaName { pub struct PragmaName {
pub nodes: (SimpleIdentifier,), pub nodes: (SimpleIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PragmaExpression { pub enum PragmaExpression {
PragmaKeyword(Box<PragmaKeyword>), PragmaKeyword(Box<PragmaKeyword>),
Assignment(Box<PragmaExpressionAssignment>), Assignment(Box<PragmaExpressionAssignment>),
PragmaValue(Box<PragmaValue>), PragmaValue(Box<PragmaValue>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PragmaExpressionAssignment { pub struct PragmaExpressionAssignment {
pub nodes: (PragmaKeyword, Symbol, PragmaValue), pub nodes: (PragmaKeyword, Symbol, PragmaValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PragmaValue { pub enum PragmaValue {
Paren(Box<PragmaValueParen>), Paren(Box<PragmaValueParen>),
Number(Box<Number>), Number(Box<Number>),
@ -250,42 +250,42 @@ pub enum PragmaValue {
Identifier(Box<Identifier>), Identifier(Box<Identifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PragmaValueParen { pub struct PragmaValueParen {
pub nodes: (Paren<List<Symbol, PragmaExpression>>,), pub nodes: (Paren<List<Symbol, PragmaExpression>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PragmaKeyword { pub struct PragmaKeyword {
pub nodes: (SimpleIdentifier,), pub nodes: (SimpleIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LineCompilerDirective { pub struct LineCompilerDirective {
pub nodes: (Symbol, Keyword, Number, StringLiteral, Level), pub nodes: (Symbol, Keyword, Number, StringLiteral, Level),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PositionCompilerDirective { pub struct PositionCompilerDirective {
pub nodes: (Symbol, Keyword), pub nodes: (Symbol, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Level { pub struct Level {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct KeywordsDirective { pub struct KeywordsDirective {
pub nodes: (Symbol, Keyword, Symbol, VersionSpecifier, Symbol), pub nodes: (Symbol, Keyword, Symbol, VersionSpecifier, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VersionSpecifier { pub struct VersionSpecifier {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EndkeywordsDirective { pub struct EndkeywordsDirective {
pub nodes: (Symbol, Keyword), pub nodes: (Symbol, Keyword),
} }

View File

@ -2,142 +2,142 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ArrayIdentifier { pub struct ArrayIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BlockIdentifier { pub struct BlockIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BinIdentifier { pub struct BinIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CIdentifier { pub struct CIdentifier {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CellIdentifier { pub struct CellIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CheckerIdentifier { pub struct CheckerIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassIdentifier { pub struct ClassIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassVariableIdentifier { pub struct ClassVariableIdentifier {
pub nodes: (VariableIdentifier,), pub nodes: (VariableIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClockingIdentifier { pub struct ClockingIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConfigIdentifier { pub struct ConfigIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstIdentifier { pub struct ConstIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintIdentifier { pub struct ConstraintIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CovergroupIdentifier { pub struct CovergroupIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CovergroupVariableIdentifier { pub struct CovergroupVariableIdentifier {
pub nodes: (VariableIdentifier,), pub nodes: (VariableIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CoverPointIdentifier { pub struct CoverPointIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CrossIdentifier { pub struct CrossIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DynamicArrayVariableIdentifier { pub struct DynamicArrayVariableIdentifier {
pub nodes: (VariableIdentifier,), pub nodes: (VariableIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EnumIdentifier { pub struct EnumIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EscapedIdentifier { pub struct EscapedIdentifier {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FormalIdentifier { pub struct FormalIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FormalPortIdentifier { pub struct FormalPortIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FunctionIdentifier { pub struct FunctionIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GenerateBlockIdentifier { pub struct GenerateBlockIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GenvarIdentifier { pub struct GenvarIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalArrayIdentifier { pub struct HierarchicalArrayIdentifier {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalBlockIdentifier { pub struct HierarchicalBlockIdentifier {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalEventIdentifier { pub struct HierarchicalEventIdentifier {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalIdentifier { pub struct HierarchicalIdentifier {
pub nodes: ( pub nodes: (
Option<Root>, Option<Root>,
@ -146,189 +146,189 @@ pub struct HierarchicalIdentifier {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Root { pub struct Root {
pub nodes: (Keyword, Symbol), pub nodes: (Keyword, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalNetIdentifier { pub struct HierarchicalNetIdentifier {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalParameterIdentifier { pub struct HierarchicalParameterIdentifier {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalPropertyIdentifier { pub struct HierarchicalPropertyIdentifier {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalSequenceIdentifier { pub struct HierarchicalSequenceIdentifier {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalTaskIdentifier { pub struct HierarchicalTaskIdentifier {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalTfIdentifier { pub struct HierarchicalTfIdentifier {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalVariableIdentifier { pub struct HierarchicalVariableIdentifier {
pub nodes: (HierarchicalIdentifier,), pub nodes: (HierarchicalIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Identifier { pub enum Identifier {
SimpleIdentifier(Box<SimpleIdentifier>), SimpleIdentifier(Box<SimpleIdentifier>),
EscapedIdentifier(Box<EscapedIdentifier>), EscapedIdentifier(Box<EscapedIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IndexVariableIdentifier { pub struct IndexVariableIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceIdentifier { pub struct InterfaceIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceInstanceIdentifier { pub struct InterfaceInstanceIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InoutPortIdentifier { pub struct InoutPortIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InputPortIdentifier { pub struct InputPortIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InstanceIdentifier { pub struct InstanceIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LibraryIdentifier { pub struct LibraryIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct MemberIdentifier { pub struct MemberIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct MethodIdentifier { pub struct MethodIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModportIdentifier { pub struct ModportIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleIdentifier { pub struct ModuleIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetIdentifier { pub struct NetIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetTypeIdentifier { pub struct NetTypeIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OutputPortIdentifier { pub struct OutputPortIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PackageIdentifier { pub struct PackageIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PackageScope { pub enum PackageScope {
Package(Box<PackageScopePackage>), Package(Box<PackageScopePackage>),
Unit(Box<Unit>), Unit(Box<Unit>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PackageScopePackage { pub struct PackageScopePackage {
pub nodes: (PackageIdentifier, Symbol), pub nodes: (PackageIdentifier, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Unit { pub struct Unit {
pub nodes: (Keyword, Symbol), pub nodes: (Keyword, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParameterIdentifier { pub struct ParameterIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PortIdentifier { pub struct PortIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProductionIdentifier { pub struct ProductionIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProgramIdentifier { pub struct ProgramIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PropertyIdentifier { pub struct PropertyIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsClassIdentifier { pub struct PsClassIdentifier {
pub nodes: (Option<PackageScope>, ClassIdentifier), pub nodes: (Option<PackageScope>, ClassIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsCovergroupIdentifier { pub struct PsCovergroupIdentifier {
pub nodes: (Option<PackageScope>, CovergroupIdentifier), pub nodes: (Option<PackageScope>, CovergroupIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsCheckerIdentifier { pub struct PsCheckerIdentifier {
pub nodes: (Option<PackageScope>, CheckerIdentifier), pub nodes: (Option<PackageScope>, CheckerIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsIdentifier { pub struct PsIdentifier {
pub nodes: (Option<PackageScope>, Identifier), pub nodes: (Option<PackageScope>, Identifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsOrHierarchicalArrayIdentifier { pub struct PsOrHierarchicalArrayIdentifier {
pub nodes: ( pub nodes: (
Option<ImplicitClassHandleOrClassScopeOrPackageScope>, Option<ImplicitClassHandleOrClassScopeOrPackageScope>,
@ -336,82 +336,82 @@ pub struct PsOrHierarchicalArrayIdentifier {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PsOrHierarchicalNetIdentifier { pub enum PsOrHierarchicalNetIdentifier {
PackageScope(Box<PsOrHierarchicalNetIdentifierPackageScope>), PackageScope(Box<PsOrHierarchicalNetIdentifierPackageScope>),
HierarchicalNetIdentifier(Box<HierarchicalNetIdentifier>), HierarchicalNetIdentifier(Box<HierarchicalNetIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsOrHierarchicalNetIdentifierPackageScope { pub struct PsOrHierarchicalNetIdentifierPackageScope {
pub nodes: (Option<PackageScope>, NetIdentifier), pub nodes: (Option<PackageScope>, NetIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsOrHierarchicalNetIdentifierHierarchical { pub struct PsOrHierarchicalNetIdentifierHierarchical {
pub nodes: (HierarchicalNetIdentifier), pub nodes: (HierarchicalNetIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PsOrHierarchicalPropertyIdentifier { pub enum PsOrHierarchicalPropertyIdentifier {
PackageScope(Box<PsOrHierarchicalPropertyIdentifierPackageScope>), PackageScope(Box<PsOrHierarchicalPropertyIdentifierPackageScope>),
HierarchicalPropertyIdentifier(Box<HierarchicalPropertyIdentifier>), HierarchicalPropertyIdentifier(Box<HierarchicalPropertyIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsOrHierarchicalPropertyIdentifierPackageScope { pub struct PsOrHierarchicalPropertyIdentifierPackageScope {
pub nodes: (Option<PackageScope>, PropertyIdentifier), pub nodes: (Option<PackageScope>, PropertyIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsOrHierarchicalPropertyIdentifierHierarchical { pub struct PsOrHierarchicalPropertyIdentifierHierarchical {
pub nodes: (HierarchicalPropertyIdentifier), pub nodes: (HierarchicalPropertyIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PsOrHierarchicalSequenceIdentifier { pub enum PsOrHierarchicalSequenceIdentifier {
PackageScope(Box<PsOrHierarchicalSequenceIdentifierPackageScope>), PackageScope(Box<PsOrHierarchicalSequenceIdentifierPackageScope>),
HierarchicalSequenceIdentifier(Box<HierarchicalSequenceIdentifier>), HierarchicalSequenceIdentifier(Box<HierarchicalSequenceIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsOrHierarchicalSequenceIdentifierPackageScope { pub struct PsOrHierarchicalSequenceIdentifierPackageScope {
pub nodes: (Option<PackageScope>, SequenceIdentifier), pub nodes: (Option<PackageScope>, SequenceIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsOrHierarchicalSequenceIdentifierHierarchical { pub struct PsOrHierarchicalSequenceIdentifierHierarchical {
pub nodes: (HierarchicalSequenceIdentifier), pub nodes: (HierarchicalSequenceIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PsOrHierarchicalTfIdentifier { pub enum PsOrHierarchicalTfIdentifier {
PackageScope(Box<PsOrHierarchicalTfIdentifierPackageScope>), PackageScope(Box<PsOrHierarchicalTfIdentifierPackageScope>),
HierarchicalTfIdentifier(Box<HierarchicalTfIdentifier>), HierarchicalTfIdentifier(Box<HierarchicalTfIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsOrHierarchicalTfIdentifierPackageScope { pub struct PsOrHierarchicalTfIdentifierPackageScope {
pub nodes: (Option<PackageScope>, TfIdentifier), pub nodes: (Option<PackageScope>, TfIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsOrHierarchicalTfIdentifierHierarchical { pub struct PsOrHierarchicalTfIdentifierHierarchical {
pub nodes: (HierarchicalTfIdentifier), pub nodes: (HierarchicalTfIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PsParameterIdentifier { pub enum PsParameterIdentifier {
Scope(Box<PsParameterIdentifierScope>), Scope(Box<PsParameterIdentifierScope>),
Generate(Box<PsParameterIdentifierGenerate>), Generate(Box<PsParameterIdentifierGenerate>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsParameterIdentifierScope { pub struct PsParameterIdentifierScope {
pub nodes: (Option<PackageScopeOrClassScope>, ParameterIdentifier), pub nodes: (Option<PackageScopeOrClassScope>, ParameterIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsParameterIdentifierGenerate { pub struct PsParameterIdentifierGenerate {
pub nodes: ( pub nodes: (
Vec<( Vec<(
@ -423,103 +423,103 @@ pub struct PsParameterIdentifierGenerate {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PsTypeIdentifier { pub struct PsTypeIdentifier {
pub nodes: (Option<LocalOrPackageScopeOrClassScope>, TypeIdentifier), pub nodes: (Option<LocalOrPackageScopeOrClassScope>, TypeIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum LocalOrPackageScopeOrClassScope { pub enum LocalOrPackageScopeOrClassScope {
Local(Box<Local>), Local(Box<Local>),
PackageScope(Box<PackageScope>), PackageScope(Box<PackageScope>),
ClassScope(Box<ClassScope>), ClassScope(Box<ClassScope>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Local { pub struct Local {
pub nodes: (Keyword, Symbol), pub nodes: (Keyword, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequenceIdentifier { pub struct SequenceIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SignalIdentifier { pub struct SignalIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SimpleIdentifier { pub struct SimpleIdentifier {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SpecparamIdentifier { pub struct SpecparamIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SystemTfIdentifier { pub struct SystemTfIdentifier {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TaskIdentifier { pub struct TaskIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TfIdentifier { pub struct TfIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TerminalIdentifier { pub struct TerminalIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TopmoduleIdentifier { pub struct TopmoduleIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TypeIdentifier { pub struct TypeIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpIdentifier { pub struct UdpIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariableIdentifier { pub struct VariableIdentifier {
pub nodes: (Identifier,), pub nodes: (Identifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ImplicitClassHandleOrClassScopeOrPackageScope { pub enum ImplicitClassHandleOrClassScopeOrPackageScope {
ImplicitClassHandle(Box<(ImplicitClassHandle, Symbol)>), ImplicitClassHandle(Box<(ImplicitClassHandle, Symbol)>),
ClassScope(Box<ClassScope>), ClassScope(Box<ClassScope>),
PackageScope(Box<PackageScope>), PackageScope(Box<PackageScope>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ImplicitClassHandleOrPackageScope { pub enum ImplicitClassHandleOrPackageScope {
ImplicitClassHandle(Box<(ImplicitClassHandle, Symbol)>), ImplicitClassHandle(Box<(ImplicitClassHandle, Symbol)>),
PackageScope(Box<PackageScope>), PackageScope(Box<PackageScope>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ImplicitClassHandleOrClassScope { pub enum ImplicitClassHandleOrClassScope {
ImplicitClassHandle(Box<(ImplicitClassHandle, Symbol)>), ImplicitClassHandle(Box<(ImplicitClassHandle, Symbol)>),
ClassScope(Box<ClassScope>), ClassScope(Box<ClassScope>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PackageScopeOrClassScope { pub enum PackageScopeOrClassScope {
PackageScope(Box<PackageScope>), PackageScope(Box<PackageScope>),
ClassScope(Box<ClassScope>), ClassScope(Box<ClassScope>),

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CheckerInstantiation { pub struct CheckerInstantiation {
pub nodes: ( pub nodes: (
PsCheckerIdentifier, PsCheckerIdentifier,
@ -12,34 +12,34 @@ pub struct CheckerInstantiation {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ListOfCheckerPortConnections { pub enum ListOfCheckerPortConnections {
Ordered(Box<ListOfCheckerPortConnectionsOrdered>), Ordered(Box<ListOfCheckerPortConnectionsOrdered>),
Named(Box<ListOfCheckerPortConnectionsNamed>), Named(Box<ListOfCheckerPortConnectionsNamed>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfCheckerPortConnectionsOrdered { pub struct ListOfCheckerPortConnectionsOrdered {
pub nodes: (List<Symbol, OrderedCheckerPortConnection>,), pub nodes: (List<Symbol, OrderedCheckerPortConnection>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfCheckerPortConnectionsNamed { pub struct ListOfCheckerPortConnectionsNamed {
pub nodes: (List<Symbol, NamedCheckerPortConnection>,), pub nodes: (List<Symbol, NamedCheckerPortConnection>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OrderedCheckerPortConnection { pub struct OrderedCheckerPortConnection {
pub nodes: (Vec<AttributeInstance>, Option<PropertyActualArg>), pub nodes: (Vec<AttributeInstance>, Option<PropertyActualArg>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NamedCheckerPortConnection { pub enum NamedCheckerPortConnection {
Identifier(Box<NamedCheckerPortConnectionIdentifier>), Identifier(Box<NamedCheckerPortConnectionIdentifier>),
Asterisk(Box<NamedCheckerPortConnectionAsterisk>), Asterisk(Box<NamedCheckerPortConnectionAsterisk>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NamedCheckerPortConnectionIdentifier { pub struct NamedCheckerPortConnectionIdentifier {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -49,7 +49,7 @@ pub struct NamedCheckerPortConnectionIdentifier {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NamedCheckerPortConnectionAsterisk { pub struct NamedCheckerPortConnectionAsterisk {
pub nodes: (Vec<AttributeInstance>, Symbol), pub nodes: (Vec<AttributeInstance>, Symbol),
} }

View File

@ -2,12 +2,12 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GenerateRegion { pub struct GenerateRegion {
pub nodes: (Keyword, Vec<GenerateItem>, Keyword), pub nodes: (Keyword, Vec<GenerateItem>, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LoopGenerateConstruct { pub struct LoopGenerateConstruct {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -22,45 +22,45 @@ pub struct LoopGenerateConstruct {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GenvarInitialization { pub struct GenvarInitialization {
pub nodes: (Option<Genvar>, GenvarIdentifier, Symbol, ConstantExpression), pub nodes: (Option<Genvar>, GenvarIdentifier, Symbol, ConstantExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Genvar { pub struct Genvar {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum GenvarIteration { pub enum GenvarIteration {
Assignment(Box<GenvarIterationAssignment>), Assignment(Box<GenvarIterationAssignment>),
Prefix(Box<GenvarIterationPrefix>), Prefix(Box<GenvarIterationPrefix>),
Suffix(Box<GenvarIterationSuffix>), Suffix(Box<GenvarIterationSuffix>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GenvarIterationAssignment { pub struct GenvarIterationAssignment {
pub nodes: (GenvarIdentifier, AssignmentOperator, GenvarExpression), pub nodes: (GenvarIdentifier, AssignmentOperator, GenvarExpression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GenvarIterationPrefix { pub struct GenvarIterationPrefix {
pub nodes: (IncOrDecOperator, GenvarIdentifier), pub nodes: (IncOrDecOperator, GenvarIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GenvarIterationSuffix { pub struct GenvarIterationSuffix {
pub nodes: (GenvarIdentifier, IncOrDecOperator), pub nodes: (GenvarIdentifier, IncOrDecOperator),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConditionalGenerateConstruct { pub enum ConditionalGenerateConstruct {
If(Box<IfGenerateConstruct>), If(Box<IfGenerateConstruct>),
Case(Box<CaseGenerateConstruct>), Case(Box<CaseGenerateConstruct>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IfGenerateConstruct { pub struct IfGenerateConstruct {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -70,7 +70,7 @@ pub struct IfGenerateConstruct {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseGenerateConstruct { pub struct CaseGenerateConstruct {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -80,29 +80,29 @@ pub struct CaseGenerateConstruct {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CaseGenerateItem { pub enum CaseGenerateItem {
Nondefault(Box<CaseGenerateItemNondefault>), Nondefault(Box<CaseGenerateItemNondefault>),
Default(Box<CaseGenerateItemDefault>), Default(Box<CaseGenerateItemDefault>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseGenerateItemNondefault { pub struct CaseGenerateItemNondefault {
pub nodes: (List<Symbol, ConstantExpression>, Symbol, GenerateBlock), pub nodes: (List<Symbol, ConstantExpression>, Symbol, GenerateBlock),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CaseGenerateItemDefault { pub struct CaseGenerateItemDefault {
pub nodes: (Keyword, Option<Symbol>, GenerateBlock), pub nodes: (Keyword, Option<Symbol>, GenerateBlock),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum GenerateBlock { pub enum GenerateBlock {
GenerateItem(Box<GenerateItem>), GenerateItem(Box<GenerateItem>),
Multiple(Box<GenerateBlockMultiple>), Multiple(Box<GenerateBlockMultiple>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GenerateBlockMultiple { pub struct GenerateBlockMultiple {
pub nodes: ( pub nodes: (
Option<(GenerateBlockIdentifier, Symbol)>, Option<(GenerateBlockIdentifier, Symbol)>,
@ -114,7 +114,7 @@ pub struct GenerateBlockMultiple {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum GenerateItem { pub enum GenerateItem {
ModuleOrGenerateItem(Box<ModuleOrGenerateItem>), ModuleOrGenerateItem(Box<ModuleOrGenerateItem>),
InterfaceOrGenerateItem(Box<InterfaceOrGenerateItem>), InterfaceOrGenerateItem(Box<InterfaceOrGenerateItem>),

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceInstantiation { pub struct InterfaceInstantiation {
pub nodes: ( pub nodes: (
InterfaceIdentifier, InterfaceIdentifier,

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleInstantiation { pub struct ModuleInstantiation {
pub nodes: ( pub nodes: (
ModuleIdentifier, ModuleIdentifier,
@ -12,75 +12,75 @@ pub struct ModuleInstantiation {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParameterValueAssignment { pub struct ParameterValueAssignment {
pub nodes: (Symbol, Paren<Option<ListOfParameterAssignments>>), pub nodes: (Symbol, Paren<Option<ListOfParameterAssignments>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ListOfParameterAssignments { pub enum ListOfParameterAssignments {
Ordered(Box<ListOfParameterAssignmentsOrdered>), Ordered(Box<ListOfParameterAssignmentsOrdered>),
Named(Box<ListOfParameterAssignmentsNamed>), Named(Box<ListOfParameterAssignmentsNamed>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfParameterAssignmentsOrdered { pub struct ListOfParameterAssignmentsOrdered {
pub nodes: (List<Symbol, OrderedParameterAssignment>,), pub nodes: (List<Symbol, OrderedParameterAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfParameterAssignmentsNamed { pub struct ListOfParameterAssignmentsNamed {
pub nodes: (List<Symbol, NamedParameterAssignment>,), pub nodes: (List<Symbol, NamedParameterAssignment>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OrderedParameterAssignment { pub struct OrderedParameterAssignment {
pub nodes: (ParamExpression,), pub nodes: (ParamExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NamedParameterAssignment { pub struct NamedParameterAssignment {
pub nodes: (Symbol, ParameterIdentifier, Paren<Option<ParamExpression>>), pub nodes: (Symbol, ParameterIdentifier, Paren<Option<ParamExpression>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalInstance { pub struct HierarchicalInstance {
pub nodes: (NameOfInstance, Paren<Option<ListOfPortConnections>>), pub nodes: (NameOfInstance, Paren<Option<ListOfPortConnections>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NameOfInstance { pub struct NameOfInstance {
pub nodes: (InstanceIdentifier, Vec<UnpackedDimension>), pub nodes: (InstanceIdentifier, Vec<UnpackedDimension>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ListOfPortConnections { pub enum ListOfPortConnections {
Ordered(Box<ListOfPortConnectionsOrdered>), Ordered(Box<ListOfPortConnectionsOrdered>),
Named(Box<ListOfPortConnectionsNamed>), Named(Box<ListOfPortConnectionsNamed>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfPortConnectionsOrdered { pub struct ListOfPortConnectionsOrdered {
pub nodes: (List<Symbol, OrderedPortConnection>,), pub nodes: (List<Symbol, OrderedPortConnection>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfPortConnectionsNamed { pub struct ListOfPortConnectionsNamed {
pub nodes: (List<Symbol, NamedPortConnection>,), pub nodes: (List<Symbol, NamedPortConnection>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OrderedPortConnection { pub struct OrderedPortConnection {
pub nodes: (Vec<AttributeInstance>, Option<Expression>), pub nodes: (Vec<AttributeInstance>, Option<Expression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NamedPortConnection { pub enum NamedPortConnection {
Identifier(Box<NamedPortConnectionIdentifier>), Identifier(Box<NamedPortConnectionIdentifier>),
Asterisk(Box<NamedPortConnectionAsterisk>), Asterisk(Box<NamedPortConnectionAsterisk>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NamedPortConnectionIdentifier { pub struct NamedPortConnectionIdentifier {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -90,7 +90,7 @@ pub struct NamedPortConnectionIdentifier {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NamedPortConnectionAsterisk { pub struct NamedPortConnectionAsterisk {
pub nodes: (Vec<AttributeInstance>, Symbol), pub nodes: (Vec<AttributeInstance>, Symbol),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProgramInstantiation { pub struct ProgramInstantiation {
pub nodes: ( pub nodes: (
ProgramIdentifier, ProgramIdentifier,

View File

@ -36,6 +36,12 @@ pub struct Locate {
pub len: usize, pub len: usize,
} }
impl Locate {
pub fn str<'a, 'b>(&'a self, s: &'b str) -> &'b str {
&s[self.offset..self.offset + self.len]
}
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
pub trait Node<'a> { pub trait Node<'a> {

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PreprocessorText { pub struct PreprocessorText {
pub nodes: (Vec<SourceDescription>,), pub nodes: (Vec<SourceDescription>,),
} }

View File

@ -2,37 +2,37 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CmosSwitchtype { pub struct CmosSwitchtype {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EnableGatetype { pub struct EnableGatetype {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct MosSwitchtype { pub struct MosSwitchtype {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NInputGatetype { pub struct NInputGatetype {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NOutputGatetype { pub struct NOutputGatetype {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PassEnSwitchtype { pub struct PassEnSwitchtype {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PassSwitchtype { pub struct PassSwitchtype {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum GateInstantiation { pub enum GateInstantiation {
Cmos(Box<GateInstantiationCmos>), Cmos(Box<GateInstantiationCmos>),
Enable(Box<GateInstantiationEnable>), Enable(Box<GateInstantiationEnable>),
@ -15,7 +15,7 @@ pub enum GateInstantiation {
Pullup(Box<GateInstantiationPullup>), Pullup(Box<GateInstantiationPullup>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GateInstantiationCmos { pub struct GateInstantiationCmos {
pub nodes: ( pub nodes: (
CmosSwitchtype, CmosSwitchtype,
@ -25,7 +25,7 @@ pub struct GateInstantiationCmos {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GateInstantiationEnable { pub struct GateInstantiationEnable {
pub nodes: ( pub nodes: (
EnableGatetype, EnableGatetype,
@ -36,7 +36,7 @@ pub struct GateInstantiationEnable {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GateInstantiationMos { pub struct GateInstantiationMos {
pub nodes: ( pub nodes: (
MosSwitchtype, MosSwitchtype,
@ -46,7 +46,7 @@ pub struct GateInstantiationMos {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GateInstantiationNInput { pub struct GateInstantiationNInput {
pub nodes: ( pub nodes: (
NInputGatetype, NInputGatetype,
@ -57,7 +57,7 @@ pub struct GateInstantiationNInput {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GateInstantiationNOutput { pub struct GateInstantiationNOutput {
pub nodes: ( pub nodes: (
NOutputGatetype, NOutputGatetype,
@ -68,7 +68,7 @@ pub struct GateInstantiationNOutput {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GateInstantiationPassEn { pub struct GateInstantiationPassEn {
pub nodes: ( pub nodes: (
PassEnSwitchtype, PassEnSwitchtype,
@ -78,12 +78,12 @@ pub struct GateInstantiationPassEn {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GateInstantiationPass { pub struct GateInstantiationPass {
pub nodes: (PassSwitchtype, List<Symbol, PassSwitchInstance>, Symbol), pub nodes: (PassSwitchtype, List<Symbol, PassSwitchInstance>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GateInstantiationPulldown { pub struct GateInstantiationPulldown {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -93,7 +93,7 @@ pub struct GateInstantiationPulldown {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct GateInstantiationPullup { pub struct GateInstantiationPullup {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -103,7 +103,7 @@ pub struct GateInstantiationPullup {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CmosSwitchInstance { pub struct CmosSwitchInstance {
pub nodes: ( pub nodes: (
Option<NameOfInstance>, Option<NameOfInstance>,
@ -119,7 +119,7 @@ pub struct CmosSwitchInstance {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EnableGateInstance { pub struct EnableGateInstance {
pub nodes: ( pub nodes: (
Option<NameOfInstance>, Option<NameOfInstance>,
@ -133,7 +133,7 @@ pub struct EnableGateInstance {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct MosSwitchInstance { pub struct MosSwitchInstance {
pub nodes: ( pub nodes: (
Option<NameOfInstance>, Option<NameOfInstance>,
@ -147,7 +147,7 @@ pub struct MosSwitchInstance {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NInputGateInstance { pub struct NInputGateInstance {
pub nodes: ( pub nodes: (
Option<NameOfInstance>, Option<NameOfInstance>,
@ -155,7 +155,7 @@ pub struct NInputGateInstance {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NOutputGateInstance { pub struct NOutputGateInstance {
pub nodes: ( pub nodes: (
Option<NameOfInstance>, Option<NameOfInstance>,
@ -163,7 +163,7 @@ pub struct NOutputGateInstance {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PassSwitchInstance { pub struct PassSwitchInstance {
pub nodes: ( pub nodes: (
Option<NameOfInstance>, Option<NameOfInstance>,
@ -171,7 +171,7 @@ pub struct PassSwitchInstance {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PassEnableSwitchInstance { pub struct PassEnableSwitchInstance {
pub nodes: ( pub nodes: (
Option<NameOfInstance>, Option<NameOfInstance>,
@ -179,7 +179,7 @@ pub struct PassEnableSwitchInstance {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PullGateInstance { pub struct PullGateInstance {
pub nodes: (Option<NameOfInstance>, Paren<OutputTerminal>), pub nodes: (Option<NameOfInstance>, Paren<OutputTerminal>),
} }

View File

@ -2,46 +2,46 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PulldownStrength { pub enum PulldownStrength {
Strength01(Box<PulldownStrength01>), Strength01(Box<PulldownStrength01>),
Strength10(Box<PulldownStrength10>), Strength10(Box<PulldownStrength10>),
Strength0(Box<PulldownStrength0>), Strength0(Box<PulldownStrength0>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PulldownStrength01 { pub struct PulldownStrength01 {
pub nodes: (Paren<(Strength0, Symbol, Strength1)>,), pub nodes: (Paren<(Strength0, Symbol, Strength1)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PulldownStrength10 { pub struct PulldownStrength10 {
pub nodes: (Paren<(Strength1, Symbol, Strength0)>,), pub nodes: (Paren<(Strength1, Symbol, Strength0)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PulldownStrength0 { pub struct PulldownStrength0 {
pub nodes: (Paren<Strength0>,), pub nodes: (Paren<Strength0>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PullupStrength { pub enum PullupStrength {
Strength01(Box<PullupStrength01>), Strength01(Box<PullupStrength01>),
Strength10(Box<PullupStrength10>), Strength10(Box<PullupStrength10>),
Strength1(Box<PullupStrength1>), Strength1(Box<PullupStrength1>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PullupStrength01 { pub struct PullupStrength01 {
pub nodes: (Paren<(Strength0, Symbol, Strength1)>,), pub nodes: (Paren<(Strength0, Symbol, Strength1)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PullupStrength10 { pub struct PullupStrength10 {
pub nodes: (Paren<(Strength1, Symbol, Strength0)>,), pub nodes: (Paren<(Strength1, Symbol, Strength0)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PullupStrength1 { pub struct PullupStrength1 {
pub nodes: (Paren<Strength1>,), pub nodes: (Paren<Strength1>,),
} }

View File

@ -2,32 +2,32 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EnableTerminal { pub struct EnableTerminal {
pub nodes: (Expression,), pub nodes: (Expression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InoutTerminal { pub struct InoutTerminal {
pub nodes: (NetLvalue,), pub nodes: (NetLvalue,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InputTerminal { pub struct InputTerminal {
pub nodes: (Expression,), pub nodes: (Expression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NcontrolTerminal { pub struct NcontrolTerminal {
pub nodes: (Expression,), pub nodes: (Expression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OutputTerminal { pub struct OutputTerminal {
pub nodes: (NetLvalue,), pub nodes: (NetLvalue,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PcontrolTerminal { pub struct PcontrolTerminal {
pub nodes: (Expression,), pub nodes: (Expression,),
} }

View File

@ -2,12 +2,12 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CheckerPortList { pub struct CheckerPortList {
pub nodes: (List<Symbol, CheckerPortItem>,), pub nodes: (List<Symbol, CheckerPortItem>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CheckerPortItem { pub struct CheckerPortItem {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -19,13 +19,13 @@ pub struct CheckerPortItem {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CheckerPortDirection { pub enum CheckerPortDirection {
Input(Box<Keyword>), Input(Box<Keyword>),
Output(Box<Keyword>), Output(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CheckerOrGenerateItem { pub enum CheckerOrGenerateItem {
CheckerOrGenerateItemDeclaration(Box<CheckerOrGenerateItemDeclaration>), CheckerOrGenerateItemDeclaration(Box<CheckerOrGenerateItemDeclaration>),
InitialConstruct(Box<InitialConstruct>), InitialConstruct(Box<InitialConstruct>),
@ -36,7 +36,7 @@ pub enum CheckerOrGenerateItem {
CheckerGenerateItem(Box<CheckerGenerateItem>), CheckerGenerateItem(Box<CheckerGenerateItem>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CheckerOrGenerateItemDeclaration { pub enum CheckerOrGenerateItemDeclaration {
Data(Box<CheckerOrGenerateItemDeclarationData>), Data(Box<CheckerOrGenerateItemDeclarationData>),
FunctionDeclaration(Box<FunctionDeclaration>), FunctionDeclaration(Box<FunctionDeclaration>),
@ -50,27 +50,27 @@ pub enum CheckerOrGenerateItemDeclaration {
Empty(Box<Symbol>), Empty(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CheckerOrGenerateItemDeclarationData { pub struct CheckerOrGenerateItemDeclarationData {
pub nodes: (Option<Rand>, DataDeclaration), pub nodes: (Option<Rand>, DataDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Rand { pub struct Rand {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CheckerOrGenerateItemDeclarationClocking { pub struct CheckerOrGenerateItemDeclarationClocking {
pub nodes: (Keyword, Keyword, ClockingIdentifier, Symbol), pub nodes: (Keyword, Keyword, ClockingIdentifier, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CheckerOrGenerateItemDeclarationDisable { pub struct CheckerOrGenerateItemDeclarationDisable {
pub nodes: (Keyword, Keyword, Keyword, ExpressionOrDist, Symbol), pub nodes: (Keyword, Keyword, Keyword, ExpressionOrDist, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum CheckerGenerateItem { pub enum CheckerGenerateItem {
LoopGenerateConstruct(Box<LoopGenerateConstruct>), LoopGenerateConstruct(Box<LoopGenerateConstruct>),
ConditionalGenerateConstruct(Box<ConditionalGenerateConstruct>), ConditionalGenerateConstruct(Box<ConditionalGenerateConstruct>),

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClassItem { pub enum ClassItem {
Property(Box<ClassItemProperty>), Property(Box<ClassItemProperty>),
Method(Box<ClassItemMethod>), Method(Box<ClassItemMethod>),
@ -14,43 +14,43 @@ pub enum ClassItem {
Empty(Box<Symbol>), Empty(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassItemProperty { pub struct ClassItemProperty {
pub nodes: (Vec<AttributeInstance>, ClassProperty), pub nodes: (Vec<AttributeInstance>, ClassProperty),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassItemMethod { pub struct ClassItemMethod {
pub nodes: (Vec<AttributeInstance>, ClassMethod), pub nodes: (Vec<AttributeInstance>, ClassMethod),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassItemConstraint { pub struct ClassItemConstraint {
pub nodes: (Vec<AttributeInstance>, ClassConstraint), pub nodes: (Vec<AttributeInstance>, ClassConstraint),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassItemDeclaration { pub struct ClassItemDeclaration {
pub nodes: (Vec<AttributeInstance>, ClassDeclaration), pub nodes: (Vec<AttributeInstance>, ClassDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassItemCovergroup { pub struct ClassItemCovergroup {
pub nodes: (Vec<AttributeInstance>, CovergroupDeclaration), pub nodes: (Vec<AttributeInstance>, CovergroupDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClassProperty { pub enum ClassProperty {
NonConst(Box<ClassPropertyNonConst>), NonConst(Box<ClassPropertyNonConst>),
Const(Box<ClassPropertyConst>), Const(Box<ClassPropertyConst>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassPropertyNonConst { pub struct ClassPropertyNonConst {
pub nodes: (Vec<PropertyQualifier>, DataDeclaration), pub nodes: (Vec<PropertyQualifier>, DataDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassPropertyConst { pub struct ClassPropertyConst {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -62,7 +62,7 @@ pub struct ClassPropertyConst {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClassMethod { pub enum ClassMethod {
Task(Box<ClassMethodTask>), Task(Box<ClassMethodTask>),
Function(Box<ClassMethodFunction>), Function(Box<ClassMethodFunction>),
@ -72,17 +72,17 @@ pub enum ClassMethod {
ExternConstructor(Box<ClassMethodExternConstructor>), ExternConstructor(Box<ClassMethodExternConstructor>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassMethodTask { pub struct ClassMethodTask {
pub nodes: (Vec<MethodQualifier>, TaskDeclaration), pub nodes: (Vec<MethodQualifier>, TaskDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassMethodFunction { pub struct ClassMethodFunction {
pub nodes: (Vec<MethodQualifier>, FunctionDeclaration), pub nodes: (Vec<MethodQualifier>, FunctionDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassMethodPureVirtual { pub struct ClassMethodPureVirtual {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -93,65 +93,65 @@ pub struct ClassMethodPureVirtual {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassMethodExternMethod { pub struct ClassMethodExternMethod {
pub nodes: (Keyword, Vec<MethodQualifier>, MethodPrototype, Symbol), pub nodes: (Keyword, Vec<MethodQualifier>, MethodPrototype, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassMethodConstructor { pub struct ClassMethodConstructor {
pub nodes: (Vec<MethodQualifier>, ClassConstructorDeclaration), pub nodes: (Vec<MethodQualifier>, ClassConstructorDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassMethodExternConstructor { pub struct ClassMethodExternConstructor {
pub nodes: (Keyword, Vec<MethodQualifier>, ClassConstructorPrototype), pub nodes: (Keyword, Vec<MethodQualifier>, ClassConstructorPrototype),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassConstructorPrototype { pub struct ClassConstructorPrototype {
pub nodes: (Keyword, Keyword, Option<Paren<Option<TfPortList>>>, Symbol), pub nodes: (Keyword, Keyword, Option<Paren<Option<TfPortList>>>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClassConstraint { pub enum ClassConstraint {
ConstraintPrototype(Box<ConstraintPrototype>), ConstraintPrototype(Box<ConstraintPrototype>),
ConstraintDeclaration(Box<ConstraintDeclaration>), ConstraintDeclaration(Box<ConstraintDeclaration>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ClassItemQualifier { pub enum ClassItemQualifier {
Static(Box<Keyword>), Static(Box<Keyword>),
Protected(Box<Keyword>), Protected(Box<Keyword>),
Local(Box<Keyword>), Local(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PropertyQualifier { pub enum PropertyQualifier {
RandomQualifier(Box<RandomQualifier>), RandomQualifier(Box<RandomQualifier>),
ClassItemQualifier(Box<ClassItemQualifier>), ClassItemQualifier(Box<ClassItemQualifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum RandomQualifier { pub enum RandomQualifier {
Rand(Box<Keyword>), Rand(Box<Keyword>),
Randc(Box<Keyword>), Randc(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum MethodQualifier { pub enum MethodQualifier {
Virtual(Box<Keyword>), Virtual(Box<Keyword>),
PureVirtual(Box<(Keyword, Keyword)>), PureVirtual(Box<(Keyword, Keyword)>),
ClassItemQualifier(Box<ClassItemQualifier>), ClassItemQualifier(Box<ClassItemQualifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum MethodPrototype { pub enum MethodPrototype {
TaskPrototype(Box<TaskPrototype>), TaskPrototype(Box<TaskPrototype>),
FunctionPrototype(Box<FunctionPrototype>), FunctionPrototype(Box<FunctionPrototype>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassConstructorDeclaration { pub struct ClassConstructorDeclaration {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -173,7 +173,7 @@ pub struct ClassConstructorDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct New { pub struct New {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConfigDeclaration { pub struct ConfigDeclaration {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -16,7 +16,7 @@ pub struct ConfigDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DesignStatement { pub struct DesignStatement {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -25,7 +25,7 @@ pub struct DesignStatement {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConfigRuleStatement { pub enum ConfigRuleStatement {
Default(Box<ConfigRuleStatementDefault>), Default(Box<ConfigRuleStatementDefault>),
InstLib(Box<ConfigRuleStatementInstLib>), InstLib(Box<ConfigRuleStatementInstLib>),
@ -34,64 +34,64 @@ pub enum ConfigRuleStatement {
CellUse(Box<ConfigRuleStatementCellUse>), CellUse(Box<ConfigRuleStatementCellUse>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConfigRuleStatementDefault { pub struct ConfigRuleStatementDefault {
pub nodes: (DefaultClause, LiblistClause, Symbol), pub nodes: (DefaultClause, LiblistClause, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConfigRuleStatementInstLib { pub struct ConfigRuleStatementInstLib {
pub nodes: (InstClause, LiblistClause, Symbol), pub nodes: (InstClause, LiblistClause, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConfigRuleStatementInstUse { pub struct ConfigRuleStatementInstUse {
pub nodes: (InstClause, UseClause, Symbol), pub nodes: (InstClause, UseClause, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConfigRuleStatementCellLib { pub struct ConfigRuleStatementCellLib {
pub nodes: (CellClause, LiblistClause, Symbol), pub nodes: (CellClause, LiblistClause, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConfigRuleStatementCellUse { pub struct ConfigRuleStatementCellUse {
pub nodes: (CellClause, UseClause, Symbol), pub nodes: (CellClause, UseClause, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DefaultClause { pub struct DefaultClause {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InstClause { pub struct InstClause {
pub nodes: (Keyword, InstName), pub nodes: (Keyword, InstName),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InstName { pub struct InstName {
pub nodes: (TopmoduleIdentifier, Vec<(Symbol, InstanceIdentifier)>), pub nodes: (TopmoduleIdentifier, Vec<(Symbol, InstanceIdentifier)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CellClause { pub struct CellClause {
pub nodes: (Keyword, Option<(LibraryIdentifier, Symbol)>, CellIdentifier), pub nodes: (Keyword, Option<(LibraryIdentifier, Symbol)>, CellIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LiblistClause { pub struct LiblistClause {
pub nodes: (Keyword, Vec<LibraryIdentifier>), pub nodes: (Keyword, Vec<LibraryIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum UseClause { pub enum UseClause {
Cell(Box<UseClauseCell>), Cell(Box<UseClauseCell>),
Named(Box<UseClauseNamed>), Named(Box<UseClauseNamed>),
CellNamed(Box<UseClauseCellNamed>), CellNamed(Box<UseClauseCellNamed>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UseClauseCell { pub struct UseClauseCell {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -101,7 +101,7 @@ pub struct UseClauseCell {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UseClauseNamed { pub struct UseClauseNamed {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -110,7 +110,7 @@ pub struct UseClauseNamed {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UseClauseCellNamed { pub struct UseClauseCellNamed {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -121,7 +121,7 @@ pub struct UseClauseCellNamed {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Config { pub struct Config {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintDeclaration { pub struct ConstraintDeclaration {
pub nodes: ( pub nodes: (
Option<Static>, Option<Static>,
@ -12,33 +12,33 @@ pub struct ConstraintDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Static { pub struct Static {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintBlock { pub struct ConstraintBlock {
pub nodes: (Brace<Vec<ConstraintBlockItem>>,), pub nodes: (Brace<Vec<ConstraintBlockItem>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstraintBlockItem { pub enum ConstraintBlockItem {
Solve(Box<ConstraintBlockItemSolve>), Solve(Box<ConstraintBlockItemSolve>),
ConstraintExpression(Box<ConstraintExpression>), ConstraintExpression(Box<ConstraintExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintBlockItemSolve { pub struct ConstraintBlockItemSolve {
pub nodes: (Keyword, SolveBeforeList, Keyword, SolveBeforeList, Symbol), pub nodes: (Keyword, SolveBeforeList, Keyword, SolveBeforeList, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SolveBeforeList { pub struct SolveBeforeList {
pub nodes: (List<Symbol, ConstraintPrimary>,), pub nodes: (List<Symbol, ConstraintPrimary>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintPrimary { pub struct ConstraintPrimary {
pub nodes: ( pub nodes: (
Option<ImplicitClassHandleOrClassScope>, Option<ImplicitClassHandleOrClassScope>,
@ -47,7 +47,7 @@ pub struct ConstraintPrimary {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstraintExpression { pub enum ConstraintExpression {
Expression(Box<ConstraintExpressionExpression>), Expression(Box<ConstraintExpressionExpression>),
UniquenessConstraint(Box<(UniquenessConstraint, Symbol)>), UniquenessConstraint(Box<(UniquenessConstraint, Symbol)>),
@ -57,22 +57,22 @@ pub enum ConstraintExpression {
Disable(Box<ConstraintExpressionDisable>), Disable(Box<ConstraintExpressionDisable>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintExpressionExpression { pub struct ConstraintExpressionExpression {
pub nodes: (Option<Soft>, ExpressionOrDist, Symbol), pub nodes: (Option<Soft>, ExpressionOrDist, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Soft { pub struct Soft {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintExpressionArrow { pub struct ConstraintExpressionArrow {
pub nodes: (Expression, Symbol, ConstraintSet), pub nodes: (Expression, Symbol, ConstraintSet),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintExpressionIf { pub struct ConstraintExpressionIf {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -82,7 +82,7 @@ pub struct ConstraintExpressionIf {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintExpressionForeach { pub struct ConstraintExpressionForeach {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -91,54 +91,54 @@ pub struct ConstraintExpressionForeach {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintExpressionDisable { pub struct ConstraintExpressionDisable {
pub nodes: (Keyword, Keyword, ConstraintPrimary, Symbol), pub nodes: (Keyword, Keyword, ConstraintPrimary, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UniquenessConstraint { pub struct UniquenessConstraint {
pub nodes: (Keyword, Brace<OpenRangeList>), pub nodes: (Keyword, Brace<OpenRangeList>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstraintSet { pub enum ConstraintSet {
ConstraintExpression(Box<ConstraintExpression>), ConstraintExpression(Box<ConstraintExpression>),
Brace(Box<ConstraintSetBrace>), Brace(Box<ConstraintSetBrace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintSetBrace { pub struct ConstraintSetBrace {
pub nodes: (Brace<Vec<ConstraintExpression>>,), pub nodes: (Brace<Vec<ConstraintExpression>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DistList { pub struct DistList {
pub nodes: (List<Symbol, DistItem>,), pub nodes: (List<Symbol, DistItem>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DistItem { pub struct DistItem {
pub nodes: (ValueRange, Option<DistWeight>), pub nodes: (ValueRange, Option<DistWeight>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DistWeight { pub enum DistWeight {
Equal(Box<DistWeightEqual>), Equal(Box<DistWeightEqual>),
Divide(Box<DistWeightDivide>), Divide(Box<DistWeightDivide>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DistWeightEqual { pub struct DistWeightEqual {
pub nodes: (Symbol, Expression), pub nodes: (Symbol, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DistWeightDivide { pub struct DistWeightDivide {
pub nodes: (Symbol, Expression), pub nodes: (Symbol, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstraintPrototype { pub struct ConstraintPrototype {
pub nodes: ( pub nodes: (
Option<ConstraintPrototypeQualifier>, Option<ConstraintPrototypeQualifier>,
@ -149,13 +149,13 @@ pub struct ConstraintPrototype {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ConstraintPrototypeQualifier { pub enum ConstraintPrototypeQualifier {
Extern(Box<Keyword>), Extern(Box<Keyword>),
Pure(Box<Keyword>), Pure(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ExternConstraintDeclaration { pub struct ExternConstraintDeclaration {
pub nodes: ( pub nodes: (
Option<Static>, Option<Static>,
@ -166,7 +166,7 @@ pub struct ExternConstraintDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IdentifierList { pub struct IdentifierList {
pub nodes: (List<Symbol, Identifier>,), pub nodes: (List<Symbol, Identifier>,),
} }

View File

@ -2,45 +2,45 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum InterfaceOrGenerateItem { pub enum InterfaceOrGenerateItem {
Module(Box<InterfaceOrGenerateItemModule>), Module(Box<InterfaceOrGenerateItemModule>),
Extern(Box<InterfaceOrGenerateItemExtern>), Extern(Box<InterfaceOrGenerateItemExtern>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceOrGenerateItemModule { pub struct InterfaceOrGenerateItemModule {
pub nodes: (Vec<AttributeInstance>, ModuleCommonItem), pub nodes: (Vec<AttributeInstance>, ModuleCommonItem),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceOrGenerateItemExtern { pub struct InterfaceOrGenerateItemExtern {
pub nodes: (Vec<AttributeInstance>, ExternTfDeclaration), pub nodes: (Vec<AttributeInstance>, ExternTfDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ExternTfDeclaration { pub enum ExternTfDeclaration {
Method(Box<ExternTfDeclarationMethod>), Method(Box<ExternTfDeclarationMethod>),
Task(Box<ExternTfDeclarationTask>), Task(Box<ExternTfDeclarationTask>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ExternTfDeclarationMethod { pub struct ExternTfDeclarationMethod {
pub nodes: (Keyword, MethodPrototype, Symbol), pub nodes: (Keyword, MethodPrototype, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ExternTfDeclarationTask { pub struct ExternTfDeclarationTask {
pub nodes: (Keyword, Keyword, TaskPrototype, Symbol), pub nodes: (Keyword, Keyword, TaskPrototype, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum InterfaceItem { pub enum InterfaceItem {
PortDeclaration(Box<(PortDeclaration, Symbol)>), PortDeclaration(Box<(PortDeclaration, Symbol)>),
NonPortInterfaceItem(Box<NonPortInterfaceItem>), NonPortInterfaceItem(Box<NonPortInterfaceItem>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NonPortInterfaceItem { pub enum NonPortInterfaceItem {
GenerateRegion(Box<GenerateRegion>), GenerateRegion(Box<GenerateRegion>),
InterfaceOrGenerateItem(Box<InterfaceOrGenerateItem>), InterfaceOrGenerateItem(Box<InterfaceOrGenerateItem>),

View File

@ -2,12 +2,12 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LibraryText { pub struct LibraryText {
pub nodes: (Vec<WhiteSpace>, Vec<LibraryDescription>), pub nodes: (Vec<WhiteSpace>, Vec<LibraryDescription>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum LibraryDescription { pub enum LibraryDescription {
LibraryDeclaration(Box<LibraryDeclaration>), LibraryDeclaration(Box<LibraryDeclaration>),
IncludeStatement(Box<IncludeStatement>), IncludeStatement(Box<IncludeStatement>),
@ -15,7 +15,7 @@ pub enum LibraryDescription {
Null(Box<Symbol>), Null(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LibraryDeclaration { pub struct LibraryDeclaration {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -26,18 +26,18 @@ pub struct LibraryDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct IncludeStatement { pub struct IncludeStatement {
pub nodes: (Keyword, FilePathSpec, Symbol), pub nodes: (Keyword, FilePathSpec, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum FilePathSpec { pub enum FilePathSpec {
Literal(StringLiteral), Literal(StringLiteral),
NonLiteral(FilePathSpecNonLiteral), NonLiteral(FilePathSpecNonLiteral),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FilePathSpecNonLiteral { pub struct FilePathSpecNonLiteral {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ElaborationSystemTask { pub enum ElaborationSystemTask {
TaskFatal(Box<ElaborationSystemTaskFatal>), TaskFatal(Box<ElaborationSystemTaskFatal>),
TaskError(Box<ElaborationSystemTaskError>), TaskError(Box<ElaborationSystemTaskError>),
@ -10,7 +10,7 @@ pub enum ElaborationSystemTask {
TaskInfo(Box<ElaborationSystemTaskInfo>), TaskInfo(Box<ElaborationSystemTaskInfo>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ElaborationSystemTaskFatal { pub struct ElaborationSystemTaskFatal {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -19,29 +19,29 @@ pub struct ElaborationSystemTaskFatal {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ElaborationSystemTaskError { pub struct ElaborationSystemTaskError {
pub nodes: (Keyword, Option<Paren<Option<ListOfArguments>>>, Symbol), pub nodes: (Keyword, Option<Paren<Option<ListOfArguments>>>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ElaborationSystemTaskWarning { pub struct ElaborationSystemTaskWarning {
pub nodes: (Keyword, Option<Paren<Option<ListOfArguments>>>, Symbol), pub nodes: (Keyword, Option<Paren<Option<ListOfArguments>>>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ElaborationSystemTaskInfo { pub struct ElaborationSystemTaskInfo {
pub nodes: (Keyword, Option<Paren<Option<ListOfArguments>>>, Symbol), pub nodes: (Keyword, Option<Paren<Option<ListOfArguments>>>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum FinishNumber { pub enum FinishNumber {
Zero(Box<Symbol>), Zero(Box<Symbol>),
One(Box<Symbol>), One(Box<Symbol>),
Two(Box<Symbol>), Two(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModuleCommonItem { pub enum ModuleCommonItem {
ModuleOrGenerateItemDeclaration(Box<ModuleOrGenerateItemDeclaration>), ModuleOrGenerateItemDeclaration(Box<ModuleOrGenerateItemDeclaration>),
InterfaceInstantiation(Box<InterfaceInstantiation>), InterfaceInstantiation(Box<InterfaceInstantiation>),
@ -58,13 +58,13 @@ pub enum ModuleCommonItem {
ElaborationSystemTask(Box<ElaborationSystemTask>), ElaborationSystemTask(Box<ElaborationSystemTask>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModuleItem { pub enum ModuleItem {
PortDeclaration(Box<(PortDeclaration, Symbol)>), PortDeclaration(Box<(PortDeclaration, Symbol)>),
NonPortModuleItem(Box<NonPortModuleItem>), NonPortModuleItem(Box<NonPortModuleItem>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModuleOrGenerateItem { pub enum ModuleOrGenerateItem {
Parameter(Box<ModuleOrGenerateItemParameter>), Parameter(Box<ModuleOrGenerateItemParameter>),
Gate(Box<ModuleOrGenerateItemGate>), Gate(Box<ModuleOrGenerateItemGate>),
@ -73,32 +73,32 @@ pub enum ModuleOrGenerateItem {
ModuleItem(Box<ModuleOrGenerateItemModuleItem>), ModuleItem(Box<ModuleOrGenerateItemModuleItem>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleOrGenerateItemParameter { pub struct ModuleOrGenerateItemParameter {
pub nodes: (Vec<AttributeInstance>, ParameterOverride), pub nodes: (Vec<AttributeInstance>, ParameterOverride),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleOrGenerateItemGate { pub struct ModuleOrGenerateItemGate {
pub nodes: (Vec<AttributeInstance>, GateInstantiation), pub nodes: (Vec<AttributeInstance>, GateInstantiation),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleOrGenerateItemUdp { pub struct ModuleOrGenerateItemUdp {
pub nodes: (Vec<AttributeInstance>, UdpInstantiation), pub nodes: (Vec<AttributeInstance>, UdpInstantiation),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleOrGenerateItemModule { pub struct ModuleOrGenerateItemModule {
pub nodes: (Vec<AttributeInstance>, ModuleInstantiation), pub nodes: (Vec<AttributeInstance>, ModuleInstantiation),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleOrGenerateItemModuleItem { pub struct ModuleOrGenerateItemModuleItem {
pub nodes: (Vec<AttributeInstance>, ModuleCommonItem), pub nodes: (Vec<AttributeInstance>, ModuleCommonItem),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModuleOrGenerateItemDeclaration { pub enum ModuleOrGenerateItemDeclaration {
PackageOrGenerateItemDeclaration(Box<PackageOrGenerateItemDeclaration>), PackageOrGenerateItemDeclaration(Box<PackageOrGenerateItemDeclaration>),
GenvarDeclaration(Box<GenvarDeclaration>), GenvarDeclaration(Box<GenvarDeclaration>),
@ -107,17 +107,17 @@ pub enum ModuleOrGenerateItemDeclaration {
Disable(Box<ModuleOrGenerateItemDeclarationDisable>), Disable(Box<ModuleOrGenerateItemDeclarationDisable>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleOrGenerateItemDeclarationClocking { pub struct ModuleOrGenerateItemDeclarationClocking {
pub nodes: (Keyword, Keyword, ClockingIdentifier, Symbol), pub nodes: (Keyword, Keyword, ClockingIdentifier, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleOrGenerateItemDeclarationDisable { pub struct ModuleOrGenerateItemDeclarationDisable {
pub nodes: (Keyword, Keyword, Keyword, ExpressionOrDist, Symbol), pub nodes: (Keyword, Keyword, Keyword, ExpressionOrDist, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NonPortModuleItem { pub enum NonPortModuleItem {
GenerateRegion(Box<GenerateRegion>), GenerateRegion(Box<GenerateRegion>),
ModuleOrGenerateItem(Box<ModuleOrGenerateItem>), ModuleOrGenerateItem(Box<ModuleOrGenerateItem>),
@ -129,23 +129,23 @@ pub enum NonPortModuleItem {
TimeunitsDeclaration(Box<TimeunitsDeclaration>), TimeunitsDeclaration(Box<TimeunitsDeclaration>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonPortModuleItemSpecparam { pub struct NonPortModuleItemSpecparam {
pub nodes: (Vec<AttributeInstance>, SpecparamDeclaration), pub nodes: (Vec<AttributeInstance>, SpecparamDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParameterOverride { pub struct ParameterOverride {
pub nodes: (Keyword, ListOfDefparamAssignments, Symbol), pub nodes: (Keyword, ListOfDefparamAssignments, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BindDirective { pub enum BindDirective {
Scope(Box<BindDirectiveScope>), Scope(Box<BindDirectiveScope>),
Instance(Box<BindDirectiveInstance>), Instance(Box<BindDirectiveInstance>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BindDirectiveScope { pub struct BindDirectiveScope {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -155,28 +155,28 @@ pub struct BindDirectiveScope {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BindDirectiveInstance { pub struct BindDirectiveInstance {
pub nodes: (Keyword, BindTargetInstance, BindInstantiation), pub nodes: (Keyword, BindTargetInstance, BindInstantiation),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BindTargetScope { pub enum BindTargetScope {
ModuleIdentifier(Box<ModuleIdentifier>), ModuleIdentifier(Box<ModuleIdentifier>),
InterfaceIdentifier(Box<InterfaceIdentifier>), InterfaceIdentifier(Box<InterfaceIdentifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BindTargetInstance { pub struct BindTargetInstance {
pub nodes: (HierarchicalIdentifier, ConstantBitSelect), pub nodes: (HierarchicalIdentifier, ConstantBitSelect),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct BindTargetInstanceList { pub struct BindTargetInstanceList {
pub nodes: (List<Symbol, BindTargetInstance>,), pub nodes: (List<Symbol, BindTargetInstance>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum BindInstantiation { pub enum BindInstantiation {
ProgramInstantiation(Box<ProgramInstantiation>), ProgramInstantiation(Box<ProgramInstantiation>),
ModuleInstantiation(Box<ModuleInstantiation>), ModuleInstantiation(Box<ModuleInstantiation>),

View File

@ -2,14 +2,14 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ParameterPortList { pub enum ParameterPortList {
Assignment(Box<ParameterPortListAssignment>), Assignment(Box<ParameterPortListAssignment>),
Declaration(Box<ParameterPortListDeclaration>), Declaration(Box<ParameterPortListDeclaration>),
Empty(Box<(Symbol, Symbol, Symbol)>), Empty(Box<(Symbol, Symbol, Symbol)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParameterPortListAssignment { pub struct ParameterPortListAssignment {
pub nodes: ( pub nodes: (
Symbol, Symbol,
@ -20,12 +20,12 @@ pub struct ParameterPortListAssignment {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParameterPortListDeclaration { pub struct ParameterPortListDeclaration {
pub nodes: (Symbol, Paren<List<Symbol, ParameterPortDeclaration>>), pub nodes: (Symbol, Paren<List<Symbol, ParameterPortDeclaration>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ParameterPortDeclaration { pub enum ParameterPortDeclaration {
ParameterDeclaration(Box<ParameterDeclaration>), ParameterDeclaration(Box<ParameterDeclaration>),
LocalParameterDeclaration(Box<LocalParameterDeclaration>), LocalParameterDeclaration(Box<LocalParameterDeclaration>),
@ -33,27 +33,27 @@ pub enum ParameterPortDeclaration {
TypeList(Box<ParameterPortDeclarationTypeList>), TypeList(Box<ParameterPortDeclarationTypeList>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParameterPortDeclarationParamList { pub struct ParameterPortDeclarationParamList {
pub nodes: (DataType, ListOfParamAssignments), pub nodes: (DataType, ListOfParamAssignments),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParameterPortDeclarationTypeList { pub struct ParameterPortDeclarationTypeList {
pub nodes: (Keyword, ListOfTypeAssignments), pub nodes: (Keyword, ListOfTypeAssignments),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfPorts { pub struct ListOfPorts {
pub nodes: (Paren<List<Symbol, Port>>,), pub nodes: (Paren<List<Symbol, Port>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfPortDeclarations { pub struct ListOfPortDeclarations {
pub nodes: (Paren<Option<List<Symbol, (Vec<AttributeInstance>, AnsiPortDeclaration)>>>,), pub nodes: (Paren<Option<List<Symbol, (Vec<AttributeInstance>, AnsiPortDeclaration)>>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PortDeclaration { pub enum PortDeclaration {
Inout(Box<PortDeclarationInout>), Inout(Box<PortDeclarationInout>),
Input(Box<PortDeclarationInput>), Input(Box<PortDeclarationInput>),
@ -62,64 +62,64 @@ pub enum PortDeclaration {
Interface(Box<PortDeclarationInterface>), Interface(Box<PortDeclarationInterface>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PortDeclarationInout { pub struct PortDeclarationInout {
pub nodes: (Vec<AttributeInstance>, InoutDeclaration), pub nodes: (Vec<AttributeInstance>, InoutDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PortDeclarationInput { pub struct PortDeclarationInput {
pub nodes: (Vec<AttributeInstance>, InputDeclaration), pub nodes: (Vec<AttributeInstance>, InputDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PortDeclarationOutput { pub struct PortDeclarationOutput {
pub nodes: (Vec<AttributeInstance>, OutputDeclaration), pub nodes: (Vec<AttributeInstance>, OutputDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PortDeclarationRef { pub struct PortDeclarationRef {
pub nodes: (Vec<AttributeInstance>, RefDeclaration), pub nodes: (Vec<AttributeInstance>, RefDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PortDeclarationInterface { pub struct PortDeclarationInterface {
pub nodes: (Vec<AttributeInstance>, InterfacePortDeclaration), pub nodes: (Vec<AttributeInstance>, InterfacePortDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Port { pub enum Port {
NonNamed(Box<PortNonNamed>), NonNamed(Box<PortNonNamed>),
Named(Box<PortNamed>), Named(Box<PortNamed>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PortNonNamed { pub struct PortNonNamed {
pub nodes: (Option<PortExpression>,), pub nodes: (Option<PortExpression>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PortNamed { pub struct PortNamed {
pub nodes: (Symbol, PortIdentifier, Paren<Option<PortExpression>>), pub nodes: (Symbol, PortIdentifier, Paren<Option<PortExpression>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PortExpression { pub enum PortExpression {
PortReference(Box<PortReference>), PortReference(Box<PortReference>),
Brace(Box<PortExpressionBrace>), Brace(Box<PortExpressionBrace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PortExpressionBrace { pub struct PortExpressionBrace {
pub nodes: (Brace<List<Symbol, PortReference>>,), pub nodes: (Brace<List<Symbol, PortReference>>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PortReference { pub struct PortReference {
pub nodes: (PortIdentifier, ConstantSelect), pub nodes: (PortIdentifier, ConstantSelect),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PortDirection { pub enum PortDirection {
Input(Box<Keyword>), Input(Box<Keyword>),
Output(Box<Keyword>), Output(Box<Keyword>),
@ -127,45 +127,45 @@ pub enum PortDirection {
Ref(Box<Keyword>), Ref(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NetPortHeader { pub struct NetPortHeader {
pub nodes: (Option<PortDirection>, NetPortType), pub nodes: (Option<PortDirection>, NetPortType),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct VariablePortHeader { pub struct VariablePortHeader {
pub nodes: (Option<PortDirection>, VariablePortType), pub nodes: (Option<PortDirection>, VariablePortType),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum InterfacePortHeader { pub enum InterfacePortHeader {
Identifier(Box<InterfacePortHeaderIdentifier>), Identifier(Box<InterfacePortHeaderIdentifier>),
Interface(Box<InterfacePortHeaderInterface>), Interface(Box<InterfacePortHeaderInterface>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfacePortHeaderIdentifier { pub struct InterfacePortHeaderIdentifier {
pub nodes: (InterfaceIdentifier, Option<(Symbol, ModportIdentifier)>), pub nodes: (InterfaceIdentifier, Option<(Symbol, ModportIdentifier)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfacePortHeaderInterface { pub struct InterfacePortHeaderInterface {
pub nodes: (Keyword, Option<(Symbol, ModportIdentifier)>), pub nodes: (Keyword, Option<(Symbol, ModportIdentifier)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NetPortHeaderOrInterfacePortHeader { pub enum NetPortHeaderOrInterfacePortHeader {
NetPortHeader(Box<NetPortHeader>), NetPortHeader(Box<NetPortHeader>),
InterfacePortHeader(Box<InterfacePortHeader>), InterfacePortHeader(Box<InterfacePortHeader>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum AnsiPortDeclaration { pub enum AnsiPortDeclaration {
Net(Box<AnsiPortDeclarationNet>), Net(Box<AnsiPortDeclarationNet>),
Variable(Box<AnsiPortDeclarationVariable>), Variable(Box<AnsiPortDeclarationVariable>),
Paren(Box<AnsiPortDeclarationParen>), Paren(Box<AnsiPortDeclarationParen>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AnsiPortDeclarationNet { pub struct AnsiPortDeclarationNet {
pub nodes: ( pub nodes: (
Option<NetPortHeaderOrInterfacePortHeader>, Option<NetPortHeaderOrInterfacePortHeader>,
@ -175,7 +175,7 @@ pub struct AnsiPortDeclarationNet {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AnsiPortDeclarationVariable { pub struct AnsiPortDeclarationVariable {
pub nodes: ( pub nodes: (
Option<VariablePortHeader>, Option<VariablePortHeader>,
@ -185,7 +185,7 @@ pub struct AnsiPortDeclarationVariable {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AnsiPortDeclarationParen { pub struct AnsiPortDeclarationParen {
pub nodes: ( pub nodes: (
Option<PortDirection>, Option<PortDirection>,

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PackageItem { pub enum PackageItem {
PackageOrGenerateItemDeclaration(Box<PackageOrGenerateItemDeclaration>), PackageOrGenerateItemDeclaration(Box<PackageOrGenerateItemDeclaration>),
AnonymousProgram(Box<AnonymousProgram>), AnonymousProgram(Box<AnonymousProgram>),
@ -10,7 +10,7 @@ pub enum PackageItem {
TimeunitsDeclaration(Box<TimeunitsDeclaration>), TimeunitsDeclaration(Box<TimeunitsDeclaration>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PackageOrGenerateItemDeclaration { pub enum PackageOrGenerateItemDeclaration {
NetDeclaration(Box<NetDeclaration>), NetDeclaration(Box<NetDeclaration>),
DataDeclaration(Box<DataDeclaration>), DataDeclaration(Box<DataDeclaration>),
@ -29,12 +29,12 @@ pub enum PackageOrGenerateItemDeclaration {
Empty(Box<Symbol>), Empty(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct AnonymousProgram { pub struct AnonymousProgram {
pub nodes: (Keyword, Symbol, Vec<AnonymousProgramItem>, Keyword), pub nodes: (Keyword, Symbol, Vec<AnonymousProgramItem>, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum AnonymousProgramItem { pub enum AnonymousProgramItem {
TaskDeclaration(Box<TaskDeclaration>), TaskDeclaration(Box<TaskDeclaration>),
FunctionDeclaration(Box<FunctionDeclaration>), FunctionDeclaration(Box<FunctionDeclaration>),

View File

@ -2,13 +2,13 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ProgramItem { pub enum ProgramItem {
PortDeclaration(Box<(PortDeclaration, Symbol)>), PortDeclaration(Box<(PortDeclaration, Symbol)>),
NonPortProgramItem(Box<NonPortProgramItem>), NonPortProgramItem(Box<NonPortProgramItem>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NonPortProgramItem { pub enum NonPortProgramItem {
Assign(Box<NonPortProgramItemAssign>), Assign(Box<NonPortProgramItemAssign>),
Module(Box<NonPortProgramItemModule>), Module(Box<NonPortProgramItemModule>),
@ -19,32 +19,32 @@ pub enum NonPortProgramItem {
ProgramGenerateItem(Box<ProgramGenerateItem>), ProgramGenerateItem(Box<ProgramGenerateItem>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonPortProgramItemAssign { pub struct NonPortProgramItemAssign {
pub nodes: (Vec<AttributeInstance>, ContinuousAssign), pub nodes: (Vec<AttributeInstance>, ContinuousAssign),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonPortProgramItemModule { pub struct NonPortProgramItemModule {
pub nodes: (Vec<AttributeInstance>, ModuleOrGenerateItemDeclaration), pub nodes: (Vec<AttributeInstance>, ModuleOrGenerateItemDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonPortProgramItemInitial { pub struct NonPortProgramItemInitial {
pub nodes: (Vec<AttributeInstance>, InitialConstruct), pub nodes: (Vec<AttributeInstance>, InitialConstruct),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonPortProgramItemFinal { pub struct NonPortProgramItemFinal {
pub nodes: (Vec<AttributeInstance>, FinalConstruct), pub nodes: (Vec<AttributeInstance>, FinalConstruct),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NonPortProgramItemAssertion { pub struct NonPortProgramItemAssertion {
pub nodes: (Vec<AttributeInstance>, ConcurrentAssertionItem), pub nodes: (Vec<AttributeInstance>, ConcurrentAssertionItem),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ProgramGenerateItem { pub enum ProgramGenerateItem {
LoopGenerateConstruct(Box<LoopGenerateConstruct>), LoopGenerateConstruct(Box<LoopGenerateConstruct>),
ConditionalGenerateConstruct(Box<ConditionalGenerateConstruct>), ConditionalGenerateConstruct(Box<ConditionalGenerateConstruct>),

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SourceText { pub struct SourceText {
pub nodes: ( pub nodes: (
Vec<WhiteSpace>, Vec<WhiteSpace>,
@ -11,7 +11,7 @@ pub struct SourceText {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum Description { pub enum Description {
ModuleDeclaration(Box<ModuleDeclaration>), ModuleDeclaration(Box<ModuleDeclaration>),
UdpDeclaration(Box<UdpDeclaration>), UdpDeclaration(Box<UdpDeclaration>),
@ -24,17 +24,17 @@ pub enum Description {
ConfigDeclaration(Box<ConfigDeclaration>), ConfigDeclaration(Box<ConfigDeclaration>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DescriptionPackageItem { pub struct DescriptionPackageItem {
pub nodes: (Vec<AttributeInstance>, PackageItem), pub nodes: (Vec<AttributeInstance>, PackageItem),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DescriptionBindDirective { pub struct DescriptionBindDirective {
pub nodes: (Vec<AttributeInstance>, BindDirective), pub nodes: (Vec<AttributeInstance>, BindDirective),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleNonansiHeader { pub struct ModuleNonansiHeader {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -48,7 +48,7 @@ pub struct ModuleNonansiHeader {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleAnsiHeader { pub struct ModuleAnsiHeader {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -62,7 +62,7 @@ pub struct ModuleAnsiHeader {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModuleDeclaration { pub enum ModuleDeclaration {
Nonansi(Box<ModuleDeclarationNonansi>), Nonansi(Box<ModuleDeclarationNonansi>),
Ansi(Box<ModuleDeclarationAnsi>), Ansi(Box<ModuleDeclarationAnsi>),
@ -71,7 +71,7 @@ pub enum ModuleDeclaration {
ExternAnsi(Box<ModuleDeclarationExternAnsi>), ExternAnsi(Box<ModuleDeclarationExternAnsi>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleDeclarationNonansi { pub struct ModuleDeclarationNonansi {
pub nodes: ( pub nodes: (
ModuleNonansiHeader, ModuleNonansiHeader,
@ -82,7 +82,7 @@ pub struct ModuleDeclarationNonansi {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleDeclarationAnsi { pub struct ModuleDeclarationAnsi {
pub nodes: ( pub nodes: (
ModuleAnsiHeader, ModuleAnsiHeader,
@ -93,7 +93,7 @@ pub struct ModuleDeclarationAnsi {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleDeclarationWildcard { pub struct ModuleDeclarationWildcard {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -109,23 +109,23 @@ pub struct ModuleDeclarationWildcard {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleDeclarationExternNonansi { pub struct ModuleDeclarationExternNonansi {
pub nodes: (Keyword, ModuleNonansiHeader), pub nodes: (Keyword, ModuleNonansiHeader),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleDeclarationExternAnsi { pub struct ModuleDeclarationExternAnsi {
pub nodes: (Keyword, ModuleAnsiHeader), pub nodes: (Keyword, ModuleAnsiHeader),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ModuleKeyword { pub enum ModuleKeyword {
Module(Box<Keyword>), Module(Box<Keyword>),
Macromodule(Box<Keyword>), Macromodule(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum InterfaceDeclaration { pub enum InterfaceDeclaration {
Nonansi(Box<InterfaceDeclarationNonansi>), Nonansi(Box<InterfaceDeclarationNonansi>),
Ansi(Box<InterfaceDeclarationAnsi>), Ansi(Box<InterfaceDeclarationAnsi>),
@ -134,7 +134,7 @@ pub enum InterfaceDeclaration {
ExternAnsi(Box<InterfaceDeclarationExternAnsi>), ExternAnsi(Box<InterfaceDeclarationExternAnsi>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceDeclarationNonansi { pub struct InterfaceDeclarationNonansi {
pub nodes: ( pub nodes: (
InterfaceNonansiHeader, InterfaceNonansiHeader,
@ -145,7 +145,7 @@ pub struct InterfaceDeclarationNonansi {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceDeclarationAnsi { pub struct InterfaceDeclarationAnsi {
pub nodes: ( pub nodes: (
InterfaceAnsiHeader, InterfaceAnsiHeader,
@ -156,7 +156,7 @@ pub struct InterfaceDeclarationAnsi {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceDeclarationWildcard { pub struct InterfaceDeclarationWildcard {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -172,17 +172,17 @@ pub struct InterfaceDeclarationWildcard {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceDeclarationExternNonansi { pub struct InterfaceDeclarationExternNonansi {
pub nodes: (Keyword, InterfaceNonansiHeader), pub nodes: (Keyword, InterfaceNonansiHeader),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceDeclarationExternAnsi { pub struct InterfaceDeclarationExternAnsi {
pub nodes: (Keyword, InterfaceAnsiHeader), pub nodes: (Keyword, InterfaceAnsiHeader),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceNonansiHeader { pub struct InterfaceNonansiHeader {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -196,7 +196,7 @@ pub struct InterfaceNonansiHeader {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceAnsiHeader { pub struct InterfaceAnsiHeader {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -210,7 +210,7 @@ pub struct InterfaceAnsiHeader {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ProgramDeclaration { pub enum ProgramDeclaration {
Nonansi(Box<ProgramDeclarationNonansi>), Nonansi(Box<ProgramDeclarationNonansi>),
Ansi(Box<ProgramDeclarationAnsi>), Ansi(Box<ProgramDeclarationAnsi>),
@ -219,7 +219,7 @@ pub enum ProgramDeclaration {
ExternAnsi(Box<ProgramDeclarationExternAnsi>), ExternAnsi(Box<ProgramDeclarationExternAnsi>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProgramDeclarationNonansi { pub struct ProgramDeclarationNonansi {
pub nodes: ( pub nodes: (
ProgramNonansiHeader, ProgramNonansiHeader,
@ -230,7 +230,7 @@ pub struct ProgramDeclarationNonansi {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProgramDeclarationAnsi { pub struct ProgramDeclarationAnsi {
pub nodes: ( pub nodes: (
ProgramAnsiHeader, ProgramAnsiHeader,
@ -241,7 +241,7 @@ pub struct ProgramDeclarationAnsi {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProgramDeclarationWildcard { pub struct ProgramDeclarationWildcard {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -256,17 +256,17 @@ pub struct ProgramDeclarationWildcard {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProgramDeclarationExternNonansi { pub struct ProgramDeclarationExternNonansi {
pub nodes: (Keyword, ProgramNonansiHeader), pub nodes: (Keyword, ProgramNonansiHeader),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProgramDeclarationExternAnsi { pub struct ProgramDeclarationExternAnsi {
pub nodes: (Keyword, ProgramAnsiHeader), pub nodes: (Keyword, ProgramAnsiHeader),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProgramNonansiHeader { pub struct ProgramNonansiHeader {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -280,7 +280,7 @@ pub struct ProgramNonansiHeader {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ProgramAnsiHeader { pub struct ProgramAnsiHeader {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -294,7 +294,7 @@ pub struct ProgramAnsiHeader {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CheckerDeclaration { pub struct CheckerDeclaration {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -307,7 +307,7 @@ pub struct CheckerDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ClassDeclaration { pub struct ClassDeclaration {
pub nodes: ( pub nodes: (
Option<Virtual>, Option<Virtual>,
@ -324,17 +324,17 @@ pub struct ClassDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Virtual { pub struct Virtual {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceClassType { pub struct InterfaceClassType {
pub nodes: (PsClassIdentifier, Option<ParameterValueAssignment>), pub nodes: (PsClassIdentifier, Option<ParameterValueAssignment>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceClassDeclaration { pub struct InterfaceClassDeclaration {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -349,7 +349,7 @@ pub struct InterfaceClassDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum InterfaceClassItem { pub enum InterfaceClassItem {
TypeDeclaration(Box<TypeDeclaration>), TypeDeclaration(Box<TypeDeclaration>),
Method(Box<InterfaceClassItemMethod>), Method(Box<InterfaceClassItemMethod>),
@ -358,17 +358,17 @@ pub enum InterfaceClassItem {
Null(Box<Symbol>), Null(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceClassItemMethod { pub struct InterfaceClassItemMethod {
pub nodes: (Vec<AttributeInstance>, InterfaceClassMethod), pub nodes: (Vec<AttributeInstance>, InterfaceClassMethod),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfaceClassMethod { pub struct InterfaceClassMethod {
pub nodes: (Keyword, Keyword, MethodPrototype, Symbol), pub nodes: (Keyword, Keyword, MethodPrototype, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PackageDeclaration { pub struct PackageDeclaration {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -383,7 +383,7 @@ pub struct PackageDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TimeunitsDeclaration { pub enum TimeunitsDeclaration {
Timeunit(Box<TimeunitsDeclarationTimeunit>), Timeunit(Box<TimeunitsDeclarationTimeunit>),
Timeprecision(Box<TimeunitsDeclarationTimeprecision>), Timeprecision(Box<TimeunitsDeclarationTimeprecision>),
@ -391,22 +391,22 @@ pub enum TimeunitsDeclaration {
TimeprecisionTimeunit(Box<TimeunitsDeclarationTimeprecisionTimeunit>), TimeprecisionTimeunit(Box<TimeunitsDeclarationTimeprecisionTimeunit>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimeunitsDeclarationTimeunit { pub struct TimeunitsDeclarationTimeunit {
pub nodes: (Keyword, TimeLiteral, Option<(Symbol, TimeLiteral)>, Symbol), pub nodes: (Keyword, TimeLiteral, Option<(Symbol, TimeLiteral)>, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimeunitsDeclarationTimeprecision { pub struct TimeunitsDeclarationTimeprecision {
pub nodes: (Keyword, TimeLiteral, Symbol), pub nodes: (Keyword, TimeLiteral, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimeunitsDeclarationTimeunitTimeprecision { pub struct TimeunitsDeclarationTimeunitTimeprecision {
pub nodes: (Keyword, TimeLiteral, Symbol, Keyword, TimeLiteral, Symbol), pub nodes: (Keyword, TimeLiteral, Symbol, Keyword, TimeLiteral, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimeunitsDeclarationTimeprecisionTimeunit { pub struct TimeunitsDeclarationTimeprecisionTimeunit {
pub nodes: (Keyword, TimeLiteral, Symbol, Keyword, TimeLiteral, Symbol), pub nodes: (Keyword, TimeLiteral, Symbol, Keyword, TimeLiteral, Symbol),
} }

View File

@ -2,44 +2,44 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Symbol { pub struct Symbol {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Keyword { pub struct Keyword {
pub nodes: (Locate, Vec<WhiteSpace>), pub nodes: (Locate, Vec<WhiteSpace>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum WhiteSpace { pub enum WhiteSpace {
Space(Box<Locate>), Space(Box<Locate>),
Comment(Box<Comment>), Comment(Box<Comment>),
CompilerDirective(Box<CompilerDirective>), CompilerDirective(Box<CompilerDirective>),
} }
#[derive(Clone, Debug)] #[derive(Clone, Debug, PartialEq)]
pub struct Paren<T> { pub struct Paren<T> {
pub nodes: (Symbol, T, Symbol), pub nodes: (Symbol, T, Symbol),
} }
#[derive(Clone, Debug)] #[derive(Clone, Debug, PartialEq)]
pub struct Brace<T> { pub struct Brace<T> {
pub nodes: (Symbol, T, Symbol), pub nodes: (Symbol, T, Symbol),
} }
#[derive(Clone, Debug)] #[derive(Clone, Debug, PartialEq)]
pub struct Bracket<T> { pub struct Bracket<T> {
pub nodes: (Symbol, T, Symbol), pub nodes: (Symbol, T, Symbol),
} }
#[derive(Clone, Debug)] #[derive(Clone, Debug, PartialEq)]
pub struct ApostropheBrace<T> { pub struct ApostropheBrace<T> {
pub nodes: (Symbol, T, Symbol), pub nodes: (Symbol, T, Symbol),
} }
#[derive(Clone, Debug)] #[derive(Clone, Debug, PartialEq)]
pub struct List<T, U> { pub struct List<T, U> {
pub nodes: (U, Vec<(T, U)>), pub nodes: (U, Vec<(T, U)>),
} }

View File

@ -2,12 +2,12 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SpecifyBlock { pub struct SpecifyBlock {
pub nodes: (Keyword, Vec<SpecifyItem>, Keyword), pub nodes: (Keyword, Vec<SpecifyItem>, Keyword),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SpecifyItem { pub enum SpecifyItem {
SpecparamDeclaration(Box<SpecparamDeclaration>), SpecparamDeclaration(Box<SpecparamDeclaration>),
PulsestyleDeclaration(Box<PulsestyleDeclaration>), PulsestyleDeclaration(Box<PulsestyleDeclaration>),
@ -16,12 +16,12 @@ pub enum SpecifyItem {
SystemTimingCheck(Box<SystemTimingCheck>), SystemTimingCheck(Box<SystemTimingCheck>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PulsestyleDeclaration { pub struct PulsestyleDeclaration {
pub nodes: (Keyword, ListOfPathOutputs, Symbol), pub nodes: (Keyword, ListOfPathOutputs, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ShowcancelledDeclaration { pub struct ShowcancelledDeclaration {
pub nodes: (Keyword, ListOfPathOutputs, Symbol), pub nodes: (Keyword, ListOfPathOutputs, Symbol),
} }

View File

@ -2,36 +2,36 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SpecifyInputTerminalDescriptor { pub struct SpecifyInputTerminalDescriptor {
pub nodes: (InputIdentifier, Option<Bracket<ConstantRangeExpression>>), pub nodes: (InputIdentifier, Option<Bracket<ConstantRangeExpression>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SpecifyOutputTerminalDescriptor { pub struct SpecifyOutputTerminalDescriptor {
pub nodes: (OutputIdentifier, Option<Bracket<ConstantRangeExpression>>), pub nodes: (OutputIdentifier, Option<Bracket<ConstantRangeExpression>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum InputIdentifier { pub enum InputIdentifier {
InputPortIdentifier(Box<InputPortIdentifier>), InputPortIdentifier(Box<InputPortIdentifier>),
InoutPortIdentifier(Box<InoutPortIdentifier>), InoutPortIdentifier(Box<InoutPortIdentifier>),
Interface(Box<InputIdentifierInterface>), Interface(Box<InputIdentifierInterface>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InputIdentifierInterface { pub struct InputIdentifierInterface {
pub nodes: (InterfaceIdentifier, Symbol, PortIdentifier), pub nodes: (InterfaceIdentifier, Symbol, PortIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum OutputIdentifier { pub enum OutputIdentifier {
OutputPortIdentifier(Box<OutputPortIdentifier>), OutputPortIdentifier(Box<OutputPortIdentifier>),
InoutPortIdentifier(Box<InoutPortIdentifier>), InoutPortIdentifier(Box<InoutPortIdentifier>),
Interface(Box<OutputIdentifierInterface>), Interface(Box<OutputIdentifierInterface>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OutputIdentifierInterface { pub struct OutputIdentifierInterface {
pub nodes: (InterfaceIdentifier, Symbol, PortIdentifier), pub nodes: (InterfaceIdentifier, Symbol, PortIdentifier),
} }

View File

@ -2,30 +2,30 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PathDeclaration { pub enum PathDeclaration {
SimplePathDeclaration(Box<(SimplePathDeclaration, Symbol)>), SimplePathDeclaration(Box<(SimplePathDeclaration, Symbol)>),
EdgeSensitivePathDeclaration(Box<(EdgeSensitivePathDeclaration, Symbol)>), EdgeSensitivePathDeclaration(Box<(EdgeSensitivePathDeclaration, Symbol)>),
StateDependentPathDeclaration(Box<(StateDependentPathDeclaration, Symbol)>), StateDependentPathDeclaration(Box<(StateDependentPathDeclaration, Symbol)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SimplePathDeclaration { pub enum SimplePathDeclaration {
Parallel(Box<SimplePathDeclarationParallel>), Parallel(Box<SimplePathDeclarationParallel>),
Full(Box<SimplePathDeclarationFull>), Full(Box<SimplePathDeclarationFull>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SimplePathDeclarationParallel { pub struct SimplePathDeclarationParallel {
pub nodes: (ParallelPathDescription, Symbol, PathDelayValue), pub nodes: (ParallelPathDescription, Symbol, PathDelayValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SimplePathDeclarationFull { pub struct SimplePathDeclarationFull {
pub nodes: (FullPathDescription, Symbol, PathDelayValue), pub nodes: (FullPathDescription, Symbol, PathDelayValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParallelPathDescription { pub struct ParallelPathDescription {
pub nodes: ( pub nodes: (
Paren<( Paren<(
@ -37,7 +37,7 @@ pub struct ParallelPathDescription {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FullPathDescription { pub struct FullPathDescription {
pub nodes: ( pub nodes: (
Paren<( Paren<(
@ -49,12 +49,12 @@ pub struct FullPathDescription {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfPathInputs { pub struct ListOfPathInputs {
pub nodes: (List<Symbol, SpecifyInputTerminalDescriptor>,), pub nodes: (List<Symbol, SpecifyInputTerminalDescriptor>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfPathOutputs { pub struct ListOfPathOutputs {
pub nodes: (List<Symbol, SpecifyOutputTerminalDescriptor>,), pub nodes: (List<Symbol, SpecifyOutputTerminalDescriptor>,),
} }

View File

@ -2,48 +2,48 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum PathDelayValue { pub enum PathDelayValue {
ListOfPathDelayExpressions(Box<ListOfPathDelayExpressions>), ListOfPathDelayExpressions(Box<ListOfPathDelayExpressions>),
Paren(Box<PathDelayValueParen>), Paren(Box<PathDelayValueParen>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PathDelayValueParen { pub struct PathDelayValueParen {
pub nodes: (Paren<ListOfPathDelayExpressions>,), pub nodes: (Paren<ListOfPathDelayExpressions>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfPathDelayExpressions { pub struct ListOfPathDelayExpressions {
pub nodes: (List<Symbol, TPathDelayExpression>,), pub nodes: (List<Symbol, TPathDelayExpression>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TPathDelayExpression { pub struct TPathDelayExpression {
pub nodes: (PathDelayExpression,), pub nodes: (PathDelayExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PathDelayExpression { pub struct PathDelayExpression {
pub nodes: (ConstantMintypmaxExpression,), pub nodes: (ConstantMintypmaxExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum EdgeSensitivePathDeclaration { pub enum EdgeSensitivePathDeclaration {
Parallel(Box<EdgeSensitivePathDeclarationParallel>), Parallel(Box<EdgeSensitivePathDeclarationParallel>),
Full(Box<EdgeSensitivePathDeclarationFull>), Full(Box<EdgeSensitivePathDeclarationFull>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EdgeSensitivePathDeclarationParallel { pub struct EdgeSensitivePathDeclarationParallel {
pub nodes: (ParallelEdgeSensitivePathDescription, Symbol, PathDelayValue), pub nodes: (ParallelEdgeSensitivePathDescription, Symbol, PathDelayValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EdgeSensitivePathDeclarationFull { pub struct EdgeSensitivePathDeclarationFull {
pub nodes: (FullEdgeSensitivePathDescription, Symbol, PathDelayValue), pub nodes: (FullEdgeSensitivePathDescription, Symbol, PathDelayValue),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ParallelEdgeSensitivePathDescription { pub struct ParallelEdgeSensitivePathDescription {
pub nodes: ( pub nodes: (
Paren<( Paren<(
@ -61,7 +61,7 @@ pub struct ParallelEdgeSensitivePathDescription {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FullEdgeSensitivePathDescription { pub struct FullEdgeSensitivePathDescription {
pub nodes: ( pub nodes: (
Paren<( Paren<(
@ -79,31 +79,31 @@ pub struct FullEdgeSensitivePathDescription {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DataSourceExpression { pub struct DataSourceExpression {
pub nodes: (Expression,), pub nodes: (Expression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum EdgeIdentifier { pub enum EdgeIdentifier {
Posedge(Box<Keyword>), Posedge(Box<Keyword>),
Negedge(Box<Keyword>), Negedge(Box<Keyword>),
Edge(Box<Keyword>), Edge(Box<Keyword>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum StateDependentPathDeclaration { pub enum StateDependentPathDeclaration {
IfSimple(Box<StateDependentPathDeclarationIfSimple>), IfSimple(Box<StateDependentPathDeclarationIfSimple>),
IfEdgeSensitive(Box<StateDependentPathDeclarationIfEdgeSensitive>), IfEdgeSensitive(Box<StateDependentPathDeclarationIfEdgeSensitive>),
IfNone(Box<StateDependentPathDeclarationIfNone>), IfNone(Box<StateDependentPathDeclarationIfNone>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StateDependentPathDeclarationIfSimple { pub struct StateDependentPathDeclarationIfSimple {
pub nodes: (Keyword, Paren<ModulePathExpression>, SimplePathDeclaration), pub nodes: (Keyword, Paren<ModulePathExpression>, SimplePathDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StateDependentPathDeclarationIfEdgeSensitive { pub struct StateDependentPathDeclarationIfEdgeSensitive {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -112,12 +112,12 @@ pub struct StateDependentPathDeclarationIfEdgeSensitive {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StateDependentPathDeclarationIfNone { pub struct StateDependentPathDeclarationIfNone {
pub nodes: (Keyword, SimplePathDeclaration), pub nodes: (Keyword, SimplePathDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PolarityOperator { pub struct PolarityOperator {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }

View File

@ -2,84 +2,84 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimecheckCondition { pub struct TimecheckCondition {
pub nodes: (MintypmaxExpression,), pub nodes: (MintypmaxExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ControlledReferenceEvent { pub struct ControlledReferenceEvent {
pub nodes: (ControlledTimingCheckEvent,), pub nodes: (ControlledTimingCheckEvent,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DataEvent { pub struct DataEvent {
pub nodes: (TimingCheckEvent,), pub nodes: (TimingCheckEvent,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DelayedData { pub enum DelayedData {
TerminalIdentifier(Box<TerminalIdentifier>), TerminalIdentifier(Box<TerminalIdentifier>),
WithMintypmax(Box<DelayedDataWithMintypmax>), WithMintypmax(Box<DelayedDataWithMintypmax>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DelayedDataWithMintypmax { pub struct DelayedDataWithMintypmax {
pub nodes: (TerminalIdentifier, Bracket<ConstantMintypmaxExpression>), pub nodes: (TerminalIdentifier, Bracket<ConstantMintypmaxExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum DelayedReference { pub enum DelayedReference {
TerminalIdentifier(Box<TerminalIdentifier>), TerminalIdentifier(Box<TerminalIdentifier>),
WithMintypmax(Box<DelayedReferenceWithMintypmax>), WithMintypmax(Box<DelayedReferenceWithMintypmax>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct DelayedReferenceWithMintypmax { pub struct DelayedReferenceWithMintypmax {
pub nodes: (TerminalIdentifier, Bracket<ConstantMintypmaxExpression>), pub nodes: (TerminalIdentifier, Bracket<ConstantMintypmaxExpression>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EndEdgeOffset { pub struct EndEdgeOffset {
pub nodes: (MintypmaxExpression,), pub nodes: (MintypmaxExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EventBasedFlag { pub struct EventBasedFlag {
pub nodes: (ConstantExpression,), pub nodes: (ConstantExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Notifier { pub struct Notifier {
pub nodes: (VariableIdentifier,), pub nodes: (VariableIdentifier,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ReferenceEvent { pub struct ReferenceEvent {
pub nodes: (TimingCheckEvent,), pub nodes: (TimingCheckEvent,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RemainActiveFlag { pub struct RemainActiveFlag {
pub nodes: (ConstantMintypmaxExpression,), pub nodes: (ConstantMintypmaxExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimestampCondition { pub struct TimestampCondition {
pub nodes: (MintypmaxExpression,), pub nodes: (MintypmaxExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct StartEdgeOffset { pub struct StartEdgeOffset {
pub nodes: (MintypmaxExpression,), pub nodes: (MintypmaxExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct Threshold { pub struct Threshold {
pub nodes: (ConstantExpression,), pub nodes: (ConstantExpression,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimingCheckLimit { pub struct TimingCheckLimit {
pub nodes: (Expression,), pub nodes: (Expression,),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SystemTimingCheck { pub enum SystemTimingCheck {
SetupTimingCheck(Box<SetupTimingCheck>), SetupTimingCheck(Box<SetupTimingCheck>),
HoldTimingCheck(Box<HoldTimingCheck>), HoldTimingCheck(Box<HoldTimingCheck>),
@ -18,7 +18,7 @@ pub enum SystemTimingCheck {
NochangeTimingCheck(Box<NochangeTimingCheck>), NochangeTimingCheck(Box<NochangeTimingCheck>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SetupTimingCheck { pub struct SetupTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -34,7 +34,7 @@ pub struct SetupTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct HoldTimingCheck { pub struct HoldTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -50,7 +50,7 @@ pub struct HoldTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SetupholdTimingCheck { pub struct SetupholdTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -84,7 +84,7 @@ pub struct SetupholdTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RecoveryTimingCheck { pub struct RecoveryTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -100,7 +100,7 @@ pub struct RecoveryTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RemovalTimingCheck { pub struct RemovalTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -116,7 +116,7 @@ pub struct RemovalTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct RecremTimingCheck { pub struct RecremTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -150,7 +150,7 @@ pub struct RecremTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SkewTimingCheck { pub struct SkewTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -166,7 +166,7 @@ pub struct SkewTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimeskewTimingCheck { pub struct TimeskewTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -190,7 +190,7 @@ pub struct TimeskewTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct FullskewTimingCheck { pub struct FullskewTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -216,7 +216,7 @@ pub struct FullskewTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct PeriodTimingCheck { pub struct PeriodTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -230,7 +230,7 @@ pub struct PeriodTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct WidthTimingCheck { pub struct WidthTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -246,7 +246,7 @@ pub struct WidthTimingCheck {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct NochangeTimingCheck { pub struct NochangeTimingCheck {
pub nodes: ( pub nodes: (
Keyword, Keyword,

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimingCheckEvent { pub struct TimingCheckEvent {
pub nodes: ( pub nodes: (
Option<TimingCheckEventControl>, Option<TimingCheckEventControl>,
@ -11,7 +11,7 @@ pub struct TimingCheckEvent {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ControlledTimingCheckEvent { pub struct ControlledTimingCheckEvent {
pub nodes: ( pub nodes: (
TimingCheckEventControl, TimingCheckEventControl,
@ -20,7 +20,7 @@ pub struct ControlledTimingCheckEvent {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TimingCheckEventControl { pub enum TimingCheckEventControl {
Posedge(Box<Keyword>), Posedge(Box<Keyword>),
Negedge(Box<Keyword>), Negedge(Box<Keyword>),
@ -28,51 +28,51 @@ pub enum TimingCheckEventControl {
EdgeControlSpecifier(Box<EdgeControlSpecifier>), EdgeControlSpecifier(Box<EdgeControlSpecifier>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SpecifyTerminalDescriptor { pub enum SpecifyTerminalDescriptor {
SpecifyInputTerminalDescriptor(Box<SpecifyInputTerminalDescriptor>), SpecifyInputTerminalDescriptor(Box<SpecifyInputTerminalDescriptor>),
SpecifyOutputTerminalDescriptor(Box<SpecifyOutputTerminalDescriptor>), SpecifyOutputTerminalDescriptor(Box<SpecifyOutputTerminalDescriptor>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EdgeControlSpecifier { pub struct EdgeControlSpecifier {
pub nodes: (Keyword, Bracket<List<Symbol, EdgeDescriptor>>), pub nodes: (Keyword, Bracket<List<Symbol, EdgeDescriptor>>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EdgeDescriptor { pub struct EdgeDescriptor {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum TimingCheckCondition { pub enum TimingCheckCondition {
ScalarTimingCheckCondition(Box<ScalarTimingCheckCondition>), ScalarTimingCheckCondition(Box<ScalarTimingCheckCondition>),
Paren(Box<TimingCheckConditionParen>), Paren(Box<TimingCheckConditionParen>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct TimingCheckConditionParen { pub struct TimingCheckConditionParen {
pub nodes: (Paren<ScalarTimingCheckCondition>,), pub nodes: (Paren<ScalarTimingCheckCondition>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum ScalarTimingCheckCondition { pub enum ScalarTimingCheckCondition {
Expression(Box<Expression>), Expression(Box<Expression>),
Unary(Box<ScalarTimingCheckConditionUnary>), Unary(Box<ScalarTimingCheckConditionUnary>),
Binary(Box<ScalarTimingCheckConditionBinary>), Binary(Box<ScalarTimingCheckConditionBinary>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ScalarTimingCheckConditionUnary { pub struct ScalarTimingCheckConditionUnary {
pub nodes: (Symbol, Expression), pub nodes: (Symbol, Expression),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ScalarTimingCheckConditionBinary { pub struct ScalarTimingCheckConditionBinary {
pub nodes: (Expression, Symbol, ScalarConstant), pub nodes: (Expression, Symbol, ScalarConstant),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct ScalarConstant { pub struct ScalarConstant {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }

View File

@ -2,13 +2,13 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum UdpBody { pub enum UdpBody {
CombinationalBody(Box<CombinationalBody>), CombinationalBody(Box<CombinationalBody>),
SequentialBody(Box<SequentialBody>), SequentialBody(Box<SequentialBody>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CombinationalBody { pub struct CombinationalBody {
pub nodes: ( pub nodes: (
Keyword, Keyword,
@ -18,12 +18,12 @@ pub struct CombinationalBody {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CombinationalEntry { pub struct CombinationalEntry {
pub nodes: (LevelInputList, Symbol, OutputSymbol, Symbol), pub nodes: (LevelInputList, Symbol, OutputSymbol, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequentialBody { pub struct SequentialBody {
pub nodes: ( pub nodes: (
Option<UdpInitialStatement>, Option<UdpInitialStatement>,
@ -34,17 +34,17 @@ pub struct SequentialBody {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpInitialStatement { pub struct UdpInitialStatement {
pub nodes: (Keyword, OutputPortIdentifier, Symbol, InitVal, Symbol), pub nodes: (Keyword, OutputPortIdentifier, Symbol, InitVal, Symbol),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct InitVal { pub struct InitVal {
pub nodes: (Keyword,), pub nodes: (Keyword,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct SequentialEntry { pub struct SequentialEntry {
pub nodes: ( pub nodes: (
SeqInputList, SeqInputList,
@ -56,55 +56,55 @@ pub struct SequentialEntry {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum SeqInputList { pub enum SeqInputList {
LevelInputList(Box<LevelInputList>), LevelInputList(Box<LevelInputList>),
EdgeInputList(Box<EdgeInputList>), EdgeInputList(Box<EdgeInputList>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LevelInputList { pub struct LevelInputList {
pub nodes: (LevelSymbol, Vec<LevelSymbol>), pub nodes: (LevelSymbol, Vec<LevelSymbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EdgeInputList { pub struct EdgeInputList {
pub nodes: (Vec<LevelSymbol>, EdgeIndicator, Vec<LevelSymbol>), pub nodes: (Vec<LevelSymbol>, EdgeIndicator, Vec<LevelSymbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum EdgeIndicator { pub enum EdgeIndicator {
Paren(Box<EdgeIndicatorParen>), Paren(Box<EdgeIndicatorParen>),
EdgeSymbol(Box<EdgeSymbol>), EdgeSymbol(Box<EdgeSymbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EdgeIndicatorParen { pub struct EdgeIndicatorParen {
pub nodes: (Paren<(LevelSymbol, LevelSymbol)>,), pub nodes: (Paren<(LevelSymbol, LevelSymbol)>,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct CurrentState { pub struct CurrentState {
pub nodes: (LevelSymbol,), pub nodes: (LevelSymbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum NextState { pub enum NextState {
OutputSymbol(Box<OutputSymbol>), OutputSymbol(Box<OutputSymbol>),
Minus(Box<Symbol>), Minus(Box<Symbol>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct OutputSymbol { pub struct OutputSymbol {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct LevelSymbol { pub struct LevelSymbol {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct EdgeSymbol { pub struct EdgeSymbol {
pub nodes: (Symbol,), pub nodes: (Symbol,),
} }

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpNonansiDeclaration { pub struct UdpNonansiDeclaration {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -13,7 +13,7 @@ pub struct UdpNonansiDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpAnsiDeclaration { pub struct UdpAnsiDeclaration {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -24,7 +24,7 @@ pub struct UdpAnsiDeclaration {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum UdpDeclaration { pub enum UdpDeclaration {
Nonansi(Box<UdpDeclarationNonansi>), Nonansi(Box<UdpDeclarationNonansi>),
Ansi(Box<UdpDeclarationAnsi>), Ansi(Box<UdpDeclarationAnsi>),
@ -33,7 +33,7 @@ pub enum UdpDeclaration {
Wildcard(Box<UdpDeclarationWildcard>), Wildcard(Box<UdpDeclarationWildcard>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpDeclarationNonansi { pub struct UdpDeclarationNonansi {
pub nodes: ( pub nodes: (
UdpNonansiDeclaration, UdpNonansiDeclaration,
@ -45,7 +45,7 @@ pub struct UdpDeclarationNonansi {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpDeclarationAnsi { pub struct UdpDeclarationAnsi {
pub nodes: ( pub nodes: (
UdpAnsiDeclaration, UdpAnsiDeclaration,
@ -55,17 +55,17 @@ pub struct UdpDeclarationAnsi {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpDeclarationExternNonansi { pub struct UdpDeclarationExternNonansi {
pub nodes: (Keyword, UdpNonansiDeclaration), pub nodes: (Keyword, UdpNonansiDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpDeclarationExternAnsi { pub struct UdpDeclarationExternAnsi {
pub nodes: (Keyword, UdpAnsiDeclaration), pub nodes: (Keyword, UdpAnsiDeclaration),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpDeclarationWildcard { pub struct UdpDeclarationWildcard {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpInstantiation { pub struct UdpInstantiation {
pub nodes: ( pub nodes: (
UdpIdentifier, UdpIdentifier,
@ -13,7 +13,7 @@ pub struct UdpInstantiation {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpInstance { pub struct UdpInstance {
pub nodes: ( pub nodes: (
Option<NameOfInstance>, Option<NameOfInstance>,

View File

@ -2,7 +2,7 @@ use crate::*;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpPortList { pub struct UdpPortList {
pub nodes: ( pub nodes: (
OutputPortIdentifier, OutputPortIdentifier,
@ -11,7 +11,7 @@ pub struct UdpPortList {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpDeclarationPortList { pub struct UdpDeclarationPortList {
pub nodes: ( pub nodes: (
UdpOutputDeclaration, UdpOutputDeclaration,
@ -20,25 +20,25 @@ pub struct UdpDeclarationPortList {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum UdpPortDeclaration { pub enum UdpPortDeclaration {
UdpOutputDeclaration(Box<(UdpOutputDeclaration, Symbol)>), UdpOutputDeclaration(Box<(UdpOutputDeclaration, Symbol)>),
UdpInputDeclaration(Box<(UdpInputDeclaration, Symbol)>), UdpInputDeclaration(Box<(UdpInputDeclaration, Symbol)>),
UdpRegDeclaration(Box<(UdpRegDeclaration, Symbol)>), UdpRegDeclaration(Box<(UdpRegDeclaration, Symbol)>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub enum UdpOutputDeclaration { pub enum UdpOutputDeclaration {
Nonreg(Box<UdpOutputDeclarationNonreg>), Nonreg(Box<UdpOutputDeclarationNonreg>),
Reg(Box<UdpOutputDeclarationReg>), Reg(Box<UdpOutputDeclarationReg>),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpOutputDeclarationNonreg { pub struct UdpOutputDeclarationNonreg {
pub nodes: (Vec<AttributeInstance>, Keyword, PortIdentifier), pub nodes: (Vec<AttributeInstance>, Keyword, PortIdentifier),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpOutputDeclarationReg { pub struct UdpOutputDeclarationReg {
pub nodes: ( pub nodes: (
Vec<AttributeInstance>, Vec<AttributeInstance>,
@ -49,12 +49,12 @@ pub struct UdpOutputDeclarationReg {
), ),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpInputDeclaration { pub struct UdpInputDeclaration {
pub nodes: (Vec<AttributeInstance>, Keyword, ListOfUdpPortIdentifiers), pub nodes: (Vec<AttributeInstance>, Keyword, ListOfUdpPortIdentifiers),
} }
#[derive(Clone, Debug, Node)] #[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpRegDeclaration { pub struct UdpRegDeclaration {
pub nodes: (Vec<AttributeInstance>, Keyword, VariableIdentifier), pub nodes: (Vec<AttributeInstance>, Keyword, VariableIdentifier),
} }