var n,p;function w(){if(p)return n;p=1;function h(t){const r=t.regex,s={keyword:["assert","else","if","in","inherit","let","or","rec","then","with"],literal:["true","false","null"],built_in:["abort","baseNameOf","builtins","derivation","derivationStrict","dirOf","fetchGit","fetchMercurial","fetchTarball","fetchTree","fromTOML","import","isNull","map","placeholder","removeAttrs","scopedImport","throw","toString"]},m={scope:"built_in",match:r.either(...["abort","add","addDrvOutputDependencies","addErrorContext","all","any","appendContext","attrNames","attrValues","baseNameOf","bitAnd","bitOr","bitXor","break","builtins","catAttrs","ceil","compareVersions","concatLists","concatMap","concatStringsSep","convertHash","currentSystem","currentTime","deepSeq","derivation","derivationStrict","dirOf","div","elem","elemAt","false","fetchGit","fetchMercurial","fetchTarball","fetchTree","fetchurl","filter","filterSource","findFile","flakeRefToString","floor","foldl'","fromJSON","fromTOML","functionArgs","genList","genericClosure","getAttr","getContext","getEnv","getFlake","groupBy","hasAttr","hasContext","hashFile","hashString","head","import","intersectAttrs","isAttrs","isBool","isFloat","isFunction","isInt","isList","isNull","isPath","isString","langVersion","length","lessThan","listToAttrs","map","mapAttrs","match","mul","nixPath","nixVersion","null","parseDrvName","parseFlakeRef","partition","path","pathExists","placeholder","readDir","readFile","readFileType","removeAttrs","replaceStrings","scopedImport","seq","sort","split","splitVersion","storeDir","storePath","stringLength","sub","substring","tail","throw","toFile","toJSON","toPath","toString","toXML","trace","traceVerbose","true","tryEval","typeOf","unsafeDiscardOutputDependency","unsafeDiscardStringContext","unsafeGetAttrPos","warn","zipAttrsWith"].map($=>`builtins\\.${$}`)),relevance:10},e="[A-Za-z_][A-Za-z0-9_'-]*",g={scope:"symbol",match:new RegExp(`<${e}(/${e})*>`)},i="[A-Za-z0-9_\\+\\.-]+",u={scope:"symbol",match:new RegExp(`(\\.\\.|\\.|~)?/(${i})?(/${i})*(?=[\\s;])`)},o=r.either("==","=","\\+\\+","\\+","<=","<\\|","<",">=",">","->","//","/","!=","!","\\|\\|","\\|>","\\?","\\*","&&"),f={scope:"operator",match:r.concat(o,/(?!-)/),relevance:0},b={scope:"number",match:new RegExp(`${t.NUMBER_RE}(?!-)`),relevance:0},d={variants:[{scope:"operator",beforeMatch:/\s/,begin:/-(?!>)/},{begin:[new RegExp(`${t.NUMBER_RE}`),/-/,/(?!>)/],beginScope:{1:"number",2:"operator"}},{begin:[o,/-/,/(?!>)/],beginScope:{1:"operator",2:"operator"}}],relevance:0},v={beforeMatch:/(^|\{|;)\s*/,begin:new RegExp(`${e}(\\.${e})*\\s*=(?!=)`),returnBegin:!0,relevance:0,contains:[{scope:"attr",match:new RegExp(`${e}(\\.${e})*(?=\\s*=)`),relevance:.2}]},x={scope:"char.escape",match:/\\\$/},E={scope:"char.escape",match:/''\$/},a={scope:"subst",begin:/\$\{/,end:/\}/,keywords:s},M={scope:"char.escape",match:/'''/},c={scope:"char.escape",match:/\\(?!\$)./},S={scope:"string",variants:[{begin:"''",end:"''",contains:[E,a,M,c]},{begin:'"',end:'"',contains:[x,a,c]}]},A={scope:"params",match:new RegExp(`${e}\\s*:(?=\\s)`)},l=[b,t.HASH_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),m,S,g,u,A,v,d,f];a.contains=l;const O=[{scope:"meta.prompt",match:/^nix-repl>(?=\s)/,relevance:10},{scope:"meta",beforeMatch:/\s+/,begin:/:([a-z]+|\?)/}];return{name:"Nix",aliases:["nixos"],keywords:s,contains:l.concat(O)}}return n=h,n}export{w as r};
//# sourceMappingURL=nix-DDHFhCQH.chunk.mjs.map
