o a@sbdZddlZddlmZmZddlmZmZmZm Z m Z m Z m Z m Z mZdgZGdddeZdS)z pygments.lexers.nix ~~~~~~~~~~~~~~~~~~~ Lexers for the NixOS Nix language. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) RegexLexerinclude) TextCommentOperatorKeywordNameStringNumber PunctuationLiteralNixLexerc@seZdZdZdZddgZdgZdgZej ej BZ gdZ gdZ gd Zgd Zd ejfd ejd fdefdddde Defdddde DejfdejfddddeDefdejfddddeDefdejfdejdfdejdfde fde fde fd ej!fd!efgd"ejfd ejd#fd$ejd%fd&ejfgd'ej"fd(ej"fd)ej"fd*ej"fd+ej"fdejd%fd,ej#d-fd.ejfgd/ej"fd0ej"fd1ej"fdejd%fd,ej#d-fd2ejfgd3ej#d%fd,ej#d#fe$d4gd5Z%d6d7Z&d8S)9r zU For the `Nix language `_. .. versionadded:: 2.0 Nixnixosnixz*.nixz text/x-nix) recwithletininheritassertifelsethenz...) importabort baseNameOfdirOfisNullbuiltinsmap removeAttrsthrowtoString derivation) z+++?.!z//z==z!=z&&z||z->=) ()[];{}:,@z#.*$z/\*commentz\s+z(%s)|cc|] }t|dVqdSz\bNreescape.0entryr>5/usr/lib/python3/dist-packages/pygments/lexers/nix.py 7zNixLexer.ccr6r7r8r;r>r>r?r@:rAz\b(true|false|null)\bcc|]}t|VqdSNr8r;r>r>r?r@@z \b(or|and)\bccrBrCr8r;r>r>r?r@GrDz[0-9]+" doublequotez'' singlequotez[\w.+-]*(\/[\w.+-]+)+z\<[\w.+-]+(\/[\w.+-]+)*\>z4[a-zA-Z][a-zA-Z0-9\+\-\.]*\:[\w%/?:@&=+$,\\.!~*\'-]+z [\w-]+\s*=z[a-zA-Z_][\w\'-]*z[^/*]+z#pushz\*/z#popz[*/]z'''z''\$\{z''\nz''\rz''\tz\$\{ antiquotez[^']z\\z\\"z\\$\{z[^"]z\}root)rIr4rGrFrHcCsXd}td|r |d7}td|r|d7}td|r |d7}td|r*|d7}|S)Ngzimport.+?<[^>]+>g?zmkDerivation\s+(\(|\{|rec)z =\s+mkIf\s+z\{[a-zA-Z,\s]+\}:g?)r9search)textrvr>r>r? analyse_text|s    zNixLexer.analyse_textN)'__name__ __module__ __qualname____doc__namealiases filenames mimetypesr9 MULTILINEUNICODEflagskeywordsr operators punctuationsrSingle MultilinerjoinrrBuiltinConstantrWordr r Integerr Doubler SymbolEscapeInterpolrtokensrMr>r>r>r?r sx    1         Q)rQr9pygments.lexerrrpygments.tokenrrrrrr r r r __all__r r>r>r>r?s  ,