Skip to content

Commit

Permalink
Construct EagerMacroFunction from EagerCallTag and EagerFromTag
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmith-hs committed Sep 17, 2024
1 parent 11926b5 commit e212f2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.hubspot.jinjava.interpret.JinjavaInterpreter.InterpreterScopeClosable;
import com.hubspot.jinjava.lib.expression.EagerExpressionStrategy;
import com.hubspot.jinjava.lib.fn.MacroFunction;
import com.hubspot.jinjava.lib.fn.eager.EagerMacroFunction;
import com.hubspot.jinjava.lib.tag.CallTag;
import com.hubspot.jinjava.lib.tag.FlexibleTag;
import com.hubspot.jinjava.tree.TagNode;
Expand Down Expand Up @@ -45,7 +46,7 @@ public String eagerInterpret(
LengthLimitingStringJoiner joiner;
try (InterpreterScopeClosable c = interpreter.enterNonStackingScope()) {
caller =
new MacroFunction(
new EagerMacroFunction(
tagNode.getChildren(),
"caller",
new LinkedHashMap<>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.hubspot.jinjava.interpret.InterpretException;
import com.hubspot.jinjava.interpret.JinjavaInterpreter;
import com.hubspot.jinjava.lib.fn.MacroFunction;
import com.hubspot.jinjava.lib.fn.eager.EagerMacroFunction;
import com.hubspot.jinjava.lib.tag.DoTag;
import com.hubspot.jinjava.lib.tag.FromTag;
import com.hubspot.jinjava.loader.RelativePathResolver;
Expand Down Expand Up @@ -41,7 +42,7 @@ public String getEagerTagImage(TagToken tagToken, JinjavaInterpreter interpreter
imports
.values()
.forEach(value -> {
MacroFunction deferredMacro = new MacroFunction(
MacroFunction deferredMacro = new EagerMacroFunction(
null,
value,
null,
Expand Down

0 comments on commit e212f2f

Please sign in to comment.