Skip to main content

Class: PrefixedStrategy

Implements​

Constructors​

new PrefixedStrategy()​

new PrefixedStrategy(prefixes: readonly string[], separators: readonly string[]): PrefixedStrategy

Parameters​

ParameterType
prefixesreadonly string[]
separatorsreadonly string[]

Returns​

PrefixedStrategy

Defined in​

parser/strategies/PrefixedStrategy.ts:8

Properties​

prefixes​

readonly prefixes: readonly string[]

Defined in​

parser/strategies/PrefixedStrategy.ts:5


separators​

readonly separators: readonly string[]

Defined in​

parser/strategies/PrefixedStrategy.ts:6

Methods​

matchFlag()​

matchFlag(input: string): Option<string, boolean>

Matches a flag.

Parameters​

ParameterTypeDescription
inputstringThe string to match.

Returns​

Option<string, boolean>

Implementation of​

IUnorderedStrategy.matchFlag

Defined in​

parser/strategies/PrefixedStrategy.ts:13


matchOption()​

matchOption(input: string): Option<readonly [string, string], boolean>

Matches an option.

Parameters​

ParameterTypeDescription
inputstringThe string to match.

Returns​

Option<readonly [string, string], boolean>

Implementation of​

IUnorderedStrategy.matchOption

Defined in​

parser/strategies/PrefixedStrategy.ts:25