import { type LanguageMapProtocol } from "https://deno.land/x/frugal@0.5.0/docs/dep/prism.ts";
Methods
Creates a deep copy of the language with the given id and appends the given tokens.
If a token in redef
also appears in the copied language, then the existing token in the copied language
will be overwritten at its original position.
insertBefore(): Grammar
Inserts tokens before another token in a language definition or any other grammar.
As this needs to recreate the object (we cannot actually insert before keys in object literals), we cannot just provide an object, we need an object and a key.
If the grammar of inside
and insert
have tokens with the same name, the tokens in inside
will be ignored.
All references of the old object accessible from Prism.languages
or insert
will be replace with the new one.