2024-07-13 07:40:24 +02:00
|
|
|
/*! `dart` grammar compiled for Highlight.js 11.10.0 */
|
2021-10-18 07:02:03 +02:00
|
|
|
(()=>{var e=(()=>{"use strict";return e=>{const n={className:"subst",variants:[{
|
|
|
|
begin:"\\$[A-Za-z0-9_]+"}]},a={className:"subst",variants:[{begin:/\$\{/,
|
|
|
|
end:/\}/}],keywords:"true false null this is new super"},t={className:"string",
|
|
|
|
variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",
|
|
|
|
illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",
|
|
|
|
contains:[e.BACKSLASH_ESCAPE,n,a]},{begin:'"""',end:'"""',
|
|
|
|
contains:[e.BACKSLASH_ESCAPE,n,a]},{begin:"'",end:"'",illegal:"\\n",
|
2021-06-08 07:40:19 +02:00
|
|
|
contains:[e.BACKSLASH_ESCAPE,n,a]},{begin:'"',end:'"',illegal:"\\n",
|
|
|
|
contains:[e.BACKSLASH_ESCAPE,n,a]}]};a.contains=[e.C_NUMBER_MODE,t]
|
|
|
|
;const i=["Comparable","DateTime","Duration","Function","Iterable","Iterator","List","Map","Match","Object","Pattern","RegExp","Set","Stopwatch","String","StringBuffer","StringSink","Symbol","Type","Uri","bool","double","int","num","Element","ElementList"],r=i.map((e=>e+"?"))
|
|
|
|
;return{name:"Dart",keywords:{
|
2023-05-04 06:28:08 +02:00
|
|
|
keyword:["abstract","as","assert","async","await","base","break","case","catch","class","const","continue","covariant","default","deferred","do","dynamic","else","enum","export","extends","extension","external","factory","false","final","finally","for","Function","get","hide","if","implements","import","in","interface","is","late","library","mixin","new","null","on","operator","part","required","rethrow","return","sealed","set","show","static","super","switch","sync","this","throw","true","try","typedef","var","void","when","while","with","yield"],
|
2021-06-08 07:40:19 +02:00
|
|
|
built_in:i.concat(r).concat(["Never","Null","dynamic","print","document","querySelector","querySelectorAll","window"]),
|
|
|
|
$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},
|
|
|
|
contains:[t,e.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0
|
|
|
|
}),e.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:"markdown",begin:".",
|
|
|
|
end:"$",relevance:0}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{
|
|
|
|
className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,
|
|
|
|
contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]
|
2021-10-18 07:02:03 +02:00
|
|
|
},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}}})()
|
|
|
|
;hljs.registerLanguage("dart",e)})();
|