.OpenModelica.Scripting.list

Information

Pretty-prints a class definition.

Syntax

list(Modelica.Math.sin)
list(Modelica.Math.sin,interfaceOnly=true)

Description

list() pretty-prints the whole of the loaded AST while list(className) lists a class and its children. It keeps all annotations and comments intact but strips out any comments and normalizes white-space.

list(className,interfaceOnly=true) works on functions and pretty-prints only the interface parts (annotations and protected sections removed). String-comments on public variables are kept.

If the specified class does not exist (or is not a function when interfaceOnly is given), the empty string is returned.

Interface

function list
  input TypeName class_ = $Code(AllLoadedClasses);
  input Boolean interfaceOnly = false;
  input Boolean shortOnly = false "only short class definitions";
  input ExportKind exportKind = ExportKind.Absyn;
  output String contents;
end list;

Revisions

Revision Author Comment
16124 sjoelund.se Added replaced exportAsCode option with exportKind (selecting which kind of unparsing to use)
10796 sjoelund.se Added shortOnly option
10756 sjoelund.se Added interfaceOnly option

Generated at 2019-09-17T01:38:12Z by OpenModelicaOpenModelica 1.14.0~dev-26728-gbf603de using GenerateDoc.mos