@@ -1780,59 +1780,23 @@ public function topLevelInput "function: topLevelInput
17801780 input DAE . VarDirection inVarDirection;
17811781 input DAE . ConnectorType inConnectorType;
17821782algorithm
1783- _ := matchcontinue (inComponentRef,inVarDirection,inConnectorType)
1784- local
1785- DAE . ComponentRef cr;
1786- String name;
1787- case ((cr as DAE . CREF_IDENT (ident = name)),DAE . INPUT (),_)
1788- equation
1789- {_} = Util . stringSplitAtChar(name, "." ) "top level ident, no dots" ;
1790- then
1791- ();
1792- case (DAE . CREF_IDENT (ident = name),DAE . INPUT (),DAE . POTENTIAL ()) /* Connector input variables at top level for crefs that are stringified */
1793- equation
1794- {_,_} = Util . stringSplitAtChar(name, "." );
1795- then
1796- ();
1797- case (DAE . CREF_IDENT (ident = name),DAE . INPUT (),DAE . FLOW ())
1798- equation
1799- {_,_} = Util . stringSplitAtChar(name, "." );
1800- then
1801- ();
1802- /* For crefs that are not yet stringified, e.g. lower_known_var */
1803- case (DAE . CREF_QUAL (ident = name,componentRef = DAE . CREF_IDENT (ident = _)),DAE . INPUT (),DAE . FLOW ()) then ();
1804- case ((cr as DAE . CREF_QUAL (ident = name,componentRef = DAE . CREF_IDENT (ident = _))),DAE . INPUT (),DAE . POTENTIAL ()) then ();
1805- end matchcontinue;
1783+ _ := match (inComponentRef,inVarDirection,inConnectorType)
1784+ case (DAE . CREF_IDENT (ident = _), DAE . INPUT (), _) then ();
1785+ case (DAE . CREF_QUAL (componentRef = DAE . CREF_IDENT (ident = _)), DAE . INPUT (), DAE . FLOW ()) then ();
1786+ case (DAE . CREF_QUAL (componentRef = DAE . CREF_IDENT (ident = _)), DAE . INPUT (), DAE . POTENTIAL ()) then ();
1787+ end match;
18061788end topLevelInput;
18071789
18081790protected function topLevelOutput
18091791 input DAE . ComponentRef inComponentRef;
18101792 input DAE . VarDirection inVarDirection;
18111793 input DAE . ConnectorType inConnectorType;
18121794algorithm
1813- _ := matchcontinue(inComponentRef, inVarDirection, inConnectorType)
1814- local
1815- DAE . ComponentRef cr;
1816- String name;
1817- case ((cr as DAE . CREF_IDENT (ident = name)),DAE . OUTPUT (),_)
1818- equation
1819- {_} = Util . stringSplitAtChar(name, "." ) "top level ident, no dots" ;
1820- then
1821- ();
1822- case (DAE . CREF_IDENT (ident = name),DAE . OUTPUT (),DAE . POTENTIAL ()) /* Connector input variables at top level for crefs that are stringified */
1823- equation
1824- {_,_} = Util . stringSplitAtChar(name, "." );
1825- then
1826- ();
1827- case (DAE . CREF_IDENT (ident = name),DAE . OUTPUT (),DAE . FLOW ())
1828- equation
1829- {_,_} = Util . stringSplitAtChar(name, "." );
1830- then
1831- ();
1832- /* For crefs that are not yet stringified, e.g. lower_known_var */
1833- case (DAE . CREF_QUAL (ident = name,componentRef = DAE . CREF_IDENT (ident = _)),DAE . OUTPUT (),DAE . FLOW ()) then ();
1834- case ((cr as DAE . CREF_QUAL (ident = name,componentRef = DAE . CREF_IDENT (ident = _))),DAE . OUTPUT (),DAE . POTENTIAL ()) then ();
1835- end matchcontinue;
1795+ _ := match(inComponentRef, inVarDirection, inConnectorType)
1796+ case (DAE . CREF_IDENT (ident = _), DAE . OUTPUT (), _) then ();
1797+ case (DAE . CREF_QUAL (componentRef = DAE . CREF_IDENT (ident = _)), DAE . OUTPUT (), DAE . FLOW ()) then ();
1798+ case (DAE . CREF_QUAL (componentRef = DAE . CREF_IDENT (ident = _)), DAE . OUTPUT (), DAE . POTENTIAL ()) then ();
1799+ end match;
18361800end topLevelOutput;
18371801
18381802
0 commit comments