aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modelica-parser-lalrpop/src/ast.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/modelica-parser-lalrpop/src/ast.rs b/modelica-parser-lalrpop/src/ast.rs
index 317944b..041491a 100644
--- a/modelica-parser-lalrpop/src/ast.rs
+++ b/modelica-parser-lalrpop/src/ast.rs
@@ -260,13 +260,21 @@ impl Debug for ComponentPrefix {
impl Debug for Component {
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error> {
- write!(fmt, "{}{} {}",
+ write!(fmt, "{}{} {}{}{}",
match self.prefix {
- Some(p) => format!("{:?} ", p),
+ Some(ref p) => format!("{:?} ", p),
None => "".to_string(),
},
self.specifier,
self.name,
+ match self.value {
+ Some(ref p) => format!("={:?} ", p),
+ None => "".to_string(),
+ },
+ match self.description {
+ Some(ref p) => format!(" {:?}", p),
+ None => "".to_string(),
+ },
)
}
}