//////////////////////////////////////////////////////////// // THIS FILE IS GENERATED. // // DO NOT EDIT. // //////////////////////////////////////////////////////////// #nullable enable namespace Finn.AST; public abstract record Pattern() { public abstract T accept(IPatternVisitor visitor); } public interface IPatternVisitor { T visitIdentifierPatternPattern(IdentifierPattern pattern); T visitVariantPatternPattern(VariantPattern pattern); T visitFieldPatternPattern(FieldPattern pattern); T visitRecordPatternPattern(RecordPattern pattern); } public partial record IdentifierPattern(Name? Identifier) : Pattern() { public override T accept(IPatternVisitor visitor) { return visitor.visitIdentifierPatternPattern(this); } } public partial record VariantPattern(Name Tag, Pattern? Argument) : Pattern() { public override T accept(IPatternVisitor visitor) { return visitor.visitVariantPatternPattern(this); } } public partial record FieldPattern(Name Name, Pattern? Pattern) : Pattern() { public override T accept(IPatternVisitor visitor) { return visitor.visitFieldPatternPattern(this); } } public partial record RecordPattern(FieldPattern[] Fields, IdentifierPattern Rest) : Pattern() { public override T accept(IPatternVisitor visitor) { return visitor.visitRecordPatternPattern(this); } }