o
    ‡ÎÖa–  ã                   @   s^   d Z ddlZddlmZmZ ddlmZmZmZm	Z	m
Z
mZmZmZ dgZG dd„ deƒZdS )zÌ
    pygments.lexers.urbi
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for UrbiScript language.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)ÚExtendedRegexLexerÚwords)ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚUrbiscriptLexerc                   @   sD  e Zd ZdZdZdgZdgZdgZej	Z
dd„ Zdefd	efd
ejdfdefeddd�efeddd�ejfdefdefdejfdejfeddd�ejfdejjfdefdejfdefdefdejfdejfdejfdejdfd ej d!fgd"efd#ejd$fgd%efd&ej d$fgd'ejfd
ejd(fd)ejd$fd*ejfgd+œZ!d,d-„ Z"d.S )/r   z@
    For UrbiScript source code.

    .. versionadded:: 1.5
    Ú
UrbiScriptÚ
urbiscriptz*.uzapplication/x-urbiscriptc           	      c   sÜ   � |  d¡}|  d¡}|  d¡}t|ƒ}| ¡ t|fV  | jt|ƒ7  _|j| ¡ |  dkrId| d }| ¡ t|fV  | jt|ƒ7  _d S ||j| ¡ | ¡ | …  d }| ¡ tj|fV  | ¡ | d |_d S )Né   é   é   ú)z\B(z)()	ÚgroupÚintÚstartr	   ÚposÚlenÚtextÚendÚEscape)	ÚlexerÚmatchÚctxÚtext_before_blobÚ
blob_startÚblob_size_strÚ	blob_sizeÚresultÚ	blob_text© r$   ú6/usr/lib/python3/dist-packages/pygments/lexers/urbi.pyÚblob_callback&   s   €


"zUrbiscriptLexer.blob_callbackz\s+z//.*?\nz/\*Úcommentz"(every|for|loop|while)(?:;|&|\||,))ÚassertÚatÚbreakÚcaseÚcatchÚclosureÚcomplÚcontinueÚdefaultÚelseÚenumÚeveryÚexternalÚfinallyÚforÚfreezeifÚifÚnewÚonleaveÚreturnÚstopifÚswitchÚthisÚthrowÚtimeoutÚtryÚ	waituntilÚwheneverÚwhilez\b)Úsuffix)$ÚasmÚautoÚboolÚcharÚ
const_castÚdeleteÚdoubleÚdynamic_castÚexplicitÚexportÚexternÚfloatÚfriendÚgotoÚinliner   ÚlongÚmutableÚ	namespaceÚregisterÚreinterpret_castÚshortÚsignedÚsizeofÚstatic_castÚstructÚtemplateÚtypedefÚtypeidÚtypenameÚunionÚunsignedÚusingÚvirtualÚvolatileÚwchar_tz&(emit|foreach|internal|loopn|static)\bz(private|protected|public)\bz(var|do|const|function|class)\bz(true|false|nil|void)\b)EÚBarrierÚBinaryÚBooleanÚCallMessageÚChannelÚCodeÚ
ComparableÚ	ContainerÚControlÚDateÚ
DictionaryÚ	DirectoryÚDurationÚEnumerationÚEventÚ	ExceptionÚ
ExecutableÚFileÚFinalizableÚFloatÚ
FormatInfoÚ	FormatterÚGlobalÚGroupÚHashÚInputStreamÚ	IoServiceÚJobÚKernelÚLazyÚListÚLoadableÚLobbyÚLocationÚLoggerÚMathÚMutexÚnilÚObjectÚ	OrderableÚOutputStreamÚPairÚPathÚPatternÚPositionÚ	PrimitiveÚProcessÚProfileÚ
PseudoLazyÚPubSubÚRangeIterableÚRegexpÚ	SemaphoreÚServerÚ	SingletonÚSocketÚ
StackFrameÚStreamr	   ÚSystemÚTagÚTimeoutÚ	TraceableÚTrajectoryGeneratorÚTripletÚTupleÚUObjectÚUValueÚUVarz
(?:this)\bz(?:[-=+*%/<>~^:]+|\.&?|\|\||&&)z?(?:and_eq|and|bitand|bitor|in|not|not_eq|or_eq|or|xor_eq|xor)\bz[{}\[\]()]+z(?:;|\||,|&|\?|!)+z[$a-zA-Z_]\w*z0x[0-9a-fA-F]+zV(?:[0-9]+(?:(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?)?((?:rad|deg|grad)|(?:ms|s|min|h|d))?)\bú"ústring.doubleú'ústring.singlez%((?:\\\\|\\"|[^"])*?)(\\B\((\d+)\)\()z(\\\\|\\[^\\]|[^"\\])*?"z#popz%((?:\\\\|\\'|[^'])*?)(\\B\((\d+)\)\()z(\\\\|\\[^\\]|[^'\\])*?'z[^*/]z#pushz\*/z[*/])Úrootr®   r°   r'   c                 C   s(   d}d| v r
|d7 }d| v r|d7 }|S )z_This is fairly similar to C and others, but freezeif and
        waituntil are unique keywords.r   r7   gš™™™™™©?rB   r$   )r   r"   r$   r$   r%   Úanalyse_text†   s   zUrbiscriptLexer.analyse_textN)#Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚreÚDOTALLÚflagsr&   r   r   Ú	Multiliner   r   ÚReservedÚDeclarationÚConstantr   ÚBuiltinÚPseudor   ÚWordr   ÚOtherr
   ÚHexr|   r	   ÚDoubleÚSingleÚtokensr²   r$   r$   r$   r%   r      sv    
ûúúù	ôó
ÿÿ

É:
þ
þ

ü½K)r¶   r»   Úpygments.lexerr   r   Úpygments.tokenr   r   r   r   r   r	   r
   r   Ú__all__r   r$   r$   r$   r%   Ú<module>   s    
(