export interface ParseOptions { filename?: string; startRule?: "start"; tracer?: any; [key: string]: any; } export type ParseFunction = (input: string, options?: Options) => Options extends { startRule: infer StartRule; } ? StartRule extends "start" ? Start : Start : Start; export type Start = Selector | null; export type Operator = "/" | ","; export type Combinator = "+" | ">"; export type Property = IDENT; export type Selector = { type: "Selector"; combinator: Combinator; left: SimpleSelector; right: Selector; } | { type: "Selector"; combinator: " "; left: SimpleSelector; right: Selector; } | SimpleSelector; export type SimpleSelector = { type: "SimpleSelector"; element: ElementName; qualifiers: (Id | Class | Attrib | Pseudo)[]; } | { type: "SimpleSelector"; element: "*"; qualifiers: (Id | Class | Attrib | Pseudo)[]; }; export type Id = { type: "IDSelector"; id: HASH; }; export type Class = { type: "ClassSelector"; class: IDENT; }; export type ElementName = IDENT | "*"; export type Attrib = { type: "AttributeSelector"; attribute: IDENT; operator: string | null; value: string | null; }; export type Pseudo = { type: "PseudoSelector"; value: { type: "Function"; name: FUNCTION; params: IDENT[]; } | IDENT; }; export type H_1 = string; export type Nonascii = string; export type Unicode = string; export type Escape = Unicode | string; export type Nmstart = string | Nonascii | Escape; export type Nmchar = string | Nonascii | Escape; export type String1 = string; export type String2 = string; export type Comment = ["/*", string[], "*"[], [string, string[], "*"[]][], "/"]; export type Ident = string; export type Name = string; export type Num = number; export type String_1 = String1 | String2; export type Url = string; export type S_1 = string[]; export type W = S_1 | null; export type Nl = "\n" | "\r\n" | "\r" | "\f"; export type A = string | "a"; export type C = string | "c"; export type D = string | "d"; export type E = string | "e"; export type G = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "g"; export type H = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "h"; export type I = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "i"; export type K = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "k"; export type L = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "l"; export type M = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "m"; export type N = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "n"; export type O = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "o"; export type P = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "p"; export type R = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "r"; export type S_2 = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "s"; export type T = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "t"; export type U = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "u"; export type X = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "x"; export type Z = string | [ "\\", "0" | null, "0" | null, "0" | null, "0" | null, string, ("\r\n" | string) | null ] | "z"; export type S = [Comment[], S_1]; export type CDO = [Comment[], ""]; export type INCLUDES = [Comment[], "~="]; export type DASHMATCH = [Comment[], "|="]; export type STRING = String_1; export type IDENT = Ident; export type HASH = string; export type IMPORTSYM = [Comment[], "@", I, M, P, O, R, T]; export type PAGESYM = [Comment[], "@", P, A, G, E]; export type MEDIASYM = [Comment[], "@", M, E, D, I, A]; export type CHARSETSYM = [Comment[], "@charset "]; export type IMPORTANTSYM = [ Comment[], "!", (S_1 | Comment)[], I, M, P, O, R, T, A, N, T ]; export type EMS = { value: Num; unit: "em"; }; export type EXS = { value: Num; unit: "ex"; }; export type LENGTH = { value: Num; unit: "px"; } | { value: Num; unit: "cm"; } | { value: Num; unit: "mm"; } | { value: Num; unit: "in"; } | { value: Num; unit: "pt"; } | { value: Num; unit: "pc"; }; export type ANGLE = { value: Num; unit: "deg"; } | { value: Num; unit: "rad"; } | { value: Num; unit: "grad"; }; export type TIME = { value: Num; unit: "ms"; } | { value: Num; unit: "s"; }; export type FREQ = { value: Num; unit: "hz"; } | { value: Num; unit: "kh"; }; export type PERCENTAGE = { value: Num; unit: "%"; }; export type NUMBER = { value: Num; unit: null; }; export type URI = String_1 | Url; export type FUNCTION = Ident; //# sourceMappingURL=peggy-types.d.ts.map