nix.min.js 825 B

12345678910111213
  1. /*! `nix` grammar compiled for Highlight.js 11.7.0 */
  2. (()=>{var e=(()=>{"use strict";return e=>{const n={
  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. },s={className:"subst",begin:/\$\{/,end:/\}/,keywords:n},a={className:"string",
  7. contains:[{className:"char.escape",begin:/''\$/},s],variants:[{begin:"''",
  8. end:"''"},{begin:'"',end:'"'}]
  9. },i=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{
  10. begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{
  11. className:"attr",begin:/\S+/,relevance:.2}]}];return s.contains=i,{name:"Nix",
  12. aliases:["nixos"],keywords:n,contains:i}}})();hljs.registerLanguage("nix",e)
  13. })();