Skip to main content

Class: PrefixedStrategy

Defined in: parser/strategies/PrefixedStrategy.ts:4

Implements​

Constructors​

Constructor​

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

Defined in: parser/strategies/PrefixedStrategy.ts:8

Parameters​

ParameterType
prefixesreadonly string[]
separatorsreadonly string[]

Returns​

PrefixedStrategy

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>

Defined in: parser/strategies/PrefixedStrategy.ts:13

Matches a flag.

Parameters​

ParameterTypeDescription
inputstringThe string to match.

Returns​

Option<string>

Implementation of​

IUnorderedStrategy.matchFlag


matchOption()​

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

Defined in: parser/strategies/PrefixedStrategy.ts:25

Matches an option.

Parameters​

ParameterTypeDescription
inputstringThe string to match.

Returns​

Option<readonly [string, string]>

Implementation of​

IUnorderedStrategy.matchOption