//////////////////////////////////////////////////////////// // 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 visitSimplePatternPattern(SimplePattern pattern); T visitVariantPatternPattern(VariantPattern pattern); T visitFieldPatternPattern(FieldPattern pattern); T visitRecordPatternPattern(RecordPattern pattern); } public partial record SimplePattern(Name? Identifier) : Pattern() { public override T accept(IPatternVisitor visitor) { return visitor.visitSimplePatternPattern(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, SimplePattern? Rest) : Pattern() { public override T accept(IPatternVisitor visitor) { return visitor.visitRecordPatternPattern(this); } }