]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/dts.js
1 /*! `dts` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Description: *.dts files used in the Linux kernel
8 Author: Martin Braun <martin.braun@ettus.com>, Moritz Fischer <moritz.fischer@ettus.com>
9 Website: https://elinux.org/Device_Tree_Reference
13 /** @type LanguageFn */
18 hljs
.inherit(hljs
.QUOTE_STRING_MODE
, { begin: '((u8?|U)|L)?"' }),
22 contains: [ hljs
.BACKSLASH_ESCAPE
]
35 { begin: '\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)' },
36 { begin: hljs
.C_NUMBER_RE
}
41 const PREPROCESSOR
= {
45 keywords: { keyword: 'if else elif endif define undef ifdef ifndef' },
52 beginKeywords: 'include',
54 keywords: { keyword: 'include' },
56 hljs
.inherit(STRINGS
, { className: 'string' }),
66 hljs
.C_LINE_COMMENT_MODE
,
67 hljs
.C_BLOCK_COMMENT_MODE
72 className: 'variable',
78 begin: '/[a-z][a-z\\d-]*/'
83 begin: '^\\s*[a-zA-Z_][a-zA-Z\\d_]*:'
86 const CELL_PROPERTY
= {
98 className: 'title.class',
99 begin: /[a-zA-Z_][a-zA-Z\d_@-]*(?=\s\{)/,
104 className: 'title.class',
105 begin: /^\/(?=\s*\{)/,
109 // TODO: `attribute` might be the right scope here, unsure
110 // I'm not sure if all these key names have semantic meaning or not
111 const ATTR_NO_VALUE
= {
112 match: /[a-z][a-z-,]+(?=;)/,
130 scope: "punctuation",
132 // `};` combined is just to avoid tons of useless punctuation nodes
147 hljs
.C_LINE_COMMENT_MODE
,
148 hljs
.C_BLOCK_COMMENT_MODE
,
154 begin: hljs
.IDENT_RE
+ '::',
165 export default hljsGrammar
;