import { BaseNode } from "./base.js";
import { Literal, VariableNameLiteral } from "./literals.js";
import type { Expression } from "../types.js";
export type ObjectPatternProperty = {
    type: "objectPatternProperty";
    key: string;
    value: BindingPattern | Literal | ResultPattern;
};
export type ObjectPatternShorthand = {
    type: "objectPatternShorthand";
    name: string;
};
export type ObjectPattern = BaseNode & {
    type: "objectPattern";
    properties: (ObjectPatternProperty | ObjectPatternShorthand | RestPattern)[];
};
export type ArrayPattern = BaseNode & {
    type: "arrayPattern";
    elements: (BindingPattern | Literal | WildcardPattern | RestPattern | ResultPattern)[];
};
export type RestPattern = BaseNode & {
    type: "restPattern";
    identifier: string;
};
export type WildcardPattern = BaseNode & {
    type: "wildcardPattern";
};
export type IsExpression = BaseNode & {
    type: "isExpression";
    expression: Expression;
    pattern: MatchPattern;
};
export type ResultPattern = BaseNode & {
    type: "resultPattern";
    kind: "success" | "failure";
    binding: string | null;
};
export type BindingPattern = ObjectPattern | ArrayPattern | RestPattern | WildcardPattern | VariableNameLiteral;
export type MatchPattern = BindingPattern | Literal | ResultPattern;
export type Pattern = MatchPattern;
