o aA-@sdZddlZddlmZmZmZmZmZmZddl m Z m Z m Z m Z mZmZmZmZmZgdZGdddeZGdd d eZGd d d eZdS) z pygments.lexers.actionscript ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for ActionScript and MXML. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) RegexLexerbygroupsusingthiswordsdefault) TextCommentOperatorKeywordNameStringNumber Punctuation Whitespace)ActionScriptLexerActionScript3Lexer MxmlLexerc@seZdZdZdZddgZdgZgdZej Z dde fd e j fd e jfd ejfd efd efedddefedddejfdejfedddejfedddejfdejfdejfdejfdejfdejfdej fgiZ ddZ!dS)rzB For ActionScript source code. .. versionadded:: 0.9 ActionScript actionscriptas*.as)zapplication/x-actionscriptztext/x-actionscriptztext/actionscriptroot\s+//.*?\n /\*.*?\*/z /(\\\\|\\[^\\]|[^/\\\n])*/[gim]*z[~^*!%&<>|+=:;,/?\\-]+z [{}\[\]();.]+)caserforeachinwhiledobreakreturncontinueifelsethrowtrycatchvarwithnewtypeof arguments instanceofrswitchz\b)suffix)classpublicfinalinternalnativeoverrideprivate protectedstaticimportextends implements interface intrinsicr#superdynamicfunctionconstget namespacepackagesetz9(true|false|null|NaN|Infinity|-Infinity|undefined|Void)\b) AccessibilityAccessibilityPropertiesActionScriptVersion ActivityEvent AntiAliasTypeApplicationDomain AsBroadcasterArrayAsyncErrorEvent AVM1Movie BevelFilterBitmap BitmapDataBitmapDataChannel BitmapFilterBitmapFilterQualityBitmapFilterType BlendMode BlurFilterBoolean ByteArrayCamera Capabilities CapsStyleClassColorColorMatrixFilterColorTransform ContextMenuContextMenuBuiltInItemsContextMenuEventContextMenuItemConvultionFilter CSMSettings DataEventDateDefinitionErrorDeleteObjectSample DictionaryDisplacmentMapFilter DisplayObjectDisplacmentMapFilterModeDisplayObjectContainerDropShadowFilterEndianEOFErrorError ErrorEvent EvalErrorEventEventDispatcher EventPhaseExternalInterface FileFilter FileReferenceFileReferenceListFocusDirection FocusEventFont FontStyleFontType FrameLabelFullScreenEventFunction GlowFilterGradientBevelFilterGradientGlowFilter GradientTypeGraphics GridFitTypeHTTPStatusEventIBitmapDrawableID3Info IDataInput IDataOutput,IDynamicPropertyOutputIDynamicPropertyWriterIEventDispatcherIExternalizableIllegalOperationErrorIMEIMEConversionModeIMEEventintInteractiveObjectInterpolationMethodInvalidSWFError InvokeEventIOError IOErrorEvent JointStyleKeyKeyboard KeyboardEvent KeyLocation LineScaleModeLoader LoaderContext LoaderInfoLoadVarsLocalConnectionLocaleMathMatrix MemoryError Microphone MorphShapeMouse MouseEvent MovieClipMovieClipLoader Namespace NetConnectionNetStatusEvent NetStreamNewObjectSamplerObjectObjectEncoding PixelSnappingPointPrintJobPrintJobOptionsPrintJobOrientation ProgressEventProxyQName RangeError RectangleReferenceErrorRegExp ResponderSampleSceneScriptTimeoutErrorSecuritySecurityDomain SecurityErrorSecurityErrorEvent SecurityPanel SelectionShape SharedObjectSharedObjectFlushStatus SimpleButtonSocketSound SoundChannelSoundLoaderContext SoundMixerSoundTransform SpreadMethodSprite StackFrameStackOverflowErrorStage StageAlignStageDisplayState StageQualityStageScaleMode StaticText StatusEventr StyleSheet SWFVersion SyncEvent SyntaxErrorSystem TextColorType TextFieldTextFieldAutoSize TextFieldType TextFormatTextFormatAlignTextLineMetrics TextRenderer TextSnapshotTimer TimerEvent Transform TypeErroruintURIError URLLoaderURLLoaderDataFormat URLRequestURLRequestHeaderURLRequestMethod URLStream URLVariabeles VerifyErrorVideoXML XMLDocumentXMLListXMLNode XMLNodeType XMLSocketXMLUI) decodeURIdecodeURIComponent encodeURIescapeevalisFiniteisNaN isXMLName clearInterval fscommandgetTimergetURL getVersion parseFloatparseInt setIntervaltraceupdateAfterEventunescape [$a-zA-Z_]\w*%[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]? 0x[0-9a-f]+[0-9]+"(\\\\|\\[^\\]|[^"\\])*"'(\\\\|\\[^\\]|[^'\\])*'cCsdS)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.rtextr%r%>/usr/lib/python3/dist-packages/pygments/lexers/actionscript.py analyse_textpszActionScriptLexer.analyse_textN)"__name__ __module__ __qualname____doc__namealiases filenames mimetypesreDOTALLflagsrr Single Multiliner Regexr rrr DeclarationConstantr BuiltinrOtherrFloatHexIntegerDoubletokensr)r%r%r%r(rs\'() Nrc@seZdZdZdZddgZdgZgdZdZedZ e j e j BZ d efd ed eejejeed fd ede deejeeeeeejfdedeeeejefde d eeeejeefdejfdejfdejfdedeeejfdefdejfdejfdejfeefde j!fde j"fde j#fdej$fdejfd efgd efd!ede d"eeeeeeeejed#fd$ed%fgd&e d'eeeeejd(fd ed(fe%d(gd)eeee&e'eed*fd+ed*fe%d*gd,Z(d-d.Z)d/S)0rzE For ActionScript 3 source code. .. versionadded:: 0.11 zActionScript 3 actionscript3as3r)zapplication/x-actionscript3ztext/x-actionscript3ztext/actionscript3rz (?:\.<\w+>)?rz(function\s+)(z )(\s*)(\() funcparamsz(var|const)(\s+)(z)(\s*)(:)(\s*)()z(import|package)(\s+)((?:z |\.)+)(\s*)z (new)(\s+)(rrz /(\\\\|\\[^\\]|[^\\\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)\br r!r"r#r$z[~^*!%&<>|+=:;,/?\\{}\[\]().-]+z(\s*)(\.\.\.)?(z |\*)(\s*)defvalz\)typez(\s*)(:)(\s*)(z|\*)z#pop:2z(=)(\s*)([^(),]+)(\s*)(,?)#pop,)rrCrFrEcCstd|rdSdS)Nz \w+\s*:\s*\wg333333?r)r2matchr&r%r%r(r)s zActionScript3Lexer.analyse_textN)*r*r+r,r-r.r/r0r1 identifiertypeidentifierr2r3 MULTILINEr4rrr r8r rrr rTyperr r5r6r r7 Attributer9rr<r=r>r?rrrr@r)r%r%r%r(rvs     (   >rc @seZdZdZejejBZdZdgZ dgZ ddgZ de fde jfd eeeeefd ed fd ejfd ejfde jdfde jfgdefdedfdefgdefde jdfde jdfgdefdedfdedfdedfgdZdS)rz~ For MXML markup. Nested AS3 in