Skip to content

Commit e212f2f

Browse files
committed
Construct EagerMacroFunction from EagerCallTag and EagerFromTag
1 parent 11926b5 commit e212f2f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/com/hubspot/jinjava/lib/tag/eager/EagerCallTag.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.hubspot.jinjava.interpret.JinjavaInterpreter.InterpreterScopeClosable;
88
import com.hubspot.jinjava.lib.expression.EagerExpressionStrategy;
99
import com.hubspot.jinjava.lib.fn.MacroFunction;
10+
import com.hubspot.jinjava.lib.fn.eager.EagerMacroFunction;
1011
import com.hubspot.jinjava.lib.tag.CallTag;
1112
import com.hubspot.jinjava.lib.tag.FlexibleTag;
1213
import com.hubspot.jinjava.tree.TagNode;
@@ -45,7 +46,7 @@ public String eagerInterpret(
4546
LengthLimitingStringJoiner joiner;
4647
try (InterpreterScopeClosable c = interpreter.enterNonStackingScope()) {
4748
caller =
48-
new MacroFunction(
49+
new EagerMacroFunction(
4950
tagNode.getChildren(),
5051
"caller",
5152
new LinkedHashMap<>(),

src/main/java/com/hubspot/jinjava/lib/tag/eager/EagerFromTag.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.hubspot.jinjava.interpret.InterpretException;
77
import com.hubspot.jinjava.interpret.JinjavaInterpreter;
88
import com.hubspot.jinjava.lib.fn.MacroFunction;
9+
import com.hubspot.jinjava.lib.fn.eager.EagerMacroFunction;
910
import com.hubspot.jinjava.lib.tag.DoTag;
1011
import com.hubspot.jinjava.lib.tag.FromTag;
1112
import com.hubspot.jinjava.loader.RelativePathResolver;
@@ -41,7 +42,7 @@ public String getEagerTagImage(TagToken tagToken, JinjavaInterpreter interpreter
4142
imports
4243
.values()
4344
.forEach(value -> {
44-
MacroFunction deferredMacro = new MacroFunction(
45+
MacroFunction deferredMacro = new EagerMacroFunction(
4546
null,
4647
value,
4748
null,

0 commit comments

Comments
 (0)