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>

Matches a flag.

Parameters

ParameterTypeDescription
inputstringThe string to match.

Returns

Option<string>

Implementation of

IUnorderedStrategy.matchFlag

Defined in

parser/strategies/PrefixedStrategy.ts:13


matchOption()

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

Matches an option.

Parameters

ParameterTypeDescription
inputstringThe string to match.

Returns

Option<readonly [string, string]>

Implementation of

IUnorderedStrategy.matchOption

Defined in

parser/strategies/PrefixedStrategy.ts:25