o
    ‡ÎÖaÄ+  ã                   @   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-2021 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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d/ejjfed0d-d*d.�ejjfgd1ejfd2ejfd3ejfd4ej fgd5efgd5ej!d6fe"d6ƒgd5ej#d6fgd7ej$fgeejƒeejƒd8ejd6fd9ej$fed:ƒgd;ejd6fd<ej$fed=ƒgd>ejd6fed:ƒd
e	fgd?ejd6fed=ƒd
e	fgd@œZ%dAdB„ Z&dCS )Dr   zD
    For `GDScript source code <https://www.godotengine.org>`_.
    ÚGDScriptÚ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   ÚInterpol)Úttype© r   ú:/usr/lib/python3/dist-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_nameÚextendsÚisÚfuncÚsetgetÚsignalÚtoolÚconstÚenumÚexportÚonreadyÚstaticÚvarÚbreakÚcontinueÚifÚelifÚelseÚforÚpassÚreturnÚmatchÚwhileÚremoteÚmasterÚpuppetÚ
remotesyncÚ
mastersyncÚ
puppetsyncz\b)Úsuffix)GÚColor8ÚColorNÚabsÚacosÚasinÚassertÚatanÚatan2Ú	bytes2varÚceilÚcharÚclampÚconvertÚcosÚcoshÚ	db2linearÚdecimalsÚdectimeÚdeg2radÚ	dict2instÚeaseÚexpÚfloorÚfmodÚfposmodÚfuncrefÚhashÚ	inst2dictÚinstance_from_idÚis_infÚis_nanÚlerpÚ	linear2dbÚloadÚlogÚmaxÚminÚnearest_po2ÚpowÚpreloadÚprintÚprint_stackÚprinterrÚprintrawÚprintsÚprinttÚrad2degÚ
rand_rangeÚ	rand_seedÚrandfÚrandiÚ	randomizeÚrangeÚroundÚseedÚsignÚsinÚsinhÚsqrtÚstepifyÚstrÚstr2varÚtanr‰   ÚtanhÚ
type_existÚtypeofÚ	var2bytesÚvar2strÚweakrefÚyieldz(?<!\.))ÚprefixrJ   z-((?<!\.)(self|false|true)|(PI|TAU|NAN|INF))\b)ÚboolÚintÚfloatr   ÚNodePathÚVector2ÚRect2ÚTransform2DÚVector3ÚRect3ÚPlaneÚQuatÚBasisÚ	TransformÚColorÚRIDÚObjectr•   Ú
DictionaryÚArrayÚPackedByteArrayÚPackedInt32ArrayÚPackedInt64ArrayÚPackedFloat32ArrayÚPackedFloat64ArrayÚPackedStringArrayÚPackedVector2ArrayÚPackedVector3ArrayÚ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#   r²   r°   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Úsearchro   )ÚtextÚscorer   r   r   Úanalyse_textI  s   ÿþ
zGDScriptLexer.analyse_textN)'Ú__name__Ú
__module__Ú__qualname__Ú__doc__r$   ÚaliasesÚ	filenamesÚ	mimetypesr   r   r   r   ÚAffixÚDocr	   ÚSingler   r   r
   ÚWordr   r   ÚDoubler   r   r   ÚBuiltinÚPseudoÚTyper   ÚFloatÚHexÚIntegerÚFunctionr   ÚClassÚEscapeÚtokensr¸   r   r   r   r   r      sò    þþþýýýýýýýý¿E&Ù)Öÿ0IµM²
P!Ý%Ú®|üýÿ
ý
ý
ý
ý � �ð  )r¼   r´   Úpygments.lexerr   r   r   r   r   r   Úpygments.tokenr   r	   r
   r   r   r   r   r   r   Ú__all__ÚcompileÚline_rer   r   r   r   r   Ú<module>   s     ,
