nix.min.js 820 B

123456789101112
  1. /*! `nix` grammar compiled for Highlight.js 11.7.0 */
  2. var hljsGrammar=(()=>{"use strict";return e=>{const a={
  3. keyword:["rec","with","let","in","inherit","assert","if","else","then"],
  4. literal:["true","false","or","and","null"],
  5. built_in:["import","abort","baseNameOf","dirOf","isNull","builtins","map","removeAttrs","throw","toString","derivation"]
  6. },n={className:"subst",begin:/\$\{/,end:/\}/,keywords:a},r={className:"string",
  7. contains:[{className:"char.escape",begin:/''\$/},n],variants:[{begin:"''",
  8. end:"''"},{begin:'"',end:'"'}]
  9. },s=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,{
  10. begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{
  11. className:"attr",begin:/\S+/,relevance:.2}]}];return n.contains=s,{name:"Nix",
  12. aliases:["nixos"],keywords:a,contains:s}}})();export default hljsGrammar;