]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/elm.js
1 /*! `elm` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
8 Author: Janis Voigtlaender <janis.voigtlaender@gmail.com>
9 Website: https://elm-lang.org
13 /** @type LanguageFn */
15 const COMMENT
= { variants: [
16 hljs
.COMMENT('--', '$'),
20 { contains: [ 'self' ] }
26 begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (built-in, infix).
37 begin: '\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?'
46 contains: LIST
.contains
85 // Top-level constructions.
88 beginKeywords: 'port effect module',
90 keywords: 'port effect module where command subscription exposing',
100 keywords: 'import as exposing',
110 keywords: 'type alias',
119 beginKeywords: 'infix infixl infixr',
130 contains: [ COMMENT
]
133 // Literals and names.
135 hljs
.QUOTE_STRING_MODE
,
138 hljs
.inherit(hljs
.TITLE_MODE
, { begin: '^[_a-z][\\w\']*' }),
141 { // No markup, relevance booster
152 hljs
.registerLanguage('elm', hljsGrammar
);