
    w                     x    S r SSKrSSKJrJrJrJrJrJr  SSK	J
r
JrJrJrJrJrJrJrJr  S/r " S S\5      rg)a  
pygments.lexers.gdscript
~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for GDScript.

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

:copyright: Copyright 2006-2023 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GDScriptLexerc                   f   \ rS rSrSrSrSrSS/rS/rSS	/r	S
 r
S\4S\" \\R                  \R                  5      4S\" \\R                  \R                  5      4S\4S\R"                  4S\4S\" \\5      4S\4S\R*                  4S\4\" S5      S\" \\5      S4S\" \\5      S4\" S5      S\" \R                  \R0                  5      S4S\" \R                  \R"                  5      S4S\" \R                  \R0                  5      S 4S!\" \R                  \R"                  5      S"4S#\" \R                  \R0                  5      \" S$S5      4S%\" \R                  \R"                  5      \" S$S5      4S&\" \R                  \R0                  5      \" S$S 5      4S'\" \R                  \R"                  5      \" S$S"5      4\" S(5      \" S)5      /\" S*S+S,9\4/\" S-S.S+S/9\R8                  4S0\R8                  R:                  4\" S1S.S+S/9\R8                  R<                  4/S2\R@                  4S3\R@                  4S4\RB                  4S5\RD                  4/S6\4/S6\RF                  S74\$" S75      /S6\RJ                  S74/S8\RL                  4/\
" \R"                  5      \
" \R0                  5      S9\R0                  S74S:\RL                  4\" S;5      /S<\R"                  S74S=\RL                  4\" S>5      /S?\R0                  S74\" S;5      S\4/S@\R"                  S74\" S>5      S\4/SA.r'SB r(SCr)gD)Er      z
For GDScript source code.
GDScriptzhttps://www.godotengine.orggdscriptgdz*.gdztext/x-gdscriptzapplication/x-gdscriptc                 :    S[         R                  4SU 4SU 4SU 4/$ )NzG%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]z[^\\\'"%\n]+z[\'"\\]%)r   Interpol)ttypes    +lib/third_party/pygments/lexers/gdscript.pyinnerstring_rulesGDScriptLexer.innerstring_rules#   s6    &__ e$5M
 	
    z\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(?<!\.))prefixrO   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                     Sn[         R                  " SU 5      (       a  US-  n[         R                  " SU 5      (       a  US-  n[         R                  " SU 5      (       a  US-  n[        US5      $ )	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searchrt   )textscores     r   analyse_textGDScriptLexer.analyse_text   sq    99CT
 
 SLE99L
 
 SLE99;TBBSLE5#r    N)*__name__
__module____qualname____firstlineno____doc__r)   url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   __static_attributes__r   r   r   r   r      s    D
'C4 GI"$<=I
  J6j&,,

;=6j&,,

;=*%gnn%[)(445DM!8==1MJXgz:JGhw
;[IJ0fllFMM2 1fllFMM2 /fllFMM2 /fllFMM2 fllFMM2nf-/ fllFMM2nf-/ fllFMM2ne,. fllFMM2ne,. FOIW,
\  H  ! #*+
   &0? \\ B\\  " 8 %U4 \\ #
8 8F$fll3!6::.v~~&	
 "4()%t}}f=wvO&

F;<?
 ,FMM:+FMM:6==&)v}}-$%
 6==&)v}}-$%
 V]]F+$%J
 V]]F+$%J
gxFtr   )r   r   pygments.lexerr   r   r   r   r   r   pygments.tokenr	   r
   r   r   r   r   r   r   r   __all__r   r   r   r   <module>r      s@    
 $ $ $ 
dJ dr   