Skip to content

LanguageMapProtocol.extend method

LanguageMapProtocol › extend

Unofficial

Creates a new grammar by extending an existing language definition.

Signature:

extend(id: string, redef: Record<string, GrammarValue>): Grammar

Parameters:

Parameter Type Description
id string The language identifier to extend.
redef Record<string, GrammarValue> Token definitions to add or override.

Returns: GrammarThe new grammar.