Skip to content

LanguageMapProtocol.insertBefore method

LanguageMapProtocol › insertBefore

Unofficial

Inserts tokens before an existing token in a grammar.

Signature:

insertBefore(inside: string, before: string, insert: Record<string, GrammarValue>, root?: LanguageMap | undefined): Grammar

Parameters:

ParameterTypeDescription
insidestringThe language identifier.
beforestringThe token name to insert before.
insertRecord<string, GrammarValue>The tokens to insert.
root?LanguageMap | undefinedOptional root language map.

Returns: GrammarThe modified grammar.