a
    ¨ˆcË+  ã                   @   s|   d Z ddlZddl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gZe d¡ZG dd„ deƒZdS )a#  
    pygments.lexers.gdscript
    ~~~~~~~~~~~~~~~~~~~~~~~~

    Lexer for GDScript.

    Modified by Daniel J. Ramirez <djrmuv@gmail.com> based on the original
    python.py.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)Ú
RegexLexerÚincludeÚbygroupsÚdefaultÚwordsÚcombined)	ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚ
WhitespaceÚGDScriptLexerz.*?
c                   @   sˆ  e Zd ZdZdZdZddgZdgZddgZd	d
„ Z	de
fdee
ejejƒfdee
ejejƒfde
fdejfdefdeee
ƒfdefdejfdefedƒdeee
ƒdfdeee
ƒdfedƒdeejejƒdfdeejejƒdfdeejejƒd fd!eejejƒd"fd#eejejƒed$dƒfd%eejejƒed$dƒfd&eejejƒed$d ƒfd'eejejƒed$d"ƒfed(ƒed)ƒged*d+d,�efged-d.d+d/�ejfd0ejjfed1d.d+d/�ejjfgd2ejfd3ejfd4ej fd5ej!fgd6efgd6ej"d7fe#d7ƒgd6ej$d7fgd8ej%fge	ejƒe	ejƒd9ejd7fd:ej%fed;ƒgd<ejd7fd=ej%fed>ƒgd?ejd7fed;ƒde
fgd@ejd7fed>ƒde
fgdAœZ&dBdC„ Z'dDS )Er   z#
    For GDScript source code.
    ZGDScriptzhttps://www.godotengine.orgZgdscriptÚgdz*.gdztext/x-gdscriptzapplication/x-gdscriptc                 C   s   dt jfd| fd| fd| fgS )NzG%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]z[^\\\'"%\n]+z[\'"\\]ú%)r   ZInterpol)Úttype© r   ú[/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pygments/lexers/gdscript.pyÚinnerstring_rules%   s    ýõzGDScriptLexer.innerstring_rulesz\nz&^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")z&^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')z[^\S\n]+z#.*$z[]{}:(),;[]z(\\)(\n)z\\z(in|and|or|not)\bz=!=|==|<<|>>|&&|\+=|-=|\*=|/=|%=|&=|\|=|\|\||[-~+/*%=<>&^.!|$]Úkeywordsz(func)(\s+)Úfuncnamez(class)(\s+)Ú	classnameÚbuiltinsz!([rR]|[uUbB][rR]|[rR][uUbB])(""")Útdqsz!([rR]|[uUbB][rR]|[rR][uUbB])(''')Útsqsz([rR]|[uUbB][rR]|[rR][uUbB])(")Údqsz([rR]|[uUbB][rR]|[rR][uUbB])(')Úsqsz([uUbB]?)(""")Ústringescapez([uUbB]?)(''')z([uUbB]?)(")z([uUbB]?)(')ÚnameÚnumbers)$ÚandÚinÚnotÚorÚasÚ
breakpointÚclassÚ
class_nameZextendsÚisÚfuncZsetgetÚsignalZtoolÚconstÚenumÚexportZonreadyZstaticÚvarÚbreakÚcontinueÚifÚelifÚelseÚforÚpassÚreturnÚmatchÚwhileÚremoteZmasterZpuppetZ
remotesyncZ
mastersyncZ
puppetsyncz\b)Úsuffix)GZColor8ZColorNÚabsÚacosÚasinÚassertÚatanÚatan2Z	bytes2varÚceilÚcharÚclampÚconvertÚcosÚcoshZ	db2linearZdecimalsZdectimeZdeg2radZ	dict2instZeaseÚexpÚfloorÚfmodZfposmodZfuncrefÚhashZ	inst2dictZinstance_from_idZis_infÚis_nanZlerpZ	linear2dbÚloadÚlogÚmaxÚminZnearest_po2ÚpowZpreloadÚprintÚprint_stackZprinterrZprintrawZprintsZprinttZrad2degZ
rand_rangeZ	rand_seedZrandfZrandiZ	randomizeÚrangeÚroundÚseedÚsignÚsinÚsinhÚsqrtZstepifyÚstrZstr2varÚtanr^   ÚtanhZ
type_existZtypeofZ	var2bytesZvar2strÚweakrefÚyieldz(?<!\.))Úprefixr=   z-((?<!\.)(self|false|true)|(PI|TAU|NAN|INF))\b)ÚboolÚintÚfloatr   ÚNodePathZVector2ZRect2ZTransform2DZVector3ZRect3ZPlaneZQuatZBasisZ	TransformZColorZRIDZObjectrf   Z
DictionaryÚArrayZPackedByteArrayZPackedInt32ArrayZPackedInt64ArrayZPackedFloat32ArrayZPackedFloat64ArrayZPackedStringArrayZPackedVector2ArrayZPackedVector3ArrayZPackedColorArrayÚnullÚvoidz'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?z\d+[eE][+-]?[0-9]+j?z0[xX][a-fA-F0-9]+z\d+j?z[a-zA-Z_]\w*z#popzY\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})ú"z\\\\|\\"|\\\nústrings-doubleú'z\\\\|\\'|\\\nústrings-singlez"""z''')Úrootr   r   r"   r!   r   r   r    rm   rk   r   r   r   r   c                 C   sJ   d}t  d| ¡r|d7 }t  d| ¡r,|d7 }t  d| ¡r@|d7 }t|dƒS )	Ng        z4func (_ready|_init|_input|_process|_unhandled_input)gš™™™™™é?z=(extends |class_name |onready |preload|load|setget|func [^_])gš™™™™™Ù?z#(var|const|enum|export|signal|tool)gš™™™™™É?g      ð?)ÚreÚsearchrR   )ÚtextZscorer   r   r   Úanalyse_textJ  s    ÿþzGDScriptLexer.analyse_textN)(Ú__name__Ú
__module__Ú__qualname__Ú__doc__r!   ÚurlÚaliasesÚ	filenamesÚ	mimetypesr   r   r   r   ZAffixZDocr	   ÚSingler   r   r
   ÚWordr   r   ÚDoubler   r   r   ZBuiltinZPseudoÚTyper   ZFloatZHexZIntegerZFunctionr   ZClassZEscapeÚtokensrr   r   r   r   r   r      sò   þþþýýýýýýýý¿E&Ù)Öÿ0IµM²P
!Ý%Ú®|üýÿ
ý
ý
ý
ý€ € ò  )rv   ro   Zpygments.lexerr   r   r   r   r   r   Zpygments.tokenr   r	   r
   r   r   r   r   r   r   Ú__all__ÚcompileZline_rer   r   r   r   r   Ú<module>   s    ,
