a
    ñ»jÚ-  ã                   @   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 g d¢ZG dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZdS )zá
    pygments.lexers.actionscript
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for ActionScript and MXML.

    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)Ú
RegexLexerÚbygroupsÚusingÚthisÚwordsÚdefault)	ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚ
Whitespace)ÚActionScriptLexerÚActionScript3LexerÚ	MxmlLexerc                   @   sè   e Zd ZdZdZddgZdgZg d¢ZdZdZ	e
jZd	d
efdejfdejfdejfdefdefeddd�efeddd�ejfdejfeddd�ejfedd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giZ"dd„ Z#dS ) r   z'
    For ActionScript source code.
    ÚActionScriptÚactionscriptÚasú*.as)zapplication/x-actionscriptztext/x-actionscriptztext/actionscriptz*https://en.wikipedia.org/wiki/ActionScriptz0.9Úrootú\s+ú//.*?\nú	/\*.*?\*/z /(\\\\|\\[^\\]|[^/\\\n])*/[gim]*z[~^*!%&<>|+=:;,/?\\-]+z[{}\[\]();.]+)Úcaser   ÚforZeachÚinÚwhileÚdoÚbreakÚreturnÚcontinueÚifÚelseÚthrowÚtryZcatchÚvarÚwithÚnewZtypeofÚ	argumentsZ
instanceofr   Úswitchz\b)Úsuffix)ÚclassÚpublicÚfinalZinternalÚnativeÚoverrideÚprivateZ	protectedZstaticÚimportZextendsZ
implementsZ	interfaceZ	intrinsicr"   ÚsuperZdynamicÚfunctionÚconstÚgetÚ	namespaceÚpackageÚsetz9(true|false|null|NaN|Infinity|-Infinity|undefined|Void)\b)ÇZAccessibilityZAccessibilityPropertiesZActionScriptVersionZActivityEventZAntiAliasTypeZApplicationDomainZAsBroadcasterÚArrayZAsyncErrorEventZ	AVM1MovieZBevelFilterZBitmapZ
BitmapDataZBitmapDataChannelZBitmapFilterZBitmapFilterQualityZBitmapFilterTypeZ	BlendModeZ
BlurFilterÚBooleanZ	ByteArrayZCameraZCapabilitiesZ	CapsStyleÚClassÚColorZColorMatrixFilterZColorTransformZContextMenuZContextMenuBuiltInItemsZContextMenuEventZContextMenuItemZConvultionFilterZCSMSettingsZ	DataEventÚDateZDefinitionErrorZDeleteObjectSampleZ
DictionaryZDisplacmentMapFilterZDisplayObjectZDisplacmentMapFilterModeZDisplayObjectContainerZDropShadowFilterZEndianÚEOFErrorÚErrorZ
ErrorEventZ	EvalErrorÚEventZEventDispatcherZ
EventPhaseZExternalInterfaceZ
FileFilterZFileReferenceZFileReferenceListZFocusDirectionZ
FocusEventZFontZ	FontStyleZFontTypeZ
FrameLabelZFullScreenEventÚFunctionZ
GlowFilterZGradientBevelFilterZGradientGlowFilterZGradientTypeZGraphicsZGridFitTypeZHTTPStatusEventZIBitmapDrawableZID3InfoZ
IDataInputZIDataOutputZIDynamicPropertyOutputZIDynamicPropertyWriterZIEventDispatcherZIExternalizableZIllegalOperationErrorZIMEZIMEConversionModeZIMEEventÚintZInteractiveObjectZInterpolationMethodZInvalidSWFErrorZInvokeEventÚIOErrorZIOErrorEventZ
JointStyleÚKeyZKeyboardZKeyboardEventZKeyLocationZLineScaleModeÚLoaderZLoaderContextZ
LoaderInfoZLoadVarsZLocalConnectionZLocaleZMathZMatrixÚMemoryErrorZ
MicrophoneZ
MorphShapeZMouseZ
MouseEventZ	MovieClipZMovieClipLoaderÚ	NamespaceZNetConnectionZNetStatusEventZ	NetStreamZNewObjectSampler   ZObjectZObjectEncodingZPixelSnappingZPointZPrintJobZPrintJobOptionsZPrintJobOrientationZProgressEventZProxyZQNameZ
RangeErrorZ	RectangleÚReferenceErrorZRegExpZ	ResponderZSampleZSceneZScriptTimeoutErrorZSecurityZSecurityDomainZSecurityErrorZSecurityErrorEventZSecurityPanelZ	SelectionZShapeZSharedObjectZSharedObjectFlushStatusZSimpleButtonZSocketZSoundZSoundChannelZSoundLoaderContextZ
SoundMixerZSoundTransformZSpreadMethodZSpriteZ
StackFrameZStackOverflowErrorZStageZ
StageAlignZStageDisplayStateZStageQualityZStageScaleModeZ
StaticTextZStatusEventr   Z
StyleSheetZ
SWFVersionZ	SyncEventÚSyntaxErrorÚSystemZTextColorTypeZ	TextFieldZTextFieldAutoSizeZTextFieldTypeZ
TextFormatZTextFormatAlignZTextLineMetricsZTextRendererZTextSnapshotÚTimerZ
TimerEventZ	TransformÚ	TypeErrorZuintZURIErrorZ	URLLoaderZURLLoaderDataFormatZ
URLRequestZURLRequestHeaderZURLRequestMethodZ	URLStreamZURLVariabelesZVerifyErrorZVideoÚXMLZXMLDocumentZXMLListZXMLNodeZXMLNodeTypeZ	XMLSocketZXMLUI)Z	decodeURIZdecodeURIComponentZ	encodeURIÚescapeÚevalZisFiniteZisNaNZ	isXMLNameZclearIntervalZ	fscommandZgetTimerZgetURLZ
getVersionZ
parseFloatZparseIntZsetIntervalÚtraceZupdateAfterEventÚunescapeú[$a-zA-Z_]\w*ú%[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?ú0x[0-9a-f]+ú[0-9]+ú"(\\\\|\\[^\\]|[^"\\])*"ú'(\\\\|\\[^\\]|[^'\\])*'c                 C   s   dS )zÈThis is only used to disambiguate between ActionScript and
        ActionScript3. We return 0 here; the ActionScript3 lexer will match
        AS3 variable definitions and that will hopefully suffice.r   © ©Útextr[   r[   úBE:\soccer\ml_env\Lib\site-packages\pygments/lexers/actionscript.pyÚanalyse_textp   s    zActionScriptLexer.analyse_textN)$Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚurlÚversion_addedÚreÚDOTALLÚflagsr   r	   ÚSingleÚ	Multiliner   ÚRegexr
   r   r   r   ÚDeclarationÚConstantr   ÚBuiltinrD   ÚOtherr   ÚFloatÚHexÚIntegerÚDoubleÚtokensr_   r[   r[   r[   r^   r      s^   üûüûÿ'Ù(Ø)üû·ÿNr   c                   @   sî  e Zd ZdZdZdZddgZdgZg d¢ZdZ	d	Z
e
d
 ZejejB Zdefde
 d eejejeeƒdfde
 d e d eejeeeeeejƒfde
 d eeeejeƒfde d eeeejeeƒfdejfdejfdejfde
 d eeej ƒfdefdejfdej!fdejfe
efde"j#fde"j$fde"j%fd ej&fd!ejfd"efgdefd#e
 d e d$ eeeeeeeejeƒd%fd&ed'fgd(e d) eeeeejƒd*fded*fe'd*ƒgd+eeee(e)ƒeeƒd,fd-ed,fe'd,ƒgd.œZ*d/d0„ Z+d1S )2r   z)
    For ActionScript 3 source code.
    zActionScript 3zNhttps://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.htmlÚactionscript3Úas3r   )zapplication/x-actionscript3ztext/x-actionscript3ztext/actionscript3z0.11rU   z(?:\.<\w+>)?r   z(function\s+)(z
)(\s*)(\()Ú
funcparamsz(var|const)(\s+)(z)(\s*)(:)(\s*)(ú)z(import|package)(\s+)((?:z|\.)+)(\s*)z(new)(\s+)(r   r   z /(\\\\|\\[^\\]|[^\\\n])*/[gisx]*z(\.)(z™(case|default|for|each|in|while|do|break|return|continue|if|else|throw|try|catch|with|new|typeof|arguments|instanceof|this|switch|import|include|as|is)\bz´(class|public|final|internal|native|override|private|protected|static|import|extends|implements|interface|intrinsic|return|super|dynamic|function|const|get|namespace|package|set)\bz9(true|false|null|NaN|Infinity|-Infinity|undefined|void)\bzË(decodeURI|decodeURIComponent|encodeURI|escape|eval|isFinite|isNaN|isXMLName|clearInterval|fscommand|getTimer|getURL|getVersion|isFinite|parseFloat|parseInt|setInterval|trace|updateAfterEvent|unescape)\brV   rW   rX   rY   rZ   z[~^*!%&<>|+=:;,/?\\{}\[\]().-]+z(\s*)(\.\.\.)?(z	|\*)(\s*)Údefvalz\)Útypez(\s*)(:)(\s*)(z|\*)z#pop:2z(=)(\s*)([^(),]+)(\s*)(,?)ú#popú,)r   r{   r~   r}   c                 C   s   t  d| ¡rdS dS )Nz\bimport\s+flash\.gš™™™™™É?r   )rj   Úsearchr\   r[   r[   r^   r_   Å   s    zActionScript3Lexer.analyse_textN),r`   ra   rb   rc   rd   rh   re   rf   rg   ri   Ú
identifierZtypeidentifierrj   rk   Ú	MULTILINErl   r   r   r   rp   r   rD   r   r
   r   ÚTyperJ   r	   rm   rn   r   ro   Ú	Attributerq   r   rt   ru   rv   rw   r   r   r   rx   r_   r[   r[   r[   r^   r   v   s¢   
þ
ÿÿÿþ
ÿ
ÿýýÿýÛ(
ÿÿÿýú	
ÿüÿüÊ>r   c                	   @   sØ   e Zd ZdZejejB ZdZdgZ	dgZ
dZdZdefdejfd	eeeeƒeƒfd
edfdejfdejfdejdfdejfgdefdedfdefgdefdejdfdejdfgdefdedfdedfdedfgdœZdS )r   zc
    For MXML markup.
    Nested AS3 in <script> tags is highlighted by the appropriate lexer.
    ÚMXMLÚmxmlz*.mxmlz"https://en.wikipedia.org/wiki/MXMLz1.1z[^<&]+z&\S*?;z(\<\!\[CDATA\[)(.*?)(\]\]\>)z<!--Úcommentz	<\?.*?\?>z<![^>]*>z<\s*[\w:.-]+Útagz<\s*/\s*[\w:.-]+\s*>z[^-]+z-->r   ú-r   z[\w.:-]+\s*=Úattrz/?\s*>z".*?"z'.*?'z[^\s>]+)r   rˆ   r‰   r‹   N)r`   ra   rb   rc   rj   rƒ   rk   rl   rd   re   rf   rh   ri   r   r   ÚEntityr   r   r   r   r	   ÚPreprocÚTagr   r…   rx   r[   r[   r[   r^   r   Ë   s@   ÿ
÷ý

ýüêr   )rc   rj   Zpygments.lexerr   r   r   r   r   r   Zpygments.tokenr   r	   r
   r   r   r   r   r   r   Ú__all__r   r   r   r[   r[   r[   r^   Ú<module>   s   
 ,bU