]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/elm.js
1 /*! `elm` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Author: Janis Voigtlaender <janis.voigtlaender@gmail.com>
8 Website: https://elm-lang.org
12 /** @type LanguageFn */
14 const COMMENT
= { variants: [
15 hljs
.COMMENT('--', '$'),
19 { contains: [ 'self' ] }
25 begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (built-in, infix).
36 begin: '\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?'
45 contains: LIST
.contains
84 // Top-level constructions.
87 beginKeywords: 'port effect module',
89 keywords: 'port effect module where command subscription exposing',
99 keywords: 'import as exposing',
109 keywords: 'type alias',
118 beginKeywords: 'infix infixl infixr',
129 contains: [ COMMENT
]
132 // Literals and names.
134 hljs
.QUOTE_STRING_MODE
,
137 hljs
.inherit(hljs
.TITLE_MODE
, { begin: '^[_a-z][\\w\']*' }),
140 { // No markup, relevance booster
151 export default hljsGrammar
;