diff options
| author | bnewbold <bnewbold@robocracy.org> | 2017-01-16 14:18:56 -0800 | 
|---|---|---|
| committer | bnewbold <bnewbold@robocracy.org> | 2017-01-16 14:18:56 -0800 | 
| commit | 4ef105cd0d3336b8755483cde43450d9f96abf4a (patch) | |
| tree | 5e4b9cfa71175230cfb5114780a066a2707f850a /modelica-parser-lalrpop/src | |
| parent | 0ae72d03799e35ecb51a8a963370c83fb1090472 (diff) | |
| download | modelthing-4ef105cd0d3336b8755483cde43450d9f96abf4a.tar.gz modelthing-4ef105cd0d3336b8755483cde43450d9f96abf4a.zip | |
parser: show values and descriptions in-line
Diffstat (limited to 'modelica-parser-lalrpop/src')
| -rw-r--r-- | modelica-parser-lalrpop/src/ast.rs | 12 | 
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(), +            },          )      }  } | 
