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