]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/dts.js
1 /*! `dts` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
8 Description: *.dts files used in the Linux kernel
9 Author: Martin Braun <martin.braun@ettus.com>, Moritz Fischer <moritz.fischer@ettus.com>
10 Website: https://elinux.org/Device_Tree_Reference
14 /** @type LanguageFn */
19 hljs
.inherit(hljs
.QUOTE_STRING_MODE
, { begin: '((u8?|U)|L)?"' }),
23 contains: [ hljs
.BACKSLASH_ESCAPE
]
36 { begin: '\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)' },
37 { begin: hljs
.C_NUMBER_RE
}
42 const PREPROCESSOR
= {
46 keywords: { keyword: 'if else elif endif define undef ifdef ifndef' },
53 beginKeywords: 'include',
55 keywords: { keyword: 'include' },
57 hljs
.inherit(STRINGS
, { className: 'string' }),
67 hljs
.C_LINE_COMMENT_MODE
,
68 hljs
.C_BLOCK_COMMENT_MODE
73 className: 'variable',
79 begin: '/[a-z][a-z\\d-]*/'
84 begin: '^\\s*[a-zA-Z_][a-zA-Z\\d_]*:'
87 const CELL_PROPERTY
= {
99 className: 'title.class',
100 begin: /[a-zA-Z_][a-zA-Z\d_@-]*(?=\s\{)/,
105 className: 'title.class',
106 begin: /^\/(?=\s*\{)/,
110 // TODO: `attribute` might be the right scope here, unsure
111 // I'm not sure if all these key names have semantic meaning or not
112 const ATTR_NO_VALUE
= {
113 match: /[a-z][a-z-,]+(?=;)/,
131 scope: "punctuation",
133 // `};` combined is just to avoid tons of useless punctuation nodes
148 hljs
.C_LINE_COMMENT_MODE
,
149 hljs
.C_BLOCK_COMMENT_MODE
,
155 begin: hljs
.IDENT_RE
+ '::',
166 hljs
.registerLanguage('dts', hljsGrammar
);