summaryrefslogtreecommitdiff
path: root/pyssg.xyz/live/static/hl/languages/dts.min.js
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2022-12-13 20:44:08 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2022-12-13 20:44:08 -0600
commitabc0de079b895af1b705894eb2b63596e3e37274 (patch)
treec51d24dce55da8d9b227cbac6c2ef64a59d8e9dc /pyssg.xyz/live/static/hl/languages/dts.min.js
parentdb4b3736d4f45137a733ce5eb1e50aec968ca1d2 (diff)
add pyssg.xyz configs and templates
Diffstat (limited to 'pyssg.xyz/live/static/hl/languages/dts.min.js')
-rw-r--r--pyssg.xyz/live/static/hl/languages/dts.min.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/pyssg.xyz/live/static/hl/languages/dts.min.js b/pyssg.xyz/live/static/hl/languages/dts.min.js
new file mode 100644
index 0000000..ba4e9f0
--- /dev/null
+++ b/pyssg.xyz/live/static/hl/languages/dts.min.js
@@ -0,0 +1,21 @@
+hljs.registerLanguage("dts",(()=>{"use strict";return e=>{const n={
+className:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{
+begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',
+contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},a={
+className:"number",variants:[{
+begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:e.C_NUMBER_RE}],
+relevance:0},s={className:"meta",begin:"#",end:"$",keywords:{
+"meta-keyword":"if else elif endif define undef ifdef ifndef"},contains:[{
+begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{
+"meta-keyword":"include"},contains:[e.inherit(n,{className:"meta-string"}),{
+className:"meta-string",begin:"<",end:">",illegal:"\\n"}]
+},n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i={className:"variable",
+begin:/&[a-z\d_]*\b/},d={className:"meta-keyword",begin:"/[a-z][a-z\\d-]*/"},l={
+className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},r={className:"params",
+begin:"<",end:">",contains:[a,i]},_={className:"class",
+begin:/[a-zA-Z_][a-zA-Z\d_@]*\s\{/,end:/[{;=]/,returnBegin:!0,excludeEnd:!0}
+;return{name:"Device Tree",keywords:"",contains:[{className:"class",
+begin:"/\\s*\\{",end:/\};/,relevance:10,
+contains:[i,d,l,_,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,n]
+},i,d,l,_,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,n,s,{
+begin:e.IDENT_RE+"::",keywords:""}]}}})()); \ No newline at end of file