From 5514a7014193a2823ab568a31c5a7551450f652b Mon Sep 17 00:00:00 2001 From: dalance Date: Fri, 28 Aug 2020 16:01:34 +0900 Subject: [PATCH] Fix typo #18 --- CHANGELOG.md | 2 ++ .../src/declarations/interface_declarations.rs | 14 +++++++------- .../src/declarations/interface_declarations.rs | 16 ++++++++-------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b8d33e..b245bce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased](https://github.com/dalance/sv-parser/compare/v0.7.0...Unreleased) - ReleaseDate +* [Fixed] 'Declaraton' typo [#18](https://github.com/dalance/sv-parser/issues/18) + ## [v0.7.0](https://github.com/dalance/sv-parser/compare/v0.6.5...v0.7.0) - 2020-04-10 * [Changed] make comment stripping optional [#6](https://github.com/dalance/sv-parser/pull/6) diff --git a/sv-parser-parser/src/declarations/interface_declarations.rs b/sv-parser-parser/src/declarations/interface_declarations.rs index af68d20..6e9af49 100644 --- a/sv-parser-parser/src/declarations/interface_declarations.rs +++ b/sv-parser-parser/src/declarations/interface_declarations.rs @@ -21,7 +21,7 @@ pub(crate) fn modport_item(s: Span) -> IResult { #[tracable_parser] #[packrat_parser] -pub(crate) fn modport_ports_declaration(s: Span) -> IResult { +pub(crate) fn modport_ports_declaration(s: Span) -> IResult { alt(( modport_ports_declaration_simple, modport_ports_declaration_tf, @@ -31,34 +31,34 @@ pub(crate) fn modport_ports_declaration(s: Span) -> IResult IResult { +pub(crate) fn modport_ports_declaration_simple(s: Span) -> IResult { let (s, a) = many0(attribute_instance)(s)?; let (s, b) = modport_simple_ports_declaration(s)?; Ok(( s, - ModportPortsDeclaraton::Simple(Box::new(ModportPortsDeclaratonSimple { nodes: (a, b) })), + ModportPortsDeclaration::Simple(Box::new(ModportPortsDeclarationSimple { nodes: (a, b) })), )) } #[tracable_parser] #[packrat_parser] -pub(crate) fn modport_ports_declaration_tf(s: Span) -> IResult { +pub(crate) fn modport_ports_declaration_tf(s: Span) -> IResult { let (s, a) = many0(attribute_instance)(s)?; let (s, b) = modport_tf_ports_declaration(s)?; Ok(( s, - ModportPortsDeclaraton::Tf(Box::new(ModportPortsDeclaratonTf { nodes: (a, b) })), + ModportPortsDeclaration::Tf(Box::new(ModportPortsDeclarationTf { nodes: (a, b) })), )) } #[tracable_parser] #[packrat_parser] -pub(crate) fn modport_ports_declaration_clocking(s: Span) -> IResult { +pub(crate) fn modport_ports_declaration_clocking(s: Span) -> IResult { let (s, a) = many0(attribute_instance)(s)?; let (s, b) = modport_clocking_declaration(s)?; Ok(( s, - ModportPortsDeclaraton::Clocking(Box::new(ModportPortsDeclaratonClocking { + ModportPortsDeclaration::Clocking(Box::new(ModportPortsDeclarationClocking { nodes: (a, b), })), )) diff --git a/sv-parser-syntaxtree/src/declarations/interface_declarations.rs b/sv-parser-syntaxtree/src/declarations/interface_declarations.rs index 9eb05cc..3302796 100644 --- a/sv-parser-syntaxtree/src/declarations/interface_declarations.rs +++ b/sv-parser-syntaxtree/src/declarations/interface_declarations.rs @@ -11,29 +11,29 @@ pub struct ModportDeclaration { pub struct ModportItem { pub nodes: ( ModportIdentifier, - Paren>, + Paren>, ), } #[derive(Clone, Debug, PartialEq, Node)] -pub enum ModportPortsDeclaraton { - Simple(Box), - Tf(Box), - Clocking(Box), +pub enum ModportPortsDeclaration { + Simple(Box), + Tf(Box), + Clocking(Box), } #[derive(Clone, Debug, PartialEq, Node)] -pub struct ModportPortsDeclaratonSimple { +pub struct ModportPortsDeclarationSimple { pub nodes: (Vec, ModportSimplePortsDeclaration), } #[derive(Clone, Debug, PartialEq, Node)] -pub struct ModportPortsDeclaratonTf { +pub struct ModportPortsDeclarationTf { pub nodes: (Vec, ModportTfPortsDeclaration), } #[derive(Clone, Debug, PartialEq, Node)] -pub struct ModportPortsDeclaratonClocking { +pub struct ModportPortsDeclarationClocking { pub nodes: (Vec, ModportClockingDeclaration), }