import { InputState } from "./InputState"; import { MatchingLogic } from "./Matchers"; import { MatchPrefixResult } from "./MatchPrefixResult"; import { WhiteSpaceHandler } from "./Config"; import { MatchReport } from "./MatchReport"; /** * Match zero or more of these * @param o matcher * @return {Rep1} */ export declare function zeroOrMore(o: any): Repetition; /** * Match at least one of these * @param o matcher * @return {Rep1} */ export declare function atLeastOne(o: any): Repetition; /** * Handle repetition, with or without a separator. * Prefer subclasses for simplicity and clarity. * By default, match zero or more times without a separator */ export declare class Repetition implements MatchingLogic, WhiteSpaceHandler { min: number; sep?: any; $consumeWhiteSpaceBetweenTokens: boolean; private readonly matcher; private readonly sepMatcher; /** * Generic rep support. Normally use subclasses. * @param o matcher * @param min mininum number of times the matcher must match for this to be considered a match. Default 0 * @param sep if this is provided it indicates that this is a rep sep and it is the delimiter */ constructor(o: any, min?: number, sep?: any); readonly $id: string; consumeWhiteSpace(consumeWhiteSpaceBetweenTokens: boolean): this; canStartWith(char: string): boolean; readonly requiredPrefix: string; matchPrefix(is: InputState, thisMatchContext: {}, parseContext: {}): MatchPrefixResult; matchPrefixReport(is: InputState, thisMatchContext: any, parseContext: any): MatchReport; } /** * Match 0 or more times, without a separator */ export declare class Rep extends Repetition { constructor(o: any); } /** * Match 1 or more times */ export declare class Rep1 extends Repetition { constructor(o: any); } export declare class RepSep extends Repetition { constructor(o: any, sep: any); } export declare class Rep1Sep extends Repetition { constructor(o: any, sep: any); }