Skip to content

Commit

Permalink
Support top-level uniontypes in generateHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
perost committed Feb 2, 2021
1 parent 98678a2 commit d35eb48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OMCompiler/Compiler/Template/Unparsing.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ end programExternalHeaderFromTypes;

template classExternalHeader(SCode.Element cl, String pack)
::=
match cl case c as SCode.CLASS(classDef=p as SCode.PARTS(__)) then (p.elementLst |> elt => elementExternalHeader(elt,c.name))
match cl
case c as SCode.CLASS(restriction = SCode.R_METARECORD(moved = true, name = Absyn.IDENT(name = name))) then elementExternalHeader(cl, name)
case c as SCode.CLASS(classDef=p as SCode.PARTS(__)) then (p.elementLst |> elt => elementExternalHeader(elt,c.name))
end classExternalHeader;

template pathString(Absyn.Path path)
Expand Down

0 comments on commit d35eb48

Please sign in to comment.