Skip to main content

Class: PrefixedStrategy

@sapphire/lexure.PrefixedStrategy

Implements

Constructors

constructor

new PrefixedStrategy(prefixes, separators): PrefixedStrategy

Parameters

NameType
prefixesreadonly string[]
separatorsreadonly string[]

Returns

PrefixedStrategy

Defined in

lib/parser/strategies/PrefixedStrategy.ts:8

Properties

prefixes

Readonly prefixes: readonly string[]

Defined in

lib/parser/strategies/PrefixedStrategy.ts:5


separators

Readonly separators: readonly string[]

Defined in

lib/parser/strategies/PrefixedStrategy.ts:6

Methods

matchFlag

matchFlag(input): Option<string>

Matches a flag.

Parameters

NameTypeDescription
inputstringThe string to match.

Returns

Option<string>

Implementation of

IUnorderedStrategy.matchFlag

Defined in

lib/parser/strategies/PrefixedStrategy.ts:13


matchOption

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

Matches an option.

Parameters

NameTypeDescription
inputstringThe string to match.

Returns

Option<readonly [string, string]>

Implementation of

IUnorderedStrategy.matchOption

Defined in

lib/parser/strategies/PrefixedStrategy.ts:25