3

V'ícœ-ã@s–dZddlZddlmZmZmZmZmZmZddl	m
Z
mZmZm
Z
mZmZmZmZmZdddgZGdd„deƒZGd	d„deƒZGd
d„deƒZdS)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üeZdZdZdZddgZdgZdddgZej	Z
d	d
efdej
fdejfd
ejfdefdefed"d'd(efed#d'd(ejfd?ejfed$d'd(ejfed%d'd(ejfdejfdejfdejfdejfdejfdej
fgiZ dd „Z!d!S(&rzB
    For ActionScript source code.

    .. versionadded:: 0.9
    ZActionScriptZactionscriptÚasz*.aszapplication/x-actionscriptztext/x-actionscriptztext/actionscriptÚrootz\s+z//.*?\nz	/\*.*?\*/z /(\\\\|\\[^\\]|[^/\\\n])*/[gim]*z[~^*!%&<>|+=:;,/?\\-]+z
[{}\[\]();.]+ÚcaserÚforÚeachÚinÚwhileÚdoÚbreakÚreturnÚcontinueÚifÚelseÚthrowÚtryÚcatchÚvarÚwithÚnewÚtypeofÚ	argumentsÚ
instanceofrÚswitchz\b)ÚsuffixÚclassÚpublicÚfinalÚinternalÚnativeÚoverrideÚprivateÚ	protectedÚstaticÚimportÚextendsÚ
implementsÚ	interfaceÚ	intrinsicÚsuperÚdynamicÚfunctionÚconstÚgetÚ	namespaceÚpackageÚsetz9(true|false|null|NaN|Infinity|-Infinity|undefined|Void)\bÚ
AccessibilityÚAccessibilityPropertiesÚActionScriptVersionÚ
ActivityEventÚ
AntiAliasTypeÚApplicationDomainÚ
AsBroadcasterÚArrayÚAsyncErrorEventÚ	AVM1MovieÚBevelFilterÚBitmapÚ
BitmapDataÚBitmapDataChannelÚBitmapFilterÚBitmapFilterQualityÚBitmapFilterTypeÚ	BlendModeÚ
BlurFilterÚBooleanÚ	ByteArrayÚCameraÚCapabilitiesÚ	CapsStyleÚClassÚColorÚColorMatrixFilterÚColorTransformÚContextMenuÚContextMenuBuiltInItemsÚContextMenuEventÚContextMenuItemÚConvultionFilterÚCSMSettingsÚ	DataEventÚDateÚDefinitionErrorÚDeleteObjectSampleÚ
DictionaryÚDisplacmentMapFilterÚ
DisplayObjectÚDisplacmentMapFilterModeÚDisplayObjectContainerÚDropShadowFilterÚEndianÚEOFErrorÚErrorÚ
ErrorEventÚ	EvalErrorÚEventÚEventDispatcherÚ
EventPhaseÚExternalInterfaceÚ
FileFilterÚ
FileReferenceÚFileReferenceListÚFocusDirectionÚ
FocusEventÚFontÚ	FontStyleÚFontTypeÚ
FrameLabelÚFullScreenEventÚFunctionÚ
GlowFilterÚGradientBevelFilterÚGradientGlowFilterÚGradientTypeÚGraphicsÚGridFitTypeÚHTTPStatusEventÚIBitmapDrawableÚID3InfoÚ
IDataInputÚIDataOutputÚ,IDynamicPropertyOutputIDynamicPropertyWriterÚIEventDispatcherÚIExternalizableÚIllegalOperationErrorÚIMEÚIMEConversionModeÚIMEEventÚintÚInteractiveObjectÚInterpolationMethodÚInvalidSWFErrorÚInvokeEventÚIOErrorÚIOErrorEventÚ
JointStyleÚKeyÚKeyboardÚ
KeyboardEventÚKeyLocationÚ
LineScaleModeÚLoaderÚ
LoaderContextÚ
LoaderInfoÚLoadVarsÚLocalConnectionÚLocaleÚMathÚMatrixÚMemoryErrorÚ
MicrophoneÚ
MorphShapeÚMouseÚ
MouseEventÚ	MovieClipÚMovieClipLoaderÚ	NamespaceÚ
NetConnectionÚNetStatusEventÚ	NetStreamÚNewObjectSamplerÚObjectÚObjectEncodingÚ
PixelSnappingÚPointÚPrintJobÚPrintJobOptionsÚPrintJobOrientationÚ
ProgressEventÚProxyÚQNameÚ
RangeErrorÚ	RectangleÚReferenceErrorÚRegExpÚ	ResponderÚSampleÚSceneÚScriptTimeoutErrorÚSecurityÚSecurityDomainÚ
SecurityErrorÚSecurityErrorEventÚ
SecurityPanelÚ	SelectionÚShapeÚSharedObjectÚSharedObjectFlushStatusÚSimpleButtonÚSocketÚSoundÚSoundChannelÚSoundLoaderContextÚ
SoundMixerÚSoundTransformÚSpreadMethodÚSpriteÚ
StackFrameÚStackOverflowErrorÚStageÚ
StageAlignÚStageDisplayStateÚStageQualityÚStageScaleModeÚ
StaticTextÚStatusEventr
Ú
StyleSheetÚ
SWFVersionÚ	SyncEventÚSyntaxErrorÚSystemÚ
TextColorTypeÚ	TextFieldÚTextFieldAutoSizeÚ
TextFieldTypeÚ
TextFormatÚTextFormatAlignÚTextLineMetricsÚTextRendererÚTextSnapshotÚTimerÚ
TimerEventÚ	TransformÚ	TypeErrorÚuintÚURIErrorÚ	URLLoaderÚURLLoaderDataFormatÚ
URLRequestÚURLRequestHeaderÚURLRequestMethodÚ	URLStreamÚ
URLVariabelesÚVerifyErrorÚVideoÚXMLÚXMLDocumentÚXMLListÚXMLNodeÚXMLNodeTypeÚ	XMLSocketÚXMLUIÚ	decodeURIÚdecodeURIComponentÚ	encodeURIÚescapeÚevalÚisFiniteÚisNaNÚ	isXMLNameÚ
clearIntervalÚ	fscommandÚgetTimerÚgetURLÚ
getVersionÚ
parseFloatÚparseIntÚsetIntervalÚtraceÚupdateAfterEventÚunescapez
[$a-zA-Z_]\w*z%[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?z0x[0-9a-f]+z[0-9]+z"(\\\\|\\[^\\]|[^"\\])*"z'(\\\\|\\[^\\]|[^'\\])*'cCsdS)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©)Útextrrú@/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/actionscript.pyÚanalyse_textpszActionScriptLexer.analyse_textN)rrrrrrrrrrrr r!r"r#r$r%r&r'r(r)rr*)r,r-r.r/r0r1r2r3r4r5r6r7r8r9rr:r;r<r=r>r?r@rA)ÆrBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr€rr‚rƒr„r…r†r‡rˆr‰rŠr‹rŒrrŽrrr‘r’r“r”r•r–r—r˜r™ršr›rœrržrŸr r¡r¢r£r¤r¥r¦r§r¨r©rªr«r¬r­r®r¯r°r±r²r³r´rrµr¶r·r¸r¹rºr»r¼r½r¾r¿rÀrÁrÂrÃrÄrÅrÆrÇrÈrÉrÊrËrÌrÍrÎrÏrÐrÑrÒrÓrÔrÕrÖr×rØrÙrÚrÛrÜrÝrÞrßràrár
rârãrärårærçrèrérêrërìrírîrïrðrñròrórôrõrör÷rørùrúrûrürýrþrÿrrrrrr)rrrr	r
rrr
rrrrrrrrrrr)"Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚreÚDOTALLÚflagsrr	ÚSingleÚ	Multiliner
ÚRegexr
rrrÚDeclarationÚConstantrZBuiltinrZOtherrÚFloatÚHexÚIntegerÚDoubleÚtokensrrrrrrs¤








c@sìeZdZdZdZdZddgZdgZddd	gZd
Z	e	dZ
ejej
BZdefd
e	deejejeeƒdfde	de
deejeeeeeejƒfde	deeeejeƒfde
deeeejeeƒfdejfdejfdejfde	deeejƒfdefdejfdej fdejfe	efde!j"fde!j#fd e!j$fd!ej%fd"ejfd#efgdefd$e	de
d%eeeeeeeejeƒd&fd'ed(fgd)e
d*eeeeejƒd+fded+fe&d+ƒgd,eeee'e(ƒeeƒd-fd.ed-fe&d-ƒgd/œZ)d0d1„Z*d2S)3rzE
    For ActionScript 3 source code.

    .. versionadded:: 0.11
    zActionScript 3zNhttps://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.htmlZ
actionscript3Zas3z*.aszapplication/x-actionscript3ztext/x-actionscript3ztext/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]?z0x[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ú,)rr2r5r4cCstjd|ƒrdSdS)Nz\w+\s*:\s*\wg333333Ó?r)r%Úmatch)rrrrrÆszActionScript3Lexer.analyse_textN)+rrrr r!Úurlr"r#r$Ú
identifierZtypeidentifierr%r&Ú	MULTILINEr'rrrr+rrrr
rÚTyper°r	r(r)r
r*Ú	Attributer,rr-r.r/r0rrrr1rrrrrrvsl




c	@sØeZdZdZejejBZdZdgZ	dgZ
ddgZdefde
jfd	eeeeƒeƒfd
edfdejfd
ejfde
jdfde
jfgdefdedfdefgdefde
jdfde
jdfgdefdedfdedfdedfgdœZdS)rz~
    For MXML markup.
    Nested AS3 in <script> tags is highlighted by the appropriate lexer.

    .. versionadded:: 1.1
    ZMXMLZmxmlz*.mxmlztext/xmlzapplication/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>]+)rr=r>r@N)rrrr r%r:r&r'r!r"r#Z	mimetimesrrÚEntityrr
rrr	ZPreprocZTagrr<r1rrrrrÌs2


)r r%Zpygments.lexerrrrrrrZpygments.tokenrr	r
rrr
rrrÚ__all__rrrrrrrÚ<module>	s ,
bV