diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-10-28 23:21:10 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-10-28 23:21:10 +0100 |
| commit | 052177994ca489078cf6057064ea2a97b35fe5d1 (patch) | |
| tree | a5e2d464a0ee9d6a749cfa835ac0539ac39f8920 /src/test/java/org/shedlang/compiler/ast | |
| parent | dcfcdb2b408f05ab6b5d5ca8713c10af4ff80495 (diff) | |
Introduce TypedFunctionBodyNode
Diffstat (limited to 'src/test/java/org/shedlang/compiler/ast')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/ast/typed/TypedFunctionDefinitionNodeMatcher.java | 6 |
1 files changed, 3 insertions, 3 deletions
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<TypedName return new TypedFunctionDefinitionNodeMatcher(submatchers); } - public TypedFunctionDefinitionNodeMatcher withBody(Matcher<TypedBlockNode> body) { - return with(has("body", x -> x.body(), body)); + public TypedFunctionDefinitionNodeMatcher withBodyBlock(Matcher<TypedBlockNode> body) { + return with(has("body", x -> x.body().block(), body)); } public TypedFunctionDefinitionNodeMatcher withEffect(Matcher<Optional<? extends TypedTypeLevelExpressionNode<?>>> effect) { @@ -39,7 +39,7 @@ public class TypedFunctionDefinitionNodeMatcher extends MatcherBuilder<TypedName } public TypedFunctionDefinitionNodeMatcher withFreeVariables(Matcher<Iterable<FreeVariable>> freeVariables) { - return with(has("freeVariables", x -> x.freeVariables(), freeVariables)); + return with(has("freeVariables", x -> x.body().freeVariables(), freeVariables)); } public TypedFunctionDefinitionNodeMatcher withName(String name) { |
