aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/shedlang/compiler/ast
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-10-22 13:32:01 +0100
committerMichael Williamson <mike@zwobble.org>2023-10-22 13:32:17 +0100
commitf3bcdfe21627f64c11abda54596eb1388caa74e7 (patch)
tree7608ee3c1d03272fc4b7ebf1477c51b1600ac1e4 /src/test/java/org/shedlang/compiler/ast
parent296fa6ee9ee63089603c8bb13bb7d3346f85a037 (diff)
Add visibility for structs
Diffstat (limited to 'src/test/java/org/shedlang/compiler/ast')
-rw-r--r--src/test/java/org/shedlang/compiler/ast/untyped/UntypedStructDefinitionNodeMatcher.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/java/org/shedlang/compiler/ast/untyped/UntypedStructDefinitionNodeMatcher.java b/src/test/java/org/shedlang/compiler/ast/untyped/UntypedStructDefinitionNodeMatcher.java
index 5a73f49b..98bb535f 100644
--- a/src/test/java/org/shedlang/compiler/ast/untyped/UntypedStructDefinitionNodeMatcher.java
+++ b/src/test/java/org/shedlang/compiler/ast/untyped/UntypedStructDefinitionNodeMatcher.java
@@ -2,6 +2,7 @@ package org.shedlang.compiler.ast.untyped;
import org.pcollections.PVector;
import org.shedlang.compiler.testing.MatcherBuilder;
+import org.shedlang.compiler.types.Visibility;
import org.shedlang.compiler.util.P;
import org.zwobble.precisely.Matcher;
@@ -34,4 +35,8 @@ public class UntypedStructDefinitionNodeMatcher extends MatcherBuilder<UntypedNa
public UntypedStructDefinitionNodeMatcher withFields(Matcher<Iterable<? extends UntypedStructFieldDefinitionNode>> fields) {
return with(has("fields", x -> x.fields(), fields));
}
+
+ public UntypedStructDefinitionNodeMatcher withVisibility(Visibility visibility) {
+ return with(has("visibility", x -> x.visibility(), equalTo(visibility)));
+ }
}