Changeset 14237
- Timestamp:
- Nov 29, 2019 6:08:13 PM (12 days ago)
- Location:
- branches/dev-2559/Compiler/ModelicaFrontEnd/src/jastadd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev-2559/Compiler/ModelicaFrontEnd/src/jastadd/ast/InstanceTree.ast
r14235 r14237 41 41 [Dummy3:InstConstraining]; // Dummy node to prevent InstConstraining from being classified as root 42 42 43 abstract InstClassDecl: InstBaseNode ::= <SrcClassDecl:SrcClassDecl> /[ClassAnnotation:InstClassModification]/ /FunctionType:FType/ / GeneratedInnerModifications:InstModification*/;43 abstract InstClassDecl: InstBaseNode ::= <SrcClassDecl:SrcClassDecl> /[ClassAnnotation:InstClassModification]/ /FunctionType:FType/ /InstGeneratedInners:InstGeneratedInner*/ /GeneratedInnerModifications:InstModification*/; 44 44 abstract InstBaseClassDecl : InstClassDecl ::= [InstConstrainingClass] InstRestriction; 45 45 InstLibNode : InstClassDecl ::= /ActualInstClass:InstClassDecl/; -
branches/dev-2559/Compiler/ModelicaFrontEnd/src/jastadd/errorcheck/ErrorCheck.jrag
r14235 r14237 693 693 } 694 694 getInstRestriction().collectErrors(checkType); 695 getInstGeneratedInners ().collectErrors(checkType);695 getInstGeneratedInnersList().collectErrors(checkType); 696 696 if (getSrcBaseClassDecl() instanceof SrcFullClassDecl) { 697 697 SrcFullClassDecl fcd = (SrcFullClassDecl) getSrcBaseClassDecl(); -
branches/dev-2559/Compiler/ModelicaFrontEnd/src/jastadd/flattening/Flattening.jrag
r14123 r14237 98 98 Flattener f = new Flattener(fc); 99 99 flatten(f, FlattenBindingExp.ALL, level); 100 getInstGeneratedInners ().flatten(f, FlattenBindingExp.ALL, level);100 getInstGeneratedInnersList().flatten(f, FlattenBindingExp.ALL, level); 101 101 flattenUsedFuncsAndEnums(f); 102 102 flattenInstClassDeclExtra(f); … … 324 324 public void InstClassDecl.flattenUsedFuncsAndEnums(Flattener f) { 325 325 super.flattenUsedFuncsAndEnums(f); 326 getInstGeneratedInners ().flattenUsedFuncsAndEnums(f);326 getInstGeneratedInnersList().flattenUsedFuncsAndEnums(f); 327 327 } 328 328 -
branches/dev-2559/Compiler/ModelicaFrontEnd/src/jastadd/flattening/connections/Connections.jrag
r13675 r14237 1336 1336 public void InstClassDecl.buildConnectionSets(FAccess prefix, ConnectionSetManager csm, boolean connect) { 1337 1337 super.buildConnectionSets(prefix, csm, connect); 1338 getInstGeneratedInners ().buildConnectionSets(prefix, csm, connect);1338 getInstGeneratedInnersList().buildConnectionSets(prefix, csm, connect); 1339 1339 } 1340 1340 -
branches/dev-2559/Compiler/ModelicaFrontEnd/src/jastadd/instance/InnerOuter.jrag
r14235 r14237 76 76 String name = outer.name(); 77 77 InstGeneratedInner res = null; 78 List<InstGeneratedInner> inners = getInstGeneratedInners ();78 List<InstGeneratedInner> inners = getInstGeneratedInnersList(); 79 79 for (InstGeneratedInner node : inners) { 80 80 if (node.matches(name)) { … … 87 87 } else { 88 88 res = new InstGeneratedInner(this, outer, nonInner); 89 inners.add(res);90 inners.getChild(inners.getNumChild() - 1); // Make sure res is final89 addInstGeneratedInners(res); 90 return getInstGeneratedInners(getNumInstGeneratedInners() - 1).getInstComponentDecl(); // Make sure res is final 91 91 } 92 92 return res.getInstComponentDecl(); 93 93 } 94 94 95 syn nta List<InstGeneratedInner> InstClassDecl.getInstGeneratedInners () = new List<InstGeneratedInner>();95 syn nta List<InstGeneratedInner> InstClassDecl.getInstGeneratedInnersList() = new List<InstGeneratedInner>(); 96 96 97 97 eq InstClassDecl.getGeneratedInnerModifications().lookupInstComponentInInstElement(String name) { 98 for (InstGeneratedInner igi : getInstGeneratedInners ()) {98 for (InstGeneratedInner igi : getInstGeneratedInnersList()) { 99 99 InstComponentDecl icd = igi.getInstComponentDecl(); 100 100 if (icd.matches(name)) { … … 105 105 } 106 106 107 eq Inst GeneratedInner.getChild().myEnvironment() = new Environment().mergeInnerClone(myGeneratedInnerModifications());108 eq Inst GeneratedInner.getChild().myEnvironment(String name) = new Environment().mergeInnerClone(myGeneratedInnerModifications()).filter(name);107 eq InstClassDecl.getInstGeneratedInners().myEnvironment() = new Environment().mergeInnerClone(getGeneratedInnerModificationsList()); 108 eq InstClassDecl.getInstGeneratedInners().myEnvironment(String name) = new Environment().mergeInnerClone(getGeneratedInnerModificationsList()).filter(name); 109 109 110 inh List<InstModification> InstGeneratedInner.myGeneratedInnerModifications();111 eq InstClassDecl.getChild().myGeneratedInnerModifications() = getGeneratedInnerModificationsList();112 113 110 syn lazy List<InstModification> InstClassDecl.getGeneratedInnerModificationsList() { 114 111 List<InstModification> res = new List<>();
Note: See TracChangeset
for help on using the changeset viewer.