]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/dart.js
1 /*! `dart` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
8 Author: Maxim Dikun <dikmax@gmail.com>
9 Description: Dart a modern, object-oriented language developed by Google. For more information see https://www.dartlang.org/
10 Website: https://dart.dev
14 /** @type LanguageFn */
18 variants: [ { begin: '\\$[A-Za-z0-9_]+' } ]
21 const BRACED_SUBST
= {
29 keywords: 'true false null this is new super'
36 { match: /\b[0-9][0-9_]*(\.[0-9][0-9_]*)?([eE][+-]?[0-9][0-9_]*)?\b/ },
37 { match: /\b0[xX][0-9A-Fa-f][0-9A-Fa-f_]*\b/ }
66 hljs
.BACKSLASH_ESCAPE
,
75 hljs
.BACKSLASH_ESCAPE
,
85 hljs
.BACKSLASH_ESCAPE
,
95 hljs
.BACKSLASH_ESCAPE
,
102 BRACED_SUBST
.contains
= [
107 const BUILT_IN_TYPES
= [
137 const NULLABLE_BUILT_IN_TYPES
= BUILT_IN_TYPES
.map((e
) => `${e}?`);
139 const BASIC_KEYWORDS
= [
209 keyword: BASIC_KEYWORDS
,
212 .concat(NULLABLE_BUILT_IN_TYPES
)
225 $pattern: /[A-Za-z][A-Za-z0-9_]*\??/
237 subLanguage: 'markdown',
245 subLanguage: 'markdown',
252 hljs
.C_LINE_COMMENT_MODE
,
253 hljs
.C_BLOCK_COMMENT_MODE
,
256 beginKeywords: 'class interface',
260 { beginKeywords: 'extends implements' },
261 hljs
.UNDERSCORE_TITLE_MODE
269 { begin: '=>' // No markup, just a relevance booster
279 export default hljsGrammar
;