YBFj-dZddlZddlmZmZmZmZmZmZddl m Z m Z m Z m Z mZmZmZmZmZgdZGddeZGdd eZGd d eZdS) 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) RegexLexerbygroupsusingthiswordsdefault) TextCommentOperatorKeywordNameStringNumber Punctuation Whitespace)ActionScriptLexerActionScript3Lexer MxmlLexerceZdZdZdZddgZdgZgdZdZdZ e j Z d d e fd ejfd ejfd ejfdefdefeddefeddejfdejfeddejfeddejfdejfdejfdejfdej fdej!fdejfgiZ"dZ#dS)rz' For ActionScript source code. ActionScript actionscriptas*.as)zapplication/x-actionscriptztext/x-actionscriptztext/actionscriptz*https://en.wikipedia.org/wiki/ActionScriptz0.9root\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]+"(\\\\|\\[^\\]|[^"\\])*"'(\\\\|\\[^\\]|[^'\\])*'cdS)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.rtexts JC:\PYTHON\_runtimes\venv\Lib\site-packages\pygments/lexers/actionscript.py analyse_textzActionScriptLexer.analyse_textps qN)$__name__ __module__ __qualname____doc__namealiases filenames mimetypesurl version_addedreDOTALLflagsrr Single MultilinerRegexr rrr DeclarationConstantr BuiltinrOtherrFloatHexIntegerDoubletokensr,r(r-r+rrs Dt$GI&&&I 6CM IE Z  ( 7, - 0&, ? & 1 { + U#( )))    U/8= >>>   " J    U'N"'O'('('(P\Q( RU%* +++ ]   tz * 5v| D VZ (  ' (&- 8 (&- 8SJ LF\r-rc`eZdZdZdZdZddgZdgZgdZdZ d Z e d zZ e j e jzZd efd e zd zeejejeedfde zdze zdzeejeeeeeejfde zdzeeeejefde zd zeeeejeefdejfdejfdejfde zdzeeej fdefdejfdej!fdejfe efde"j#fde"j$fde"j%fd ej&fd!ejfd"efgd efd#e zdze zd$zeeeeeeeejed%fd&ed'fgd(e zd)zeeeeejd*fd ed*fe'd*gd+eeee(e)eed,fd-ed,fe'd,gd.Z*d/Z+d0S)1rz) For ActionScript 3 source code. zActionScript 3zNhttps://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html actionscript3as3r)zapplication/x-actionscript3ztext/x-actionscript3ztext/actionscript3z0.11r!z (?:\.<\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,)rrJrMrLc4tjd|rdSdS)Nz\bimport\s+flash\.g?r)r8searchr)s r+r,zActionScript3Lexer.analyse_texts! 9*D 1 1 3qr-N),r.r/r0r1r2r6r3r4r5r7 identifiertypeidentifierr8r9 MULTILINEr:rrr r>r rr r rTyperr r;r<rr= Attributer?rrBrCrDrErrrrFr,r(r-r+rrvs D ZC&GI'''IM!J/1N I $EZ  +m ; Xg)4=$ I I  "J .1C C "# Xg):tZV`l$$ %*J 6 G Xgz4>: F F H n ,} < Xgz7<X N N P  ( 7, - 0&, ?  "T )88Hdn+M+M N/ D  "J   "] ,  5v| D VZ (  ' (&- 8 (&- 8 / :K& PZ * ,/A A *+ Xj+tZ:lJ0019 ;Hf %   /' 9 Xj(J E Ex Q T8 $ GH    + Xh EE$KKX N NPV X 8V $ GFOO  m<<F|r-rc @eZdZdZejejzZdZdgZ dgZ dZ dZ de fdejfd eeeeefd ed fd ejfd ejfdejdfdejfgdefdedfdefgdefdejdfdejdfgdefdedfdedfdedfgdZdS)rzc For MXML markup. Nested AS3 in