Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit f516283

Browse files
adrpoOpenModelica-Hudson
authored andcommitted
improvements to function handling
- handle some of the builtin functions - handle named arguments - check argument type, variability, etc
1 parent c7e8c02 commit f516283

File tree

6 files changed

+1087
-92
lines changed

6 files changed

+1087
-92
lines changed

Compiler/NFFrontEnd/NFBinding.mo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ uniontype Binding
6868
record TYPED_BINDING
6969
DAE.Exp bindingExp;
7070
DAE.Type bindingType;
71+
DAE.Const variability;
7172
Integer propagatedDims;
7273
SourceInfo info;
7374
end TYPED_BINDING;

Compiler/NFFrontEnd/NFComponent.mo

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,16 @@ uniontype Component
240240
end match;
241241
end getAttributes;
242242

243+
function getBinding
244+
input Component component;
245+
output NFBinding.Binding b;
246+
algorithm
247+
b := match component
248+
case UNTYPED_COMPONENT() then component.binding;
249+
case TYPED_COMPONENT() then component.binding;
250+
end match;
251+
end getBinding;
252+
243253
function attr2DaeAttr
244254
input Attributes attr;
245255
output DAE.Attributes daeAttr;

0 commit comments

Comments
 (0)