From 052177994ca489078cf6057064ea2a97b35fe5d1 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 28 Oct 2023 23:21:10 +0100 Subject: Introduce TypedFunctionBodyNode --- .../compiler/ast/typed/TypedFunctionDefinitionNodeMatcher.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test/java/org/shedlang/compiler/ast') diff --git a/src/test/java/org/shedlang/compiler/ast/typed/TypedFunctionDefinitionNodeMatcher.java b/src/test/java/org/shedlang/compiler/ast/typed/TypedFunctionDefinitionNodeMatcher.java index 92e0c8e1..06963d8d 100644 --- a/src/test/java/org/shedlang/compiler/ast/typed/TypedFunctionDefinitionNodeMatcher.java +++ b/src/test/java/org/shedlang/compiler/ast/typed/TypedFunctionDefinitionNodeMatcher.java @@ -30,8 +30,8 @@ public class TypedFunctionDefinitionNodeMatcher extends MatcherBuilder body) { - return with(has("body", x -> x.body(), body)); + public TypedFunctionDefinitionNodeMatcher withBodyBlock(Matcher body) { + return with(has("body", x -> x.body().block(), body)); } public TypedFunctionDefinitionNodeMatcher withEffect(Matcher>> effect) { @@ -39,7 +39,7 @@ public class TypedFunctionDefinitionNodeMatcher extends MatcherBuilder> freeVariables) { - return with(has("freeVariables", x -> x.freeVariables(), freeVariables)); + return with(has("freeVariables", x -> x.body().freeVariables(), freeVariables)); } public TypedFunctionDefinitionNodeMatcher withName(String name) { -- cgit v1.2.3