YBFj[dZddlZddlmZmZmZmZmZmZm Z m Z ddl m Z m Z mZmZmZmZmZmZmZmZddlmZmZgdZdZGdd eeZGd d eeZGd d eZGddeZdS)z pygments.lexers.objective ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for Objective-C family languages. :copyright: Copyright 2006-present by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) RegexLexerincludebygroupsusingthiswordsinheritdefault) TextKeywordNameStringOperatorNumber PunctuationLiteralComment Whitespace)CLexerCppLexer)ObjectiveCLexerObjectiveCppLexer LogosLexer SwiftLexerctjdtjdGfdd}|S)z^ Generate a subclass of baselexer that accepts the Objective-C syntax extensions. z @(?:end|implementation|protocol)z<\[\s*[a-zA-Z_]\w*\s+(?:[a-zA-Z_]\w*\s*\]|(?:[a-zA-Z_]\w*)?:)ceZdZdZdedfdefdejfdejfdejfdejfd ej fd ej fd e d fd e dfde dfe dde fe dde jfdejfdejfde jfdejfdee edfdee edfdefegdeejeejeedfd eejeejd!fd"eejeejeedfd#eejeejd!fd$eejeedfd%ejd!fgd&eejed'fd(eejed!fged)ed*d+efd,ed-fd.ed!fgd/eeeeeeejd0feged)d1efd2efd3eeeeejfd4ejfd+ed!fd,ed5fed!gd6ed7fd8e d!fed9gd6ed-fd8ed!fed9gd:ed;fdZdBfd@ ZdAS)C-objective..GeneratedObjectiveCVariantzU Implements Objective-C syntax on top of an existing C family lexer. @"stringz @(YES|NO)z3@'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'z&@(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?z@(\d+\.\d*|\.\d+|\d+[fF])[fF]?z@0x[0-9a-fA-F]+[Ll]?z @0[0-7]+[Ll]?z @\d+[Ll]?z@\(literal_numberz@\[ literal_arrayz@\{literal_dictionary)*z @selectorz@privatez @protectedz@publicz@encodez @synchronizedz@tryz@throwz@catchz@finallyz@endz @propertyz @synthesize__bridge__bridge_transfer__autoreleasing__block__weak__strongweakstrongcopyretainassignunsafe_unretainedatomic nonatomicreadonly readwritesettergettertypeofinoutinoutreleaseclassz@dynamicz @optionalz @requiredz@autoreleasepoolz@import\bsuffix) id instancetypeClassIMPSELBOOLIBOutletIBActionunicharz@(true|false|YES|NO)\nz(YES|NO|nil|self|super)\bz3(Boolean|UInt8|SInt8|UInt16|SInt16|UInt32|SInt32)\bz(TRUE|FALSE)\bz!(@interface|@implementation)(\s+))#pop oc_classnamez(@class|@protocol)(\s+))rGoc_forward_classname@z7([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?(\s*)(\{))rGoc_ivars.([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?rGz6([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))(\s*)(\{)z-([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))z([a-zA-Z$_][\w$]*)(\s*)(\{)([a-zA-Z$_][\w$]*)z([a-zA-Z$_][\w$]*)(\s*,\s*)rIz([a-zA-Z$_][\w$]*)(\s*;?) whitespace statements;z\{#pushz\}z/^([-+])(\s*)(\(.*?\))?(\s*)([a-zA-Z$_][\w$]*:?)method,z\.\.\.z (\(.*?\))(\s*)([a-zA-Z$_][\w$]*)z[a-zA-Z$_][\w$]*:function\(literal_number_inner\) statementz\[literal_array_innerz\]) rOrHrIrKrootrRr rVr!rYr"c|rdSd|vrdStjd|rdS|rdSdS)N?rg?z@[0-9]+gffffff?r)searchre)text _oc_keywords _oc_messages GC:\PYTHON\_runtimes\venv\Lib\site-packages\pygments/lexers/objective.py analyse_textz:objective..GeneratedObjectiveCVariant.analyse_textse""4(( ss9d++ s##D)) s1rZc3Kddlm}m}m} |||D]A\}}}|t us|t jur||vs||vs||vrt jj}|||fVBdSNr)COCOA_INTERFACESCOCOA_PROTOCOLSCOCOA_PRIMITIVES) pygments.lexers._cocoa_builtinsrhrirjget_tokens_unprocessedr r@BuiltinPseudo) selfr_stackrhrirjindextokenvalue baselexers rbrlzDobjective..GeneratedObjectiveCVariant.get_tokens_unprocesseds 2 2 2 2 2 2 2 2 2 244T4GG * *#ueD==ETZ$7$7 000E_4L4L#333 $ 3UE))))) * *rdN)re) __name__ __module__ __qualname____doc__rrCharFloatHexOctIntegerrrr Typer rmrr rr r@LabelrrrFunctionVariabler tokensrcrl)r`rartsrbGeneratedObjectiveCVariantr*sU  )v&GU:FLI2FLA(&*5!6:.v~."23/2"67@INOOO ;CHJJJ+DL9-t|<GV"DL15xx7N7N)++XXgt-D-D13{#K&RL$*dDJkJJ%'C$*dDJ77AK$*dDJkJJ%'B$*dDJ77A0$*dK88:NP& F;!&0$*d++-CE-$*d++V5% %% %%k" W- V, )+tUU4[[ //    %%{#K(4%%++tT];;=%t}5k6* Z0  %;<( $$  W- V, $$%  %:;( $$  W- V, $$$ ( $$#ev v p       * * * * * * * *rdr)r^compile)rtrr`ras` @@rb objectivers:ABBL*455KS*S*S*S*S*S*S*S*S*YS*S*S*j &%rdc8eZdZdZdZdZgdZddgZdgZdZ d Z d S) rzC For Objective-C source code with preprocessor directives. z Objective-Czhttps://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html)z objective-c objectiveczobj-cobjcz*.mz*.hztext/x-objective-c皙?N) rurvrwrxnameurlaliases filenames mimetypes version_addedpriorityrdrbrrsM D PC<< DiG000I IMH ( : Xg{D$*dK P P R  Xg{ + +-C E '!2!2 3 5 XgtTZ 0 0& : ((7D"9"9 ( *   TN +? @ 7 Xdj$ T4 @ @ B "DJ / K ( ! ? Xdj$ 3 3V = "DJ 7 !((7D"9"9  5 XgtTZ 0 0 2 : XgtT]D&$ G G I ((7D+"F"F   ( XgtWfg > > @ ((4$"?"? @   7))FV!bj!;< Z)d?Z*d@S)Arz For Swift source. Swiftzhttps://www.swift.org/z*.swiftswiftz text/x-swiftz2.0z\nrz//comment-singlez/\* comment-multiz##(if|elseif|else|endif|available)\bpreprockeywords)Array!AutoreleasingUnsafeMutablePointerBidirectionalReverseViewBitBoolCFunctionPointerCOpaquePointerCVaListPointer CharacterClosedIntervalCollectionOfOneContiguousArray DictionaryDictionaryGeneratorDictionaryIndexDoubleEmptyCollectionEmptyGeneratorEnumerateGeneratorEnumerateSequenceFilterCollectionViewFilterCollectionViewIndexFilterGeneratorFilterSequenceViewrzFloat80FloatingPointClassification GeneratorOfGeneratorOfOneGeneratorSequenceHalfOpenInterval HeapBufferHeapBufferStorageImplicitlyUnwrappedOptionalIndexingGeneratorIntInt16Int32Int64Int8LazyBidirectionalCollectionLazyForwardCollectionLazyRandomAccessCollection LazySequenceMapCollectionViewMapSequenceGeneratorMapSequenceViewMirrorDispositionObjectIdentifierOnHeapOptionalPermutationGeneratorQuickLookObjectRandomAccessReverseViewRangeRangeGeneratorRawByteRepeatReverseBidirectionalIndexReverseRandomAccessIndex SequenceOfSinkOfSlice StaticString StrideThroughStrideThroughGeneratorStrideToStrideToGeneratorrUIntUInt16UInt32UInt64UInt8UTF16UTF32UTF8UnicodeDecodingResult UnicodeScalar UnmanagedUnsafeBufferPointerUnsafeBufferPointerGeneratorUnsafeMutableBufferPointerUnsafeMutablePointer UnsafePointerZip2 ZipGenerator2AbsoluteValuable AnyObjectArrayLiteralConvertibleBidirectionalIndexTypeBitwiseOperationsTypeBooleanLiteralConvertible BooleanType CVarArgTypeCollectionType ComparableDebugPrintableDictionaryLiteralConvertible Equatable)ExtendedGraphemeClusterLiteralConvertibleExtensibleCollectionTypeFloatLiteralConvertibleFloatingPointTypeForwardIndexType GeneratorTypeHashableIntegerArithmeticTypeIntegerLiteralConvertible IntegerType IntervalType MirrorTypeMutableCollectionTypeMutableSliceableNilLiteralConvertibleOutputStreamType PrintableRandomAccessIndexTypeRangeReplaceableCollectionTypeRawOptionSetTypeRawRepresentable Reflectable SequenceTypeSignedIntegerTypeSignedNumberTypeSinkType Sliceable Streamable StrideableStringInterpolationConvertibleStringLiteralConvertibleUnicodeCodecTypeUnicodeScalarLiteralConvertibleUnsignedIntegerType_ArrayBufferType_BidirectionalIndexType_CocoaStringType_CollectionType _Comparable_ExtensibleCollectionType_ForwardIndexType_Incrementable_IntegerArithmeticType _IntegerType_ObjectiveCBridgeable_RandomAccessIndexType_RawOptionSetType _SequenceType_Sequence_Type_SignedIntegerType_SignedNumberType _Sliceable _Strideable"_SwiftNSArrayRequiredOverridesType_SwiftNSArrayType_SwiftNSCopyingType'_SwiftNSDictionaryRequiredOverridesType_SwiftNSDictionaryType_SwiftNSEnumeratorType_SwiftNSFastEnumerationType#_SwiftNSStringRequiredOverridesType_SwiftNSStringType_UnsignedIntegerTypeC_ARGCC_ARGVProcessAnyAnyClassBooleanLiteralTypeCBoolCCharCChar16CChar32CDoubleCFloatCIntCLong CLongLongCShort CSignedChar CUnsignedInt CUnsignedLongCUnsignedShort CWideCharExtendedGraphemeClusterTypeFloat32Float64FloatLiteralTypeIntMaxIntegerLiteralTypeStringLiteralTypeUIntMaxUWordUnicodeScalarTypeVoidWordNSErrorPointerNSObjectProtocolSelectorr;r<)Kabsadvancealignof alignofValueassertassertionFailurecontainscount countElements debugPrint debugPrintlndistance dropFirstdropLastdump enumerateequalextend fatalErrorfilterfindfirst getVaListindicesinsertisEmptyjoinlastlazylexicographicalComparemapmax maxElementmin minElement numericCastoverlaps partition preconditionpreconditionFailureprefixprintprintlnreducereflect removeAll removeAtIndex removeLast removeRangereversesizeof sizeofValuesortsortedsplicesplit startsWithstridestrideof strideofValuer=swap toDebugStringtoString transcodeunderestimateCountunsafeAddressOf unsafeBitCastunsafeDowncastwithExtendedLifetimewithUnsafeMutablePointerwithUnsafeMutablePointerswithUnsafePointerwithUnsafePointers withVaListz\$\d+z0b[01_]+z 0o[0-7_]+z0x[0-9a-fA-F_]+zD[0-9][0-9_]*(\.[0-9_]+[eE][+\-]?[0-9_]+|\.[0-9_]*|[eE][+\-]?[0-9_]+)z [0-9][0-9_]*z""" string-multi"rz/[(){}\[\].,:;=@#`?]|->|[<&?](?=\w)|(?<=\w)[>!?]z[/=\-+!*%<>&|^?~]+z [a-zA-Z_]\w*)asasyncawaitbreakcasecatchcontinuer deferdoelse fallthroughforguardifr6isrepeatreturnz #selectorswitchthrowtrywherewhilez@availability\([^)]+\))) associativity conveniencedynamicdidSetfinalgetindirectinfixr8rleftmutatingnone nonmutatingoptionaloverridepostfix precedencerProtocolrequiredrethrowsrightsetthrowsr~unownedr)willSetz @availabilityz @autoclosurez @noreturnz@NSApplicationMainz @NSCopyingz @NSManagedz@objcz@UIApplicationMainz @IBActionz @IBDesignablez@IBInspectablez @IBOutletz(as|dynamicType|false|is|nil|self|Self|super|true|__COLUMN__|__FILE__|__FUNCTION__|__LINE__|_|#(?:file|line|column|function))\bzimport\bmodulez9(class|enum|extension|struct|protocol)(\s+)([a-zA-Z_]\w*)z(func)(\s+)([a-zA-Z_]\w*)z(var|let)(\s+)([a-zA-Z_]\w*))actorassociatedtyper:deinitenum extensionfuncimportinitinternalletoperatorprivateprotocolpublicstaticstruct subscript typealiasvarz2:param: [a-zA-Z_]\w*|:returns?:|(FIXME|MARK|TODO):rGcommentz[^\n]+z[^*/]+rQz\*/z[*/]+rZz [A-Za-z]\w* string-commonz\\\( string-intpzN\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}z[^\\"]+z\\rUrW) rZrrrrrrrrrrc#Kddlm}m}m}t j||D]A\}}}|t us|t jur||vs||vs||vrt jj }|||fVBdSrg) rkrhrirjrrlr r@rmrn)ror_rhrirjrqrrrss rbrlz!SwiftLexer.get_tokens_unprocesseds . . . . . . . . . .1$== & & E5%}} 3 3,,,0H0H/// L/E% % % % % & &rdN)+rurvrwrxrrrrrrr rrSingle MultilinePreprocrrr rmrnrrBinr|r{rzr}rrrr ReservedConstant Declarationrr@rSpecialInterpolEscaperrlrrdrbrrs D "C IiG IM DM Z GN$4 5 W& 8 3W_i P GJ  U?B~KP?Q?Q?Q@\A@ DU',--- \ ! "&t} %&* % 6: &  ,-.4l < fn - V^ , 68 $@ M "H -d #mw rU"+0 111    '(8 9 U /8= > > >  34;4D F'-x 8 I Xg):tz B B D ) Xg):t} E E G ,hhw7J /(/( ) UENSTTT  ";" HC _  J ' GI    ' GI   ) * W& 0 W& / w( )  J ' dj ) GFOO J ' GJ   W_ - GFOO  66 " GO $ $ VV $ GO $ $ fo} 59:@- I  FO  FOW - FOV , GFOO QMMF^ & & & & &rdr)rxr^pygments.lexerrrrrrrr r pygments.tokenr r r rrrrrrrpygments.lexers.c_cpprr__all__rrrrrrrdrbrs 66666666666666666666666632222222 N N Nh&h&h&V     ii''         (++   <<<<<"<<<~e&e&e&e&e&e&e&e&e&e&rd