Skip to content

Commit

Permalink
fix #6127, #6128, #6138
Browse files Browse the repository at this point in the history
- remove error messages in #6129
- rename updateConnectionStr to updateConnectionAnnotation
  • Loading branch information
adrpo committed Sep 28, 2020
1 parent f890e1f commit 2a521d2
Show file tree
Hide file tree
Showing 9 changed files with 258 additions and 144 deletions.
13 changes: 13 additions & 0 deletions OMCompiler/Compiler/FrontEnd/AbsynUtil.mo
Expand Up @@ -6558,5 +6558,18 @@ algorithm
ELEMENT(specification = elSpec) := el;
end elementSpec;

public function isClassOrComponentElementSpec
"The ElementSpec type contains the name of the element, and this function
extracts this name."
input ElementSpec inElementSpec;
output Boolean yes = false;
algorithm
yes := match (inElementSpec)
case CLASSDEF(class_ = CLASS()) then true;
case COMPONENTS(components = {COMPONENTITEM()}) then true;
else false;
end match;
end isClassOrComponentElementSpec;

annotation(__OpenModelica_Interface="frontend");
end AbsynUtil;
4 changes: 2 additions & 2 deletions OMCompiler/Compiler/FrontEnd/ModelicaBuiltin.mo
Expand Up @@ -3231,7 +3231,7 @@ annotation(preferredView="text",Documentation(info="<html>
</html>"));
end updateConnection;

function updateConnectionStr
function updateConnectionAnnotation
input TypeName className;
input String from;
input String to;
Expand All @@ -3241,7 +3241,7 @@ external "builtin";
annotation(preferredView="text",Documentation(info="<html>
<p>Updates the connection annotation in the class. See also updateConnectionNames().</p>
</html>"));
end updateConnectionStr;
end updateConnectionAnnotation;

function updateConnectionNames
input TypeName className;
Expand Down
4 changes: 2 additions & 2 deletions OMCompiler/Compiler/NFFrontEnd/NFModelicaBuiltin.mo
Expand Up @@ -3449,7 +3449,7 @@ annotation(preferredView="text",Documentation(info="<html>
</html>"));
end updateConnection;

function updateConnectionStr
function updateConnectionAnnotation
input TypeName className;
input String from;
input String to;
Expand All @@ -3459,7 +3459,7 @@ external "builtin";
annotation(preferredView="text",Documentation(info="<html>
<p>Updates the connection annotation in the class. See also updateConnectionNames().</p>
</html>"));
end updateConnectionStr;
end updateConnectionAnnotation;

function updateConnectionNames
input TypeName className;
Expand Down
4 changes: 2 additions & 2 deletions OMCompiler/Compiler/Script/CevalScriptBackend.mo
Expand Up @@ -2789,7 +2789,7 @@ algorithm

case (cache,_,"updateConnection",_,_) then (cache,Values.BOOL(false));

case (cache,_,"updateConnectionStr",{Values.CODE(Absyn.C_TYPENAME(classpath)),Values.STRING(str1), Values.STRING(str2),Values.STRING(annStr)},_)
case (cache,_,"updateConnectionAnnotation",{Values.CODE(Absyn.C_TYPENAME(classpath)),Values.STRING(str1), Values.STRING(str2),Values.STRING(annStr)},_)
algorithm
istmts := Parser.parsestringexp("__dummy(" + annStr + ");");
GlobalScript.ISTMTS(interactiveStmtLst = {GlobalScript.IEXP(exp = aexp)}) := istmts;
Expand All @@ -2803,7 +2803,7 @@ algorithm
then
(cache,Values.BOOL(true));

case (cache,_,"updateConnectionStr",_,_) then (cache,Values.BOOL(false));
case (cache,_,"updateConnectionAnnotation",_,_) then (cache,Values.BOOL(false));

case (cache,_,"updateConnectionNames",{Values.CODE(Absyn.C_TYPENAME(classpath)),Values.STRING(str1), Values.STRING(str2),
Values.STRING(str3), Values.STRING(str4)},_)
Expand Down

0 comments on commit 2a521d2

Please sign in to comment.