Repository: ErykMroczek/mofmt (language: python)

Issue:
Dropping function return values not supported anymore
mofmt v0.3.6 supported dropping function return values.

In this exemplary code we ignore the first output `ms` of `getTime`:
```
function time
  output Integer sec;
  output Integer min;
  output Integer hour;
algorithm 
    (, sec, min, hour) := Modelica.Utilities.System.getTime();
end time;
```

The code can be formatted with mofmt 0.3.6. However, mofmt 0.5.0 says:
```
Syntax errors detected:
time.mo:6:6: expected IDENTIFIER, found ','
```


Discussion / hints:
Well, `0.4.0` also would not work with that - it a parser error.

It works for other locations, like:

```modelica
(ms,  , min, hour) := Modelica.Utilities.System.getTime();
```

I had to miss it somehow.

Fix patch:
diff --git a/Cargo.toml b/Cargo.toml
index 34a3336..ed779d8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,7 @@ keywords = ["Modelica", "development", "formatter"]
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-moparse = "0.1.4"
+moparse = "0.1.5-rc1"
 
 [profile.release]
 strip = true
diff --git a/src/formatting.rs b/src/formatting.rs
index 60c0330..15b17f9 100644
--- a/src/formatting.rs
+++ b/src/formatting.rs
@@ -2064,6 +2064,9 @@ fn output_expression_list(f: &mut Formatter, tree: Tree, mut wrapped: bool) -> b
         match child {
             Child::Tree(t) => wrapped = expression(f, t, wrapped, true),
             Child::Token(tok) => {
+                if f.prev_tok == ModelicaToken::LParen {
+                    f.markers.push(Marker::Space);
+                }
                 f.handle_token(tok);
                 f.markers.push(Marker::Space);
             }


Test patch:
diff --git a/tests/samples/code-input.mo b/tests/samples/code-input.mo
index 72fcc37..459df3a 100644
--- a/tests/samples/code-input.mo
+++ b/tests/samples/code-input.mo
@@ -181,7 +181,7 @@ algorithm
   (A,B,C):= foo.bar.baz
   (a);
   (D,,E) := foo.bar .baz(b);
-  (F, G,(H,
+  (, G,(H,
   J)) := foo.bar.baz(c);
 
 foo:={{bar[i] + j*
diff --git a/tests/samples/code-output.mo b/tests/samples/code-output.mo
index b466de4..4cac7c8 100644
--- a/tests/samples/code-output.mo
+++ b/tests/samples/code-output.mo
@@ -232,7 +232,7 @@ algorithm
 
   (A, B, C) := foo.bar.baz(a);
   (D, , E) := foo.bar.baz(b);
-  (F, G, (H, J)) := foo.bar.baz(c);
+  ( , G, (H, J)) := foo.bar.baz(c);
 
   foo := {
     {