//////////////////////////////////////////////////////////// // THIS FILE IS GENERATED. // // DO NOT EDIT. // //////////////////////////////////////////////////////////// #nullable enable namespace Finn.AST; public abstract record Pattern(Token Start) { 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(Token? Identifier, Token Token) : Pattern(Token) { public override TResult accept(TContext context, IPatternVisitor visitor) { return visitor.visitSimplePatternPattern(context, this); } } public partial record VariantPattern(Token Tag, Pattern? Argument, Token Backtick) : Pattern(Backtick) { public override TResult accept(TContext context, IPatternVisitor visitor) { return visitor.visitVariantPatternPattern(context, this); } } public partial record FieldPattern(Token Name, Pattern? Pattern) : Pattern(Name) { public override TResult accept(TContext context, IPatternVisitor visitor) { return visitor.visitFieldPatternPattern(context, this); } } public partial record RecordPattern(FieldPattern[] Fields, SimplePattern? Rest, Token LBrace) : Pattern(LBrace) { public override TResult accept(TContext context, IPatternVisitor visitor) { return visitor.visitRecordPatternPattern(context, this); } }