@@ -609,7 +609,7 @@ public function prefixEqualUnlessBasicType
609609 input SCode . Element cls;
610610algorithm
611611 _ := matchcontinue (pre1, pre2, cls)
612- local
612+ local
613613 // adrpo: TODO! FIXME!, I think here we should have pre1 = Prefix.CLASSPRE(variability1) == pre2 = Prefix.CLASSPRE(variability2)
614614
615615 // don't care about prefix for:
@@ -634,7 +634,7 @@ algorithm
634634 // BTH
635635 case (_, _, SCode . CLASS (name = "Clock" ))
636636 equation
637- true = boolEq (Flags . getConfigBool (Flags . SYNCHRONOUS_FEATURES ), true );
637+ true = intGe (Flags . getConfigEnum (Flags . LANGUAGE_STANDARD ), 33 );
638638 then ();
639639
640640 // anything else, check for equality!
@@ -656,7 +656,7 @@ algorithm
656656 case ("String" ) then true ;
657657 case ("Boolean" ) then true ;
658658 // BTH
659- case ("Clock" ) then Util . if_(Flags . getConfigBool (Flags . SYNCHRONOUS_FEATURES ), true , false );
659+ case ("Clock" ) then Util . if_(intGe( Flags . getConfigEnum (Flags . LANGUAGE_STANDARD ), 33 ), true , false );
660660 else false ;
661661 end match;
662662end isBuiltInClass;
@@ -859,11 +859,11 @@ algorithm
859859 true = listMember(r, {SCode . R_TYPE (), SCode . R_CONNECTOR (false ), SCode . R_CONNECTOR (true )});
860860 true = listMember(id, {"Real" , "Integer" , "Boolean" , "String" });
861861 then ();
862-
862+
863863 // BTH same as above but extended with Clock type if Flags.SYNCHRONOUS_FEATURES == true
864864 case (_, _, _, r, {SCode . EXTENDS (baseClassPath= Absyn . IDENT (id))})
865865 equation
866- true = boolEq (Flags . getConfigBool (Flags . SYNCHRONOUS_FEATURES ), true );
866+ true = intGe (Flags . getConfigEnum (Flags . LANGUAGE_STANDARD ), 33 );
867867 true = listMember(r, {SCode . R_TYPE (), SCode . R_CONNECTOR (false ), SCode . R_CONNECTOR (true )});
868868 true = listMember(id, {"Real" , "Integer" , "Boolean" , "String" , "Clock" });
869869 then ();
@@ -902,16 +902,16 @@ protected
902902 list< SCode . Restriction > rstLst;
903903algorithm
904904 // BTH add Clock type to both lists if Flags.SYNCHRONOUS_FEATURES == true
905- strLst := Util . if_(Flags . getConfigBool (Flags . SYNCHRONOUS_FEATURES ),
905+ strLst := Util . if_(intGe( Flags . getConfigEnum (Flags . LANGUAGE_STANDARD ), 33 ),
906906 {"Real" , "Integer" , "String" , "Boolean" , "Clock" },
907907 {"Real" , "Integer" , "String" , "Boolean" });
908908 b1 := listMember(childName, strLst);
909-
910- rstLst := Util . if_(Flags . getConfigBool (Flags . SYNCHRONOUS_FEATURES ),
909+
910+ rstLst := Util . if_(intGe( Flags . getConfigEnum (Flags . LANGUAGE_STANDARD ), 33 ),
911911 {SCode . R_TYPE (), SCode . R_PREDEFINED_INTEGER (), SCode . R_PREDEFINED_REAL (), SCode . R_PREDEFINED_STRING (), SCode . R_PREDEFINED_BOOLEAN (), SCode . R_PREDEFINED_CLOCK ()},
912912 {SCode . R_TYPE (), SCode . R_PREDEFINED_INTEGER (), SCode . R_PREDEFINED_REAL (), SCode . R_PREDEFINED_STRING (), SCode . R_PREDEFINED_BOOLEAN ()});
913913 b2 := listMember(childRestriction, rstLst);
914-
914+
915915 b3 := valueEq(parentRestriction, SCode . R_TYPE ());
916916
917917 // b2 := listMember(childRestriction, {SCode.R_TYPE(), SCode.R_ENUMERATION(), SCode.R_PREDEFINED_INTEGER(), SCode.R_PREDEFINED_REAL(), SCode.R_PREDEFINED_STRING(), SCode.R_PREDEFINED_BOOLEAN(), SCode.R_PREDEFINED_ENUMERATION()});
@@ -3776,9 +3776,9 @@ algorithm
37763776 case (cache, _, _, _, cl as SCode . CLASS (name = "String" ), _, _) then (cache,{},cl,DAE . NOMOD ());
37773777 case (cache, _, _, _, cl as SCode . CLASS (name = "Boolean" ), _, _) then (cache,{},cl,DAE . NOMOD ());
37783778 // BTH
3779- case (cache, _, _, _, cl as SCode . CLASS (name = "Clock" ), _, _)
3779+ case (cache, _, _, _, cl as SCode . CLASS (name = "Clock" ), _, _)
37803780 equation
3781- true = boolEq (Flags . getConfigBool (Flags . SYNCHRONOUS_FEATURES ), true );
3781+ true = intGe (Flags . getConfigEnum (Flags . LANGUAGE_STANDARD ), 33 );
37823782 then (cache,{},cl,DAE . NOMOD ());
37833783
37843784 case (cache, _, _, _, cl as SCode . CLASS (restriction = SCode . R_RECORD (_),
@@ -8321,16 +8321,16 @@ algorithm
83218321 // you cannot redeclare a basic type, only the properties and the binding, i.e.
83228322 // redeclare constant Boolean standardOrderComponents = true
83238323 case (DAE . REDECL (_, _, {(SCode . COMPONENT (typeSpec= Absyn . TPATH (path= path)), _)})) equation
8324- true = Flags . getConfigBool (Flags . SYNCHRONOUS_FEATURES );
8325-
8324+ true = intGe( Flags . getConfigEnum (Flags . LANGUAGE_STANDARD ), 33 );
8325+
83268326 name = Absyn . pathFirstIdent(path);
83278327 // BTH
83288328 true = listMember(name, {"Real" , "Integer" , "Boolean" , "String" , "Clock" });
83298329 then true ;
8330-
8330+
83318331 case (DAE . REDECL (_, _, {(SCode . COMPONENT (typeSpec= Absyn . TPATH (path= path)), _)})) equation
8332- false = Flags . getConfigBool (Flags . SYNCHRONOUS_FEATURES );
8333-
8332+ false = intGe( Flags . getConfigEnum (Flags . LANGUAGE_STANDARD ), 33 );
8333+
83348334 name = Absyn . pathFirstIdent(path);
83358335 // BTH
83368336 true = listMember(name, {"Real" , "Integer" , "Boolean" , "String" });
0 commit comments