klyn.code.LanguageRegistry.register
method
public static register(profile as LanguageProfile, tokenizer as Tokenizer = null) as Void
Description

Registers a custom or built-in LanguageProfile and its Tokenizer.

Parameters
ParameterDescription
profileDeclarative LanguageProfile.
tokenizerAssociated Tokenizer implementation (or null to create a default CodeTokenizer(profile)).
Example
import klyn.code

custom = LanguageProfile("dsl", "Custom DSL").withExtensions(["dsl"]).withKeywords(["rule", "when", "then"])
LanguageRegistry.register(custom, CodeTokenizer(custom))
assert LanguageRegistry.profileForId("dsl") is not null