Interface IMonarchLanguage

Expand description

A Monarch language definition

interface IMonarchLanguage {
    brackets?: IMonarchLanguageBracket[];
    defaultToken?: string;
    ignoreCase?: boolean;
    includeLF?: boolean;
    start?: string;
    tokenizer: { [name: string]: IMonarchLanguageRule[] };
    tokenPostfix?: string;
    unicode?: boolean;
    [key: string]: any;
}

Properties§

§brackets?: IMonarchLanguageBracket[]

for example [['{','}','delimiter.curly']]

§defaultToken?: string

if no match in the tokenizer assign this token class (default 'source')

§ignoreCase?: boolean

is the language case insensitive?

§includeLF?: boolean

include line feeds (in the form of a \n character) at the end of lines Defaults to false

§start?: string

start symbol in the tokenizer (by default the first entry is used)

§tokenizer: { ... }

map from string to ILanguageRule[]

§tokenPostfix?: string

attach this to every token class (by default '.' + name)

§unicode?: boolean

is the language unicode-aware? (i.e., /\u{1D306}/)