Skip to content

Commit

Permalink
More output from getClassInformation.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 authored and OpenModelica-Hudson committed Mar 4, 2016
1 parent 8abe1ff commit 150bb05
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Compiler/FrontEnd/ModelicaBuiltin.mo
Expand Up @@ -3658,6 +3658,8 @@ function getClassInformation
output String dimensions[:];
output Boolean isProtectedClass;
output Boolean isDocumentationClass;
output String version;
output String preferredView;
external "builtin";
annotation(
Documentation(info="<html>
Expand Down
2 changes: 1 addition & 1 deletion Compiler/Script/CevalScript.mo
Expand Up @@ -1689,7 +1689,7 @@ algorithm
end match;
end getVariableNames;

protected function getPackageVersion
public function getPackageVersion
input Absyn.Path path;
input Absyn.Program p;
output String version;
Expand Down
10 changes: 7 additions & 3 deletions Compiler/Script/CevalScriptBackend.mo
Expand Up @@ -830,7 +830,7 @@ algorithm
case (cache,_,"getClassInformation",_,st,_)
then (cache,Values.TUPLE({Values.STRING(""),Values.STRING(""),Values.BOOL(false),Values.BOOL(false),Values.BOOL(false),Values.STRING(""),
Values.BOOL(false),Values.INTEGER(0),Values.INTEGER(0),Values.INTEGER(0),Values.INTEGER(0),Values.ARRAY({},{0}),
Values.BOOL(false),Values.BOOL(false)}),st);
Values.BOOL(false),Values.BOOL(false),Values.STRING(""),Values.STRING("")}),st);

case (cache,_,"diffModelicaFileListings",{Values.STRING(s1),Values.STRING(s2),Values.ENUM_LITERAL(name=path)},(st as GlobalScript.SYMBOLTABLE(ast = p)),_)
algorithm
Expand Down Expand Up @@ -6449,7 +6449,7 @@ protected function getClassInformation
input Absyn.Program p;
output Values.Value res_1;
protected
String name,file,strPartial,strFinal,strEncapsulated,res,cmt,str_readonly,str_sline,str_scol,str_eline,str_ecol;
String name,file,strPartial,strFinal,strEncapsulated,res,cmt,str_readonly,str_sline,str_scol,str_eline,str_ecol,version,preferredView;
String dim_str,lastIdent;
Boolean partialPrefix,finalPrefix,encapsulatedPrefix,isReadOnly,isProtectedClass,isDocClass;
Absyn.Restriction restr;
Expand All @@ -6469,6 +6469,8 @@ algorithm
isProtectedClass := Interactive.isProtectedClass(classPath, lastIdent, p);
end if;
isDocClass := Interactive.getDocumentationClassAnnotation(path, p);
version := CevalScript.getPackageVersion(path, p);
Absyn.STRING(preferredView) := Interactive.getNamedAnnotation(path, p, Absyn.IDENT("preferredView"), SOME(Absyn.STRING("")), Interactive.getAnnotationExp);
res_1 := Values.TUPLE({
Values.STRING(res),
Values.STRING(cmt),
Expand All @@ -6483,7 +6485,9 @@ algorithm
Values.INTEGER(ec),
getClassDimensions(cdef),
Values.BOOL(isProtectedClass),
Values.BOOL(isDocClass)
Values.BOOL(isDocClass),
Values.STRING(version),
Values.STRING(preferredView)
});
end getClassInformation;

Expand Down

0 comments on commit 150bb05

Please sign in to comment.