From d4a9b9ec4805f07a3041699c5dd37984bc431beb Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 6 Nov 2026 15:42:47 +0000 Subject: Add untyped number literal node --- .../untyped/UntypedNumberLiteralNodeMatcher.java | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedNumberLiteralNodeMatcher.java (limited to 'src/test/java/org') diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedNumberLiteralNodeMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedNumberLiteralNodeMatcher.java new file mode 100644 index 0000000..b6b0f86 --- /dev/null +++ b/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedNumberLiteralNodeMatcher.java @@ -0,0 +1,47 @@ +// Generated by hobgoblin. + +package org.zwobble.hobgoblin.compiler.ast.untyped; + +// Custom area start: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNodeMatcher imports +// Custom area end: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNodeMatcher imports + +public final class UntypedNumberLiteralNodeMatcher implements org.zwobble.precisely.Matcher { + public static org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNodeMatcher isUntypedNumberLiteralNode() { + return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNodeMatcher(java.util.List.of()); + } + + private final java.util.List> submatchers; + + private UntypedNumberLiteralNodeMatcher( + java.util.List> submatchers + ) { + this.submatchers = submatchers; + } + + public org.zwobble.precisely.MatchResult match(java.lang.Object actual) { + return this.toMatcher().match(actual); + } + + public org.zwobble.precisely.TextTree describe() { + return this.toMatcher().describe(); + } + + private org.zwobble.precisely.Matcher toMatcher() { + return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNode.class, this.submatchers); + } + + public org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNodeMatcher withValue(org.zwobble.precisely.Matcher value) { + var submatchers = new java.util.ArrayList>(this.submatchers); + submatchers.add(org.zwobble.precisely.Matchers.has("value", org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNode::value, (org.zwobble.precisely.Matcher) value)); + return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNodeMatcher(submatchers); + } + + public org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNodeMatcher withSource(org.zwobble.precisely.Matcher source) { + var submatchers = new java.util.ArrayList>(this.submatchers); + submatchers.add(org.zwobble.precisely.Matchers.has("source", org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNode::source, (org.zwobble.precisely.Matcher) source)); + return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNodeMatcher(submatchers); + } + + // Custom area start: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNodeMatcher body + // Custom area end: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNumberLiteralNodeMatcher body +} -- cgit v1.2.3