Commit 74ba289c authored by Johannes Mey's avatar Johannes Mey
Browse files

Merge branch 'mquat2'

parents 1fe0a16e 30011b02
Pipeline #3787 passed with stage
in 56 seconds
...@@ -170,7 +170,9 @@ aspect Constructors { ...@@ -170,7 +170,9 @@ aspect Constructors {
list.addAll(getSuper().decl().componentsTransitive()); list.addAll(getSuper().decl().componentsTransitive());
} }
for (Component c: getComponents()) { for (Component c: getComponents()) {
list.add(c); if (c.inConstructor()) {
list.add(c);
}
} }
return list; return list;
} }
...@@ -186,6 +188,12 @@ aspect Constructors { ...@@ -186,6 +188,12 @@ aspect Constructors {
&& getSuper().decl() != null && getSuper().decl() != null
&& getSuper().decl().needsConstructor(); && getSuper().decl().needsConstructor();
} }
/**
* @return true, if the component should be added to the constructor (i.e., is not an NTA)
*/
syn boolean Component.inConstructor() = true;
eq NTAComponent.inConstructor() = false;
} }
aspect Utils { aspect Utils {
......
Root ::= A* B*; Root ::= A* B*;
A ::= <Name>; A ::= <Name> /SomeNTA:A/;
B ::= <Name>; B ::= <Name>;
rel A.Di1 -> B; rel A.Di1 -> B;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment