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

Source

lib/parser/strategies/PrefixedStrategy.ts:8

Properties

prefixes

readonly prefixes: readonly string[]

Source

lib/parser/strategies/PrefixedStrategy.ts:5


separators

readonly separators: readonly string[]

Source

lib/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

Source

lib/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

Source

lib/parser/strategies/PrefixedStrategy.ts:25