Skip to content

Commit 044e80e

Browse files
committed
allowed chained make statements and chained head scopes!
1 parent cc64768 commit 044e80e

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/main/java/org/jamplate/scope/AbstractHeadScope.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* <p>
2323
* Relations:
2424
* <ul>
25-
* <li>Previous: null</li>
25+
* <li>Previous: {@link HeadScope}</li>
2626
* <li>Next: {@link Scope}</li>
2727
* </ul>
2828
*
@@ -34,6 +34,7 @@ public abstract class AbstractHeadScope extends AbstractScope implements HeadSco
3434
@Override
3535
public boolean tryAttachTo(Scope scope) {
3636
Objects.requireNonNull(scope, "scope");
37-
return false;
37+
return scope instanceof HeadScope &&
38+
super.tryAttachTo(scope);
3839
}
3940
}

src/main/java/org/jamplate/scope/HeadScope.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* <p>
2121
* Relations:
2222
* <ul>
23-
* <li>Previous: null</li>
23+
* <li>Previous: {@link HeadScope}</li>
2424
* <li>Next: {@link Scope}</li>
2525
* </ul>
2626
*

src/main/java/org/jamplate/scope/Make.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* <p>
3333
* Relations:
3434
* <ul>
35-
* <li>Previous: null</li>
35+
* <li>Previous: {@link Make}</li>
3636
* <li>Next: {@link Scope}</li>
3737
* </ul>
3838
*
@@ -108,4 +108,10 @@ public String toString() {
108108

109109
return joiner.toString();
110110
}
111+
112+
@Override
113+
public boolean tryAttachTo(Scope scope) {
114+
return scope instanceof Make &&
115+
super.tryAttachTo(scope);
116+
}
111117
}

0 commit comments

Comments
 (0)