o
    \h,                     @   s~   d Z ddlmZmZmZmZmZmZmZ ddl	m
Z
mZmZmZmZmZmZmZmZ ddlmZmZ dgZG dd deZdS )z
    pygments.lexers.arturo
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexer for the Arturo language.

    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    )
RegexLexerbygroupsdo_insertionsincludethisusingwords)	CommentErrorKeywordNameNumberOperatorPunctuationStringText)ClassNotFoundget_bool_optArturoLexerc                   @   s  e Zd ZdZdZddgZdgZdZdZdd	 Z	d
d Z
dejfdejfedddejfeddddejjfdejfdejfdejfdejfdejfdejfdejfdejfdejfdeee e!efdej"dfd ejd!fd"ej"d#fd$ejd%fd&ej"d'fd(e
fd)ejd*fd+ejd,fe#d-d.efed/ej$fed0e%fd1efd2e&j'fd3e(fgd4ej)d5fd6e e!fgd7ej)d5fd6e e!fged8ej*fge#d9d4ej)d:fd;ej)d<fdej"d5fd=efge#d9d4ej)d:fd;ej)d<fd>ejd5fd?efge#d9d4ej)d:fd;ej)d<fd@ej"d5fdAefgdBej*fd4ej)d:fd;ej)d<fdCejd5fdDej+fge#d9d4ej)d:fd;ej)d<fdEej"d5fdFefge#d9d4ej)d:fd;ej)d<fdGejd5fdHefge#d9d4ej)d:fd;ej)d<fdIejd5fdJefgedKddLdejfedMdddejfgdNZ,dOS )Pr   z
    For Arturo source code.

    See `Arturo's Github <https://github.com/arturo-lang/arturo>`_
    and `Arturo's Website <https://arturo-lang.io/>`_.
    Arturoarturoartz*.artzhttps://arturo-lang.io/z2.14c                 K   s$   t |dd| _tj| fi | d S )Nhandle_annotatedsT)r   r   r   __init__)selfoptions r   Y/home/air/segue/gemini/backup/venv/lib/python3.10/site-packages/pygments/lexers/arturo.pyr   #   s   zArturoLexer.__init__c                 c   s   ddl m} |dtj|dfV  |dtj|dfV  |dtj|dfV  |dtj|dfV  d}| j	rUz||d
 }W n	 tyT   Y nw |d}|du rh|dt|fV  ntg ||E dH  |d	tj|d	fV  dS )
zAdds syntax from another languages inside annotated strings

        match args:
            1:open_string,
            2:exclamation_mark,
            3:lang_name,
            4:space_or_newline,
            5:code,
            6:close_string
        r   )get_lexer_by_name            N      )pygments.lexersr   startr   DoublegroupInterpolr   
Whitespacer   stripr   r   get_tokens_unprocessed)r   matchr   lexercoder   r   r   handle_annotated_strings(   s$   
z$ArturoLexer.handle_annotated_stringsz;.*?$z^((\s#!)|(#!)).*?$)falsetruemaybez\b)suffix)r   initz\b\??:?)prefixr4   z`.`z\\\w+\b\??:?z#\w+z\b[0-9]+\.[0-9]+z\b[0-9]+z	\w+\b\??:z\'(?:\w+\b\??:?)z\:\w+z
\.\w+\??:?z(\()(.*?)(\)\?)"inside-simple-string   »inside-smart-stringu   «««inside-safe-stringz\{\/inside-regex-stringz\{\:inside-curly-verb-stringz#(\{)(\!)(\w+)(\s|\n)([\w\W]*?)(^\})z\{inside-curly-stringz\-{3,}inside-eof-stringbuiltin-functionsz[()[\],])z->==>|z::@#$&!z!!z./)$z<:z:>z:<z>:z<\z<><>   øu   ∞+-*~=^%/z//rA   z<=>z<==>z=>>z<<=>>z<<==>>z-->z<->z<-->z=|z|=z-:z:-_.z..\z\b\w+z\s+z.+$z\|z#popz[^|]+z\|\|\>)z\\\nz\tz\"string-escapeinside-interpolz\<\|\|inside-templatez[^|"]+rV   z[^|\n]+u   »»»u   [^|»]+z\\[sSwWdDbBZApPxucItnvfr0]+z\/\}z[^|\/]+z\:\}z[^|<:]+z\}z[^|<}]+z\Zz[^|<]+)Fallandanyasciiattr	attributeattributeLabelbinary	blockcharcontainsdatabasedate
dictionaryemptyequaleveneveryexistsr1   floatinfunctiongreatergreaterOrEqualifininlineintegeriskeylabelleaplesslessOrEqualliterallogicallowernandnegativenornotnotEqualnullnumericoddorpath	pathLabelpositiver6   primesetsomesorted
standalonestringsubsetr4   supersetymbolr2   trytypeunlessupperwhen
whitespacewordxnorxorzeroz\b\?)absacosacoshacsecacsechactanactanhaddafteralphabetr[   angleappendargargsarityarrayasasecasechasinasinhatanatan2atanhr^   attrsaveragebefore	benchmarkblendbreak	builtins1	builtins2call
capitalizecaseceilchopchunkclearcloseclustercolorcombineconjcontinuecopycoscoshcouplecseccsechctanctanhcursordarkendecdecodedecoupledefinedelete
desaturate	deviationrf   
differencedigestdigitsdivdodownloaddropdupeelserg   encodeensureenvepsilonescapeexecuteexitexpextendextractfactorsr1   fdivfilterfirstflattenfloorfoldfromrm   gammagcdgetgotohashhelphypotrp   rq   incindentindexinfinityinfoinputinsertinspectintersectioninvertjoinkeyskurtosislastletlevenshteinlightenlistlnlogloopr|   mailmapr-   maxr3   medianminmodmodulemulr}   negnewr   	normalizer   nowr   openr   outdentpadpanicr   pausepermissions	permutatepipoppowpowersetpowmodr6   printprintsprocessproductqueryrandomrangereadrelativeremoverenamerenderrepeatreplacerequestreturnreverseroundsamplesaturatescriptsecsechselectserver   shlshrshufflesinsinhsizeskewnessslicesortsplitsqrtsqueezestackr+   subr4   sumswitchsymbolssymlinksystaketantanhterminaltor2   truncater   r   unionuniquer   untilunzipr   valuesvarvariancevolumewebviewwhilewithwordwrapwriter   r   zip)rootrX   rY   rW   r8   r:   r;   r<   r=   r>   r?   r@   N)-__name__
__module____qualname____doc__namealiases	filenamesurlversion_addedr   r0   r	   SingleHashbangr   r   ConstantBuiltinPseudor   CharPropertyr   FloatIntegerLabelr   DeclarationType	Attributer   r   r   r   r'   r   	Decoratorr   r   r*   r
   r)   EscapeRegextokensr   r   r   r   r      s    $






	
:























	%%
N)rn  pygments.lexerr   r   r   r   r   r   r   pygments.tokenr	   r
   r   r   r   r   r   r   r   pygments.utilr   r   __all__r   r   r   r   r   <module>   s    $
,