B
    b-                 @   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ddg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-2022 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dddg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   zB
    For ActionScript source code.

    .. versionadded:: 0.9
    ZActionScriptZactionscriptasz*.aszapplication/x-actionscriptztext/x-actionscriptztext/actionscriptrootz\s+z//.*?\nz	/\*.*?\*/z /(\\\\|\\[^\\]|[^/\\\n])*/[gim]*z[~^*!%&<>|+=:;,/?\\-]+z[{}\[\]();.]+)Zcaser   forZeachinwhileZdobreakreturncontinueifelsethrowtryZcatchvarwithnewZtypeofZ	argumentsZ
instanceofr   Zswitchz\b)suffix)classZpublicfinalZinternalZnativeoverrideZprivateZ	protectedZstaticimportZextendsZ
implementsZ	interfaceZ	intrinsicr   superZdynamicZfunctionconstget	namespacepackagesetz9(true|false|null|NaN|Infinity|-Infinity|undefined|Void)\b)ZAccessibilityZAccessibilityPropertiesZActionScriptVersionZActivityEventZAntiAliasTypeZApplicationDomainZAsBroadcasterZArrayZAsyncErrorEventZ	AVM1MovieZBevelFilterZBitmapZ
BitmapDataZBitmapDataChannelZBitmapFilterZBitmapFilterQualityZBitmapFilterTypeZ	BlendModeZ
BlurFilterZBooleanZ	ByteArrayZCameraZCapabilitiesZ	CapsStyleZClassZColorZColorMatrixFilterZColorTransformZContextMenuZContextMenuBuiltInItemsZContextMenuEventZContextMenuItemZConvultionFilterZCSMSettingsZ	DataEventZDateZDefinitionErrorZDeleteObjectSampleZ
DictionaryZDisplacmentMapFilterZDisplayObjectZDisplacmentMapFilterModeZDisplayObjectContainerZDropShadowFilterZEndianEOFErrorErrorZ
ErrorEventZ	EvalErrorZ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,IDynamicPropertyOutputIDynamicPropertyWriterZIEventDispatcherZIExternalizableZIllegalOperationErrorZIMEZIMEConversionModeZIMEEventintZInteractiveObjectZInterpolationMethodZInvalidSWFErrorZInvokeEventIOErrorZIOErrorEventZ
JointStyleZ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SyntaxErrorZSystemZTextColorTypeZ	TextFieldZTextFieldAutoSizeZTextFieldTypeZ
TextFormatZTextFormatAlignZTextLineMetricsZTextRendererZTextSnapshotZTimerZ
TimerEventZ	Transform	TypeErrorZuintZURIErrorZ	URLLoaderZURLLoaderDataFormatZ
URLRequestZURLRequestHeaderZURLRequestMethodZ	URLStreamZURLVariabelesZVerifyErrorZVideoZXMLZXMLDocumentZXMLListZXMLNodeZXMLNodeTypeZ	XMLSocketZXMLUI)Z	decodeURIZdecodeURIComponentZ	encodeURIescapeevalZisFiniteZisNaNZ	isXMLNameZclearIntervalZ	fscommandZgetTimerZgetURLZ
getVersionZ
parseFloatZparseIntZsetIntervalZtraceZupdateAfterEventZunescapez[$a-zA-Z_]\w*z%[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?z0x[0-9a-f]+z[0-9]+z"(\\\\|\\[^\\]|[^"\\])*"z'(\\\\|\\[^\\]|[^'\\])*'c             C   s   dS )zThis 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;   ;lib/python3.7/site-packages/pygments/lexers/actionscript.pyanalyse_textp   s    zActionScriptLexer.analyse_textN)"__name__
__module____qualname____doc__namealiases	filenames	mimetypesreDOTALLflagsr   r	   Single	Multiliner   Regexr
   r   r   r   DeclarationConstantr   ZBuiltinr0   ZOtherr   FloatHexIntegerDoubletokensr>   r;   r;   r;   r=   r      sN   &c               @   s  e Zd ZdZdZdZddgZdgZddd	g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)d0d1 Z*d2S )3r   zE
    For ActionScript 3 source code.

    .. versionadded:: 0.11
    zActionScript 3zNhttps://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.htmlZactionscript3Zas3z*.aszapplication/x-actionscript3ztext/x-actionscript3ztext/actionscript3z[$a-zA-Z_]\w*z(?:\.<\w+>)?z\s+z(function\s+)(z
)(\s*)(\()
funcparamsz(var|const)(\s+)(z)(\s*)(:)(\s*)()z(import|package)(\s+)((?:z|\.)+)(\s*)z(new)(\s+)(z//.*?\nz	/\*.*?\*/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)\bz%[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?z0x[0-9a-f]+z[0-9]+z"(\\\\|\\[^\\]|[^"\\])*"z'(\\\\|\\[^\\]|[^'\\])*'z[~^*!%&<>|+=:;,/?\\{}\[\]().-]+z(\s*)(\.\.\.)?(z	|\*)(\s*)defvalz\)typez(\s*)(:)(\s*)(z|\*)z#pop:2z(=)(\s*)([^(),]+)(\s*)(,?)z#pop,)r   rT   rW   rV   c             C   s   t d| rdS dS )Nz\w+\s*:\s*\wg333333?r   )rG   match)r<   r;   r;   r=   r>      s    zActionScript3Lexer.analyse_textN)+r?   r@   rA   rB   rC   ZurlrD   rE   rF   Z
identifierZtypeidentifierrG   rH   	MULTILINErI   r   r   r   rM   r   r0   r   r
   r   ZTyper5   r	   rJ   rK   r   rL   	AttributerN   r   rO   rP   rQ   rR   r   r   r   rS   r>   r;   r;   r;   r=   r   v   sl   




c            	   @   s   e Zd ZdZejejB ZdZdgZ	dgZ
ddg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   z~
    For MXML markup.
    Nested AS3 in <script> tags is highlighted by the appropriate lexer.

    .. versionadded:: 1.1
    ZMXMLZmxmlz*.mxmlztext/xmlzapplication/xmlz[^<&]+z&\S*?;z(\<\!\[CDATA\[)(.*?)(\]\]\>)z<!--commentz	<\?.*?\?>z<![^>]*>z<\s*[\w:.-]+tagz<\s*/\s*[\w:.-]+\s*>z[^-]+z-->z#pop-z\s+z[\w.:-]+\s*=attrz/?\s*>z".*?"z'.*?'z[^\s>]+)r   r\   r]   r_   N)r?   r@   rA   rB   rG   rZ   rH   rI   rC   rD   rE   Z	mimetimesr   r   ZEntityr   r   r   r   r	   ZPreprocZTagr   r[   rS   r;   r;   r;   r=   r      s2   


)rB   rG   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V