From cfe83a47dd8c20503b4ba6590f7832c08131bef3 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sun, 13 Nov 2022 23:22:23 +0100 Subject: [PATCH 01/29] [ActionScript] clean up syntax - update to syntax v2 - add variables - move comments to prototype context - add named contexts for strings and comments --- ActionScript/ActionScript.sublime-syntax | 929 +++++++++++++++++++++-- 1 file changed, 854 insertions(+), 75 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 7e8567b8ee..fab2ceb3b1 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -1,8 +1,8 @@ %YAML 1.2 --- -# http://www.sublimetext.com/docs/3/syntax.html -name: ActionScript -scope: source.actionscript.2 +name: ActionScript 2.0 +scope: source.actionscript +version: 2 file_extensions: - as @@ -12,87 +12,866 @@ first_line_match: |- ^ \s* // .*? -\*- .*? \baction-?script\b .*? -\*- # editorconfig ) +###[ Variables ]######################################################################################################## + +variables: + classes: |- + (?x: + R(?:ecordset|DBMSResolver|adioButton(?:Group)?) + | X(?:ML(?:Socket|Node|Connector)?|UpdateResolverDataHolder) + | M(?: + M(?:Save|Execute) + | icrophoneMicrophone + | o(?:use|vieClip(?:Loader)?) + | e(?:nu(?:Bar)?|dia(?:Controller|Display|Playback)) + | ath + ) + | B(?:yName|inding|utton) + | S(?: + haredObject + | ystem + | crollPane + | t(?:yleSheet|age|ream) + | ound + | e(?:ndEvent|rviceObject) + | OAPCall + | lide + ) + | N(?: + umericStepper + | et(?: + stream + | S(?:tream|ervices) + | Connection + | Debug(?:Config)? + ) + ) + | C(?: + heckBox + | o(?:ntextMenu(?:Item)?|okie|lor|m(?:ponentMixins|boBox)) + | ustomActions + | lient + | amera + ) + | T(?: + ypedValue + | ext(?:Snapshot|Input|F(?:ield|ormat)|Area) + | ree + | AB + ) + | Object + | D(?:ownload|elta(?:Item|Packet)?|at(?:e(?:Chooser|Field)?|a(?:G(?:lue|rid)|Set|Type))) + | U(?:RL|TC|IScrollBar) + | P(?:opUpManager|endingCall|r(?:intJob|o(?:duct|gressBar))) + | E(?:ndPoint|rror) + | Video + | Key + | F(?: + RadioButton + | GridColumn + | MessageBox + | BarChart + | S(?:croll(?:Bar|Pane)|tyleFormat|plitView) + | orm + | C(?:heckbox|omboBox|alendar) + | unction + | T(?:icker|ooltip(?:Lite)?|ree(?:Node)?) + | IconButton + | D(?:ataGrid|raggablePane) + | P(?:ieChart|ushButton|ro(?:gressBar|mptBox)) + | L(?:i(?:stBox|neChart)|oadingBox) + | AdvancedMessageBox + ) + | W(?:indow|SDLURL|ebService(?:Connector)?) + | L(?:ist|o(?:calConnection|ad(?:er|Vars)|g)|a(?:unch|bel)) + | A(?: + sBroadcaster + | cc(?:ordion|essibility) + | S(?:Set(?:Native|PropFlags)|N(?:ew|ative)|C(?:onstructor|lamp(?:2)?)|InstanceOf) + | pplication + | lert + | rray + ) + ) + functions: |- + (?x: + s(?: + h(?:ift|ow(?:GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(?:ow|ePane)) + | c(?:hema|ale(?:X|Mode|Y|Content)|r(?:oll(?:Track|Drag)?|een(?:Resolution|Color|DPI))) + | t(?:yleSheet|op(?:Drag|A(?:nimation|llSounds|gent))?|epSize|a(?:tus|rt(?:Drag|A(?:nimation|gent))?)) + | i(?:n|ze|lence(?:TimeOut|Level)) + | o(?:ngname|urce|rt(?:Items(?:By)?|On(?:HeaderRelease)?|able(?:Columns)?)?) + | u(?:ppressInvalidCalls|bstr(?:ing)?) + | p(?:li(?:ce|t)|aceCol(?:umnsEqually|lumnsEqually)) + | e(?: + nd(?:DefaultPushButtonEvent|AndLoad)? + | curity + | t(?: + R(?:GB|o(?:otNode|w(?:Height|Count))|esizable(?:Columns)?|a(?:nge|te)) + | G(?:ain|roupName) + | X(?:AxisTitle)? + | M(?: + i(?:n(?:imum|utes)|lliseconds) + | o(?:nth(?:Names)?|tionLevel|de) + | ultilineMode + | e(?:ssage|nu(?:ItemEnabled(?:At)?|EnabledAt)|dia) + | a(?:sk|ximum) + ) + | B(?:u(?:tton(?:s|Width)|fferTime)|a(?:seTabIndex|ndwidthLimit|ckground)) + | S(?: + howAsDisabled + | croll(?:ing|Speed|Content|Target|P(?:osition|roperties)|barState|Location) + | t(?:yle(?:Property)?|opOnFocus|at(?:us|e)) + | i(?:ze|lenceLevel) + | ort(?:able(?:Columns)?|Function) + | p(?:litterBarPosition|acing) + | e(?: + conds + | lect(?: + Multiple + | ion(?:Required|Type)? + | Style + | Color + | ed(?:Node(?:s)?|Cell|I(?:nd(?:ices|ex)|tem(?:s)?))? + | able + ) + ) + | kin + | m(?:oothness|allScroll) + ) + | H(?: + ighlight(?:s|Color) + | Scroll + | o(?:urs|rizontal) + | eader(?:Symbol|Height|Text|Property|Format|Width|Location)? + | as(?:Shader|CloseBox) + ) + | Y(?:ear|AxisTitle)? + | N(?:ode(?:Properties|ExpansionHandler)|ewTextFormat) + | C(?: + h(?:ildNodes|a(?:ngeHandler|rt(?:Title|EventHandler))) + | o(?:ntent(?:Size)?|okie|lumns) + | ell(?:Symbol|Data) + | l(?:i(?:ckHandler|pboard)|oseHandler) + | redentials + ) + | T(?: + ype(?:dVaule)? + | i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:out(?:Handler)?)?) + | oggle + | extFormat + | ransform + ) + | I(?:s(?:Branch|Open)|n(?:terval|putProperty)|con(?:SymbolName)?|te(?:rator|m(?:ByKey|Symbol))) + | Orientation + | D(?: + i(?: + splay(?:Range|Graphics|Mode|Clip|Text|edMonth) + | rection + ) + | uration + | e(?:pth(?:Below|To|Above)|fault(?:GatewayURL|Mappings|NodeIconSymbolName)|l(?:iveryMode|ay)|bug(?:ID)?) + | a(?: + yOfWeekNames + | t(?: + e(?:Filter)? + | a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Provider|All(?:Height|Property|Format|Width))? + ) + ) + | ra(?:wConnectors|gContent) + ) + | U(?: + se(?:Shadow|HandCursor|EchoSuppression|rInput|Fade) + | TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear) + ) + | P(?: + osition + | ercentComplete + | an(?:e(?:M(?:inimumSize|aximumSize)|Size|Title))? + | ro(?:pert(?:y(?:Data)?|iesAt)|gress) + ) + | E(?:nabled|dit(?:Handler|able)|xpand(?:NodeTrigger|erSymbolName)) + | V(?:Scroll|olume|alue(?:Source)?) + | KeyFrameInterval + | Quality + | F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(?:InLength|OutLength)|rame(?:Color|Width)) + | Width + | L(?:ine(?:Color|Weight)|o(?:opback|adTarget)|a(?:rgeScroll|bel(?:Source|Placement)?)) + | A(?: + s(?:Boolean|String|Number) + | n(?:yTypedValue|imation) + | ctiv(?:e(?:State(?:Handler)?|Handler)|ateHandler) + | utoH(?:ideScrollBar|eight) + ) + )? + | paratorBefore + | ek + | lect(?: + ion(?:Disabled|Unfocused)? + | ed(?:Node(?:s)?|Child|I(?:nd(?:ices|ex)|tem(?:s)?)|Dat(?:e|a))? + | able(?:Ranges)? + ) + | rver(?:String)? + ) + | kip + | qrt + | wapDepths + | lice + | aveToSharedObj + | moothing + ) + | h(?: + scroll(?:Policy)? + | tml(?:Text)? + | i(?:t(?:Test(?:TextNearPos)?|Area)|de(?:BuiltInItems|Child)?|ghlight(?:2D|3D)?) + | orizontal + | e(?:ight|ader(?:Re(?:nderer|lease)|Height|Text)) + | P(?:osition|ageScrollSize) + | a(?: + s(?: + childNodes + | MP3 + | S(?:creen(?:Broadcast|Playback)|treaming(?:Video|Audio)|ort) + | Next + | OwnProperty + | Pr(?:inting|evious) + | EmbeddedVideo + | VideoEncoder + | A(?:ccesibility|udio(?:Encoder)?) + ) + | ndlerName + ) + | LineScrollSize + ) + | ye(?:sLabel|ar) + | n(?: + o(?:t|de(?:Name|Close|Type|Open|Value)|Label) + | u(?:llValue|mChild(?:S(?:creens|lides)|ren|Forms)) + | e(?:w(?:Item|line|Value|LocationDialog)|xt(?:S(?:cene|ibling|lide)|TabIndex|Value|Frame)?)? + | ame(?:s)? + ) + | c(?: + h(?:ildNodes|eck|a(?:nge(?:sPending)?|r(?:CodeAt|At))|r) + | o(?: + s + | n(?: + st(?:ant|ructor) + | nect + | c(?:urrency|at) + | t(?:ent(?:Type|Path)?|ains|rol(?:Placement|lerPolicy)) + | denseWhite + | version + ) + | py + | l(?:or|umn(?:Stretch|Name(?:s)?|Count)) + | m(?:p(?:onent|lete)|ment) + ) + | u(?:stomItems|ePoint(?:s)?|r(?:veTo|Value|rent(?:Slide|ChildSlide|Item|F(?:ocused(?:S(?:creen|lide)|Form)|ps)))) + | e(?:il|ll(?:Renderer|Press|Edit|Focus(?:In|Out))) + | l(?:i(?:ck|ents)|o(?:se(?:Button|Pane)?|ne(?:Node)?)|ear(?:S(?:haredObjects|treams)|Timeout|Interval)?) + | a(?:ncelLabel|tch|p(?:tion|abilities)|l(?:cFields|l(?:e(?:e|r))?)) + | reate(?: + GatewayConnection + | Menu + | Se(?:rver|gment) + | C(?:hild(?:AtDepth)?|l(?:ient|ass(?:ChildAtDepth|Object(?:AtDepth)?))|all) + | Text(?:Node|Field) + | Item + | Object(?:AtDepth)? + | PopUp + | E(?:lement|mptyMovieClip) + ) + ) + | t(?: + h(?:is|row) + | ype(?:of|Name)? + | i(?:tle(?:StyleDeclaration)?|me(?:out)?) + | o(?:talTime|String|olTipText|p|UpperCase|ggle(?:HighQuality)?|Lo(?:caleString|werCase)) + | e(?: + st + | llTarget + | xt(?: + RightMargin + | Bold + | S(?:ize|elected) + | Height + | Color + | I(?:ndent|talic) + | Disabled + | Underline + | F(?:ield|ont) + | Width + | LeftMargin + | Align + )? + ) + | a(?:n|rget(?:Path)?|b(?:Stops|Children|Index|Enabled|leName)) + | r(?:y|igger|ac(?:e|k(?:AsMenu)?)) + ) + | i(?: + s(?: + Running + | Branch + | NaN + | Con(?:soleOpen|nected) + | Toggled + | Installed + | Open + | D(?:own|ebugger) + | P(?:urchased|ro(?:totypeOf|pertyEnumerable)) + | Empty + | F(?:inite|ullyPopulated) + | Local + | Active + ) + | n(?: + s(?:tall|ertBefore) + | cludeDeltaPacketInfo + | t + | it(?:ialize|Component|Pod|A(?:pplication|gent))? + | de(?:nt|terminate|x(?:InParent(?:Slide|Form)?|Of)?) + | put + | validate + | finity + | LocalInternetCache + )? + | con(?:F(?:ield|unction))? + | t(?:e(?:ratorScrolled|m(?:s|RollO(?:ut|ver)|ClassName))|alic) + | d3 + | p + | fFrameLoaded + | gnore(?:Case|White) + ) + | o(?: + s + | n(?: + R(?:ollO(?:ut|ver)|e(?:s(?:ize|ult)|l(?:ease(?:Outside)?|aseOutside))) + | XML + | Mouse(?:Move|Down|Up|Wheel) + | S(?:ync|croller|tatus|oundComplete|e(?:tFocus|lect(?:edItem)?)) + | N(?:oticeEvent|etworkChange) + | C(?:hanged|onnect|l(?:ipEvent|ose)) + | ID3 + | D(?:isconnect|eactivate|ata|ragO(?:ut|ver)) + | Un(?:install|load) + | P(?:aymentResult|ress) + | EnterFrame + | K(?:illFocus|ey(?:Down|Up)) + | Fault + | Lo(?:ad|g) + | A(?:ctiv(?:ity|ate)|ppSt(?:op|art)) + )? + | pe(?:n|ration) + | verLayChildren + | kLabel + | ldValue + | r(?:d)? + ) + | d(?: + i(?:s(?:connect|play(?:Normal|ed(?:Month|Year)|Full)|able(?:Shader|d(?:Ranges|Days)|CloseBox|Events))|rection) + | o(?:cTypeDecl|tall|Decoding|main|LazyDecoding) + | u(?:plicateMovieClip|ration) + | e(?: + stroy(?:ChildAt|Object) + | code + | fault(?:PushButton(?:Enabled)?|KeydownHandler)? + | l(?:ta(?:Packet(?:Changed)?)?|ete(?:PopUp|All)?) + | blocking + ) + | a(?:shBoardSave|yNames|ta(?:Provider)?|rkshadow) + | r(?:opdown(?:Width)?|a(?:w|gO(?:ut|ver))) + ) + | u(?: + se(?:Sort|HandCursor|Codepage|EchoSuppression) + | n(?:shift|install|derline|escape|format|watch|lo(?:ck|ad(?:Movie(?:Num)?)?)) + | pdate(?:Results|Mode|I(?:nputProperties|tem(?:ByIndex)?)|P(?:acket|roperties)|View|AfterEvent) + | rl + ) + | join + | p(?: + ixelAspectRatio + | o(?:sition|p|w) + | u(?:sh|rge|blish) + | ercen(?:tComplete|Loaded) + | lay(?:head(?:Change|Time)|ing|Hidden|erType)? + | a(?:ssword|use|r(?:se(?:XML|CSS|Int|Float)|ent(?:Node|Is(?:S(?:creen|lide)|Form))|ams)) + | r(?: + int(?:Num|AsBitmap(?:Num)?)? + | o(?:to(?:type)?|pert(?:y|ies)|gress) + | e(?:ss|v(?:ious(?:S(?:ibling|lide)|Value)?|Scene|Frame)|ferred(?:Height|Width)) + ) + ) + | e(?: + scape + | n(?:code(?:r)?|ter(?:Frame)?|dFill|able(?:Shader|d|CloseBox|Events)) + | dit(?:able|Field|LocationDialog) + | v(?:ent|al(?:uate)?) + | q + | x(?:tended|p|ec(?:ute)?|actSettings) + | m(?:phasized(?:StyleDeclaration)?|bedFonts) + ) + | v(?: + i(?:sible|ewPod) + | ScrollPolicy + | o(?:id|lume) + | ersion + | P(?:osition|ageScrollSize) + | a(?:l(?:idat(?:ionError|e(?:Property|ActivationKey)?)|ue(?:Of)?)|riable) + | LineScrollSize + ) + | k(?:ind|ey(?:Down|Up|Press|FrameInterval)) + | q(?:sort|uality) + | f(?: + scommand + | i(?:n(?:d(?:Text|First|Last)?|ally)|eldInfo|lter(?:ed|Func)?|rst(?:Slide|Child|DayOfWeek|VisibleNode)?) + | o(?:nt|cus(?:In|edCell|Out|Enabled)|r(?:egroundDisabled|mat(?:ter)?)) + | unctionName + | ps + | l(?:oor|ush) + | ace + | romCharCode + ) + | w(?:i(?:th|dth)|ordWrap|atch|riteAccess) + | l(?: + t + | i(?:st(?:Owner)?|ne(?:Style|To)) + | o(?: + c(?:k|a(?:t(?:ion|eByld)|l(?:ToGlobal|FileReadDisable))) + | opback + | ad(?:Movie(?:Num)?|S(?:crollContent|ound)|ed|Variables(?:Num)?|Application)? + | g(?:Changes)? + ) + | e(?:ngth|ft(?:Margin)?|ading)? + | a(?:st(?:Slide|Child|Index(?:Of)?)?|nguage|b(?:el(?:Placement|F(?:ield|unction))?|leField)) + ) + | a(?: + s(?:scociate(?:Controller|Display)|in|pectRatio|function) + | nd + | c(?:ceptConnection|tiv(?:ityLevel|ePlayControl)|os) + | t(?:t(?:ach(?:Movie|Sound|Video|Audio)|ributes)|an(?:2)?) + | dd(?: + header + | RequestHeader + | Menu(?:Item(?:At)?|At)? + | Sort + | Header + | No(?:tice|de(?:At)?) + | C(?:olumn(?:At)?|uePoint) + | T(?:oLocalInternetCache|reeNode(?:At)?) + | I(?:con|tem(?:s(?:At)?|At)?) + | DeltaItem + | P(?:od|age|roperty) + | EventListener + | View + | FieldInfo + | Listener + | Animation + )? + | uto(?:Size|Play|KeyNav|Load) + | pp(?:endChild|ly(?:Changes|Updates)?) + | vHardwareDisable + | fterLoaded + | l(?:ternateRowColors|ign|l(?:ow(?:InsecureDomain|Domain)|Transitions(?:InDone|OutDone))|bum) + | r(?:tist|row|g(?:uments|List)) + | gent + | bs + ) + | r(?: + ight(?:Margin)? + | o(?:ot(?:S(?:creen|lide)|Form)|und|w(?:Height|Count)|llO(?:ut|ver)) + | e(?: + s(?:yncDepth|t(?:orePane|artAnimation|rict)|iz(?:e|able(?:Columns)?)|olveDelta|ult(?:s)?|ponse) + | c(?:o(?:ncile(?:Results|Updates)|rd)|eive(?:Video|Audio)) + | draw + | jectConnection + | place(?:Sel|ItemAt|AllItems)? + | ve(?:al(?:Child)?|rse) + | quest(?:SizeChange|Payment)? + | f(?:errer|resh(?:ScrollContent|Destinations|Pane|FromSources)?) + | lease(?:Outside)? + | ad(?:Only|Access) + | gister(?:SkinElement|C(?:olor(?:Style|Name)|lass)|InheritingStyle|Proxy) + | move(?: + Range + | M(?:ovieClip|enu(?:Item(?:At)?|At)) + | Background + | Sort + | No(?:tice|de(?:sAt|At)?) + | C(?:olum(?:nAt|At)|uePoints) + | T(?:extField|reeNode(?:At)?) + | Item(?:At)? + | Pod + | EventListener + | FromLocalInternetCache + | Listener + | All(?:C(?:olumns|uePoints)|Items)? + ) + ) + | a(?:ndom|te|dioDot) + ) + | g(?: + t + | oto(?:Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(?:Stop|Play)) + | e(?: + nre + | t(?: + R(?:GB|o(?:otNode|wCount)|e(?:sizable|mote)) + | X(?:AxisTitle)? + | M(?: + i(?:n(?:imum(?:Size)?|utes)|lliseconds) + | onth(?:Names)? + | ultilineMode + | e(?:ssage|nu(?:ItemAt|EnabledAt|At)) + | aximum(?:Size)? + ) + | B(?:ytes(?:Total|Loaded)|ounds|utton(?:s|Width)|eginIndex|a(?:ndwidthLimit|ckground)) + | S(?: + howAsDisabled + | croll(?:ing|Speed|Content|Position|barState|Location) + | t(?:yle(?:Names)?|opOnFocus|ate) + | ize + | o(?:urce|rtState) + | p(?:litterBarPosition|acing) + | e(?: + conds + | lect(?:Multiple|ion(?:Required|Type)|Style|ed(?:Node(?:s)?|Cell|Text|I(?:nd(?:ices|ex)|tem(?:s)?))?) + | rvice + ) + | moothness + | WFVersion + ) + | H(?: + ighlight(?:s|Color) + | ours + | e(?:ight|ader(?:Height|Text|Property|Format|Width|Location)?) + | as(?:Shader|CloseBox) + ) + | Y(?:ear|AxisTitle)? + | N(?:o(?:tices|de(?:DisplayedAt|At))|um(?:Children|berAvailable)|e(?:wTextFormat|xtHighestDepth)) + | C(?: + h(?:ild(?:S(?:creen|lide)|Nodes|Form|At)|artTitle) + | o(?:n(?:tent|figInfo)|okie|de|unt|lumn(?:Names|Count|Index|At)) + | uePoint + | ellIndex + | loseHandler + | a(?:ll|retIndex) + ) + | T(?: + ypedValue + | i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:stamp|zoneOffset|out(?:State|Handler)|r)?) + | oggle + | ext(?:Extent|Format)? + | r(?:ee(?:NodeAt|Length)|ans(?:form|actionId)) + ) + | I(?: + s(?:Branch|Open) + | n(?:stanceAtDepth|d(?:icesByKey|exByKey)) + | con(?:SymbolName)? + | te(?:rator|m(?:sByKey|By(?:Name|Key)|id|ID|At)) + | d + ) + | O(?:utput(?:Parameter(?:s|ByName)?|Value(?:s)?)|peration|ri(?:entation|ginalCellData)) + | D(?: + i(?:s(?:play(?:Range|Mode|Clip|Index|edMonth)|kUsage)|rection) + | uration + | e(?:pth|faultNodeIconSymbolName|l(?:taPacket|ay)|bug(?:Config|ID)?) + | a(?: + y(?:OfWeekNames)? + | t(?: + e + | a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Label|All(?:Height|Property|Format|Width))? + ) + ) + | rawConnectors + ) + | U(?: + se(?:Shadow|HandCursor|rInput|Fade) + | RL + | TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear) + ) + | P(?: + o(?:sition|ds) + | ercentComplete + | a(?:n(?:e(?:M(?:inimums|aximums)|Height|Title|Width))?|rentNode) + | r(?:operty(?:Name|Data)?|efer(?:ences|red(?:Height|Width))) + ) + | E(?:n(?:dIndex|abled)|ditingData|x(?:panderSymbolName|andNodeTrigger)) + | V(?:iewed(?:Pods|Applications)|olume|ersion|alue(?:Source)?) + | F(?: + i(?:eld|rst(?:DayOfWeek|VisibleNode)) + | o(?:ntList|cus) + | ullYear + | ade(?:InLength|OutLength) + | rame(?:Color|Width) + ) + | Width + | L(?:ine(?:Color|Weight)|o(?:cal|adTarget)|ength|a(?:stTabIndex|bel(?:Source)?)) + | A(?: + s(?:cii|Boolean|String|Number) + | n(?:yTypedValue|imation) + | ctiv(?:eState(?:Handler)?|ateHandler) + | utoH(?:ideScrollBar|eight) + | llItems + | gent + ) + )? + )? + | lobal(?:StyleFormat|ToLocal)? + | ain + | roupName + ) + | x(?:updatePackety|mlDecl)? + | m(?: + y(?:MethodName|Call) + | in(?:imum)? + | o(?: + nthNames + | tion(?:TimeOut|Level) + | de(?:lChanged)? + | use(?:Move|O(?:ut|ver)|Down(?:Somewhere|Outside)?|Up(?:Somewhere)?|WheelEnabled) + | ve(?:To)? + ) + | u(?:ted|lti(?:pleS(?:imultaneousAllowed|elections)|line)) + | e(?:ssage|nu(?:Show|Hide)?|th(?:od)?|diaType) + | a(?:nufacturer|tch|x(?:scroll|hscroll|imum|HPosition|Chars|VPosition)?) + | b(?:substring|chr|ord|length) + ) + | b(?: + ytes(?:Total|Loaded) + | indFormat(?:Strings|Function) + | o(?:ttom(?:Scroll)?|ld|rder(?:Color)?) + | u(?:tton(?:Height|Width)|iltInItems|ffer(?:Time|Length)|llet) + | e(?:foreApplyUpdates|gin(?:GradientFill|Fill)) + | lockIndent + | a(?:ndwidth|ckground(?:Style|Color|Disabled)?) + | roadcastMessage + ) + | onHTTPStatus + ) + constants: |- + (?x: + __proto__ | __resolve + | _accProps | _alpha + | _changed | _currentframe + | _droptarget + | _flash | _focusrect | _framesloaded + | _global + | _height | _highquality + | _level | _listeners | _lockroot + | _name + | _parent + | _quality + | _root | _rotation + | _soundbuftime + | _target | _totalframes + | _url + | _visible + | _width + | _x | _xmouse | _xscale + | _y | _ymouse | _yscale + ) + keywords: |- + (?x: + break + | case | continue + | do | dynamic + | else | extends + | for + | if | implements | import | in | interface + | new + | private | public + | return + | static | super | switch + | var + | while + ) + types: |- + (?x: + Boolean + | Number + | String + | Void + ) + +###[ Contexts ]######################################################################################################### + contexts: + prototype: + - include: comments + + eol-pop: + - match: '$\n?' + pop: 1 + main: - - match: \b(R(ecordset|DBMSResolver|adioButton(Group)?)|X(ML(Socket|Node|Connector)?|UpdateResolverDataHolder)|M(M(Save|Execute)|icrophoneMicrophone|o(use|vieClip(Loader)?)|e(nu(Bar)?|dia(Controller|Display|Playback))|ath)|B(yName|inding|utton)|S(haredObject|ystem|crollPane|t(yleSheet|age|ream)|ound|e(ndEvent|rviceObject)|OAPCall|lide)|N(umericStepper|et(stream|S(tream|ervices)|Connection|Debug(Config)?))|C(heckBox|o(ntextMenu(Item)?|okie|lor|m(ponentMixins|boBox))|ustomActions|lient|amera)|T(ypedValue|ext(Snapshot|Input|F(ield|ormat)|Area)|ree|AB)|Object|D(ownload|elta(Item|Packet)?|at(e(Chooser|Field)?|a(G(lue|rid)|Set|Type)))|U(RL|TC|IScrollBar)|P(opUpManager|endingCall|r(intJob|o(duct|gressBar)))|E(ndPoint|rror)|Video|Key|F(RadioButton|GridColumn|MessageBox|BarChart|S(croll(Bar|Pane)|tyleFormat|plitView)|orm|C(heckbox|omboBox|alendar)|unction|T(icker|ooltip(Lite)?|ree(Node)?)|IconButton|D(ataGrid|raggablePane)|P(ieChart|ushButton|ro(gressBar|mptBox))|L(i(stBox|neChart)|oadingBox)|AdvancedMessageBox)|W(indow|SDLURL|ebService(Connector)?)|L(ist|o(calConnection|ad(er|Vars)|g)|a(unch|bel))|A(sBroadcaster|cc(ordion|essibility)|S(Set(Native|PropFlags)|N(ew|ative)|C(onstructor|lamp(2)?)|InstanceOf)|pplication|lert|rray))\b - scope: support.class.actionscript.2 - - match: \b(s(h(ift|ow(GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(ow|ePane))|c(hema|ale(X|Mode|Y|Content)|r(oll(Track|Drag)?|een(Resolution|Color|DPI)))|t(yleSheet|op(Drag|A(nimation|llSounds|gent))?|epSize|a(tus|rt(Drag|A(nimation|gent))?))|i(n|ze|lence(TimeOut|Level))|o(ngname|urce|rt(Items(By)?|On(HeaderRelease)?|able(Columns)?)?)|u(ppressInvalidCalls|bstr(ing)?)|p(li(ce|t)|aceCol(umnsEqually|lumnsEqually))|e(nd(DefaultPushButtonEvent|AndLoad)?|curity|t(R(GB|o(otNode|w(Height|Count))|esizable(Columns)?|a(nge|te))|G(ain|roupName)|X(AxisTitle)?|M(i(n(imum|utes)|lliseconds)|o(nth(Names)?|tionLevel|de)|ultilineMode|e(ssage|nu(ItemEnabled(At)?|EnabledAt)|dia)|a(sk|ximum))|B(u(tton(s|Width)|fferTime)|a(seTabIndex|ndwidthLimit|ckground))|S(howAsDisabled|croll(ing|Speed|Content|Target|P(osition|roperties)|barState|Location)|t(yle(Property)?|opOnFocus|at(us|e))|i(ze|lenceLevel)|ort(able(Columns)?|Function)|p(litterBarPosition|acing)|e(conds|lect(Multiple|ion(Required|Type)?|Style|Color|ed(Node(s)?|Cell|I(nd(ices|ex)|tem(s)?))?|able))|kin|m(oothness|allScroll))|H(ighlight(s|Color)|Scroll|o(urs|rizontal)|eader(Symbol|Height|Text|Property|Format|Width|Location)?|as(Shader|CloseBox))|Y(ear|AxisTitle)?|N(ode(Properties|ExpansionHandler)|ewTextFormat)|C(h(ildNodes|a(ngeHandler|rt(Title|EventHandler)))|o(ntent(Size)?|okie|lumns)|ell(Symbol|Data)|l(i(ckHandler|pboard)|oseHandler)|redentials)|T(ype(dVaule)?|i(tle(barHeight)?|p(Target|Offset)?|me(out(Handler)?)?)|oggle|extFormat|ransform)|I(s(Branch|Open)|n(terval|putProperty)|con(SymbolName)?|te(rator|m(ByKey|Symbol)))|Orientation|D(i(splay(Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(pth(Below|To|Above)|fault(GatewayURL|Mappings|NodeIconSymbolName)|l(iveryMode|ay)|bug(ID)?)|a(yOfWeekNames|t(e(Filter)?|a(Mapping(s)?|Item(Text|Property|Format)|Provider|All(Height|Property|Format|Width))?))|ra(wConnectors|gContent))|U(se(Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(osition|ercentComplete|an(e(M(inimumSize|aximumSize)|Size|Title))?|ro(pert(y(Data)?|iesAt)|gress))|E(nabled|dit(Handler|able)|xpand(NodeTrigger|erSymbolName))|V(Scroll|olume|alue(Source)?)|KeyFrameInterval|Quality|F(i(eld|rst(DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(InLength|OutLength)|rame(Color|Width))|Width|L(ine(Color|Weight)|o(opback|adTarget)|a(rgeScroll|bel(Source|Placement)?))|A(s(Boolean|String|Number)|n(yTypedValue|imation)|ctiv(e(State(Handler)?|Handler)|ateHandler)|utoH(ideScrollBar|eight)))?|paratorBefore|ek|lect(ion(Disabled|Unfocused)?|ed(Node(s)?|Child|I(nd(ices|ex)|tem(s)?)|Dat(e|a))?|able(Ranges)?)|rver(String)?)|kip|qrt|wapDepths|lice|aveToSharedObj|moothing)|h(scroll(Policy)?|tml(Text)?|i(t(Test(TextNearPos)?|Area)|de(BuiltInItems|Child)?|ghlight(2D|3D)?)|orizontal|e(ight|ader(Re(nderer|lease)|Height|Text))|P(osition|ageScrollSize)|a(s(childNodes|MP3|S(creen(Broadcast|Playback)|treaming(Video|Audio)|ort)|Next|OwnProperty|Pr(inting|evious)|EmbeddedVideo|VideoEncoder|A(ccesibility|udio(Encoder)?))|ndlerName)|LineScrollSize)|ye(sLabel|ar)|n(o(t|de(Name|Close|Type|Open|Value)|Label)|u(llValue|mChild(S(creens|lides)|ren|Forms))|e(w(Item|line|Value|LocationDialog)|xt(S(cene|ibling|lide)|TabIndex|Value|Frame)?)?|ame(s)?)|c(h(ildNodes|eck|a(nge(sPending)?|r(CodeAt|At))|r)|o(s|n(st(ant|ructor)|nect|c(urrency|at)|t(ent(Type|Path)?|ains|rol(Placement|lerPolicy))|denseWhite|version)|py|l(or|umn(Stretch|Name(s)?|Count))|m(p(onent|lete)|ment))|u(stomItems|ePoint(s)?|r(veTo|Value|rent(Slide|ChildSlide|Item|F(ocused(S(creen|lide)|Form)|ps))))|e(il|ll(Renderer|Press|Edit|Focus(In|Out)))|l(i(ck|ents)|o(se(Button|Pane)?|ne(Node)?)|ear(S(haredObjects|treams)|Timeout|Interval)?)|a(ncelLabel|tch|p(tion|abilities)|l(cFields|l(e(e|r))?))|reate(GatewayConnection|Menu|Se(rver|gment)|C(hild(AtDepth)?|l(ient|ass(ChildAtDepth|Object(AtDepth)?))|all)|Text(Node|Field)|Item|Object(AtDepth)?|PopUp|E(lement|mptyMovieClip)))|t(h(is|row)|ype(of|Name)?|i(tle(StyleDeclaration)?|me(out)?)|o(talTime|String|olTipText|p|UpperCase|ggle(HighQuality)?|Lo(caleString|werCase))|e(st|llTarget|xt(RightMargin|Bold|S(ize|elected)|Height|Color|I(ndent|talic)|Disabled|Underline|F(ield|ont)|Width|LeftMargin|Align)?)|a(n|rget(Path)?|b(Stops|Children|Index|Enabled|leName))|r(y|igger|ac(e|k(AsMenu)?)))|i(s(Running|Branch|NaN|Con(soleOpen|nected)|Toggled|Installed|Open|D(own|ebugger)|P(urchased|ro(totypeOf|pertyEnumerable))|Empty|F(inite|ullyPopulated)|Local|Active)|n(s(tall|ertBefore)|cludeDeltaPacketInfo|t|it(ialize|Component|Pod|A(pplication|gent))?|de(nt|terminate|x(InParent(Slide|Form)?|Of)?)|put|validate|finity|LocalInternetCache)?|con(F(ield|unction))?|t(e(ratorScrolled|m(s|RollO(ut|ver)|ClassName))|alic)|d3|p|fFrameLoaded|gnore(Case|White))|o(s|n(R(ollO(ut|ver)|e(s(ize|ult)|l(ease(Outside)?|aseOutside)))|XML|Mouse(Move|Down|Up|Wheel)|S(ync|croller|tatus|oundComplete|e(tFocus|lect(edItem)?))|N(oticeEvent|etworkChange)|C(hanged|onnect|l(ipEvent|ose))|ID3|D(isconnect|eactivate|ata|ragO(ut|ver))|Un(install|load)|P(aymentResult|ress)|EnterFrame|K(illFocus|ey(Down|Up))|Fault|Lo(ad|g)|A(ctiv(ity|ate)|ppSt(op|art)))?|pe(n|ration)|verLayChildren|kLabel|ldValue|r(d)?)|d(i(s(connect|play(Normal|ed(Month|Year)|Full)|able(Shader|d(Ranges|Days)|CloseBox|Events))|rection)|o(cTypeDecl|tall|Decoding|main|LazyDecoding)|u(plicateMovieClip|ration)|e(stroy(ChildAt|Object)|code|fault(PushButton(Enabled)?|KeydownHandler)?|l(ta(Packet(Changed)?)?|ete(PopUp|All)?)|blocking)|a(shBoardSave|yNames|ta(Provider)?|rkshadow)|r(opdown(Width)?|a(w|gO(ut|ver))))|u(se(Sort|HandCursor|Codepage|EchoSuppression)|n(shift|install|derline|escape|format|watch|lo(ck|ad(Movie(Num)?)?))|pdate(Results|Mode|I(nputProperties|tem(ByIndex)?)|P(acket|roperties)|View|AfterEvent)|rl)|join|p(ixelAspectRatio|o(sition|p|w)|u(sh|rge|blish)|ercen(tComplete|Loaded)|lay(head(Change|Time)|ing|Hidden|erType)?|a(ssword|use|r(se(XML|CSS|Int|Float)|ent(Node|Is(S(creen|lide)|Form))|ams))|r(int(Num|AsBitmap(Num)?)?|o(to(type)?|pert(y|ies)|gress)|e(ss|v(ious(S(ibling|lide)|Value)?|Scene|Frame)|ferred(Height|Width))))|e(scape|n(code(r)?|ter(Frame)?|dFill|able(Shader|d|CloseBox|Events))|dit(able|Field|LocationDialog)|v(ent|al(uate)?)|q|x(tended|p|ec(ute)?|actSettings)|m(phasized(StyleDeclaration)?|bedFonts))|v(i(sible|ewPod)|ScrollPolicy|o(id|lume)|ersion|P(osition|ageScrollSize)|a(l(idat(ionError|e(Property|ActivationKey)?)|ue(Of)?)|riable)|LineScrollSize)|k(ind|ey(Down|Up|Press|FrameInterval))|q(sort|uality)|f(scommand|i(n(d(Text|First|Last)?|ally)|eldInfo|lter(ed|Func)?|rst(Slide|Child|DayOfWeek|VisibleNode)?)|o(nt|cus(In|edCell|Out|Enabled)|r(egroundDisabled|mat(ter)?))|unctionName|ps|l(oor|ush)|ace|romCharCode)|w(i(th|dth)|ordWrap|atch|riteAccess)|l(t|i(st(Owner)?|ne(Style|To))|o(c(k|a(t(ion|eByld)|l(ToGlobal|FileReadDisable)))|opback|ad(Movie(Num)?|S(crollContent|ound)|ed|Variables(Num)?|Application)?|g(Changes)?)|e(ngth|ft(Margin)?|ading)?|a(st(Slide|Child|Index(Of)?)?|nguage|b(el(Placement|F(ield|unction))?|leField)))|a(s(scociate(Controller|Display)|in|pectRatio|function)|nd|c(ceptConnection|tiv(ityLevel|ePlayControl)|os)|t(t(ach(Movie|Sound|Video|Audio)|ributes)|an(2)?)|dd(header|RequestHeader|Menu(Item(At)?|At)?|Sort|Header|No(tice|de(At)?)|C(olumn(At)?|uePoint)|T(oLocalInternetCache|reeNode(At)?)|I(con|tem(s(At)?|At)?)|DeltaItem|P(od|age|roperty)|EventListener|View|FieldInfo|Listener|Animation)?|uto(Size|Play|KeyNav|Load)|pp(endChild|ly(Changes|Updates)?)|vHardwareDisable|fterLoaded|l(ternateRowColors|ign|l(ow(InsecureDomain|Domain)|Transitions(InDone|OutDone))|bum)|r(tist|row|g(uments|List))|gent|bs)|r(ight(Margin)?|o(ot(S(creen|lide)|Form)|und|w(Height|Count)|llO(ut|ver))|e(s(yncDepth|t(orePane|artAnimation|rict)|iz(e|able(Columns)?)|olveDelta|ult(s)?|ponse)|c(o(ncile(Results|Updates)|rd)|eive(Video|Audio))|draw|jectConnection|place(Sel|ItemAt|AllItems)?|ve(al(Child)?|rse)|quest(SizeChange|Payment)?|f(errer|resh(ScrollContent|Destinations|Pane|FromSources)?)|lease(Outside)?|ad(Only|Access)|gister(SkinElement|C(olor(Style|Name)|lass)|InheritingStyle|Proxy)|move(Range|M(ovieClip|enu(Item(At)?|At))|Background|Sort|No(tice|de(sAt|At)?)|C(olum(nAt|At)|uePoints)|T(extField|reeNode(At)?)|Item(At)?|Pod|EventListener|FromLocalInternetCache|Listener|All(C(olumns|uePoints)|Items)?))|a(ndom|te|dioDot))|g(t|oto(Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(Stop|Play))|e(nre|t(R(GB|o(otNode|wCount)|e(sizable|mote))|X(AxisTitle)?|M(i(n(imum(Size)?|utes)|lliseconds)|onth(Names)?|ultilineMode|e(ssage|nu(ItemAt|EnabledAt|At))|aximum(Size)?)|B(ytes(Total|Loaded)|ounds|utton(s|Width)|eginIndex|a(ndwidthLimit|ckground))|S(howAsDisabled|croll(ing|Speed|Content|Position|barState|Location)|t(yle(Names)?|opOnFocus|ate)|ize|o(urce|rtState)|p(litterBarPosition|acing)|e(conds|lect(Multiple|ion(Required|Type)|Style|ed(Node(s)?|Cell|Text|I(nd(ices|ex)|tem(s)?))?)|rvice)|moothness|WFVersion)|H(ighlight(s|Color)|ours|e(ight|ader(Height|Text|Property|Format|Width|Location)?)|as(Shader|CloseBox))|Y(ear|AxisTitle)?|N(o(tices|de(DisplayedAt|At))|um(Children|berAvailable)|e(wTextFormat|xtHighestDepth))|C(h(ild(S(creen|lide)|Nodes|Form|At)|artTitle)|o(n(tent|figInfo)|okie|de|unt|lumn(Names|Count|Index|At))|uePoint|ellIndex|loseHandler|a(ll|retIndex))|T(ypedValue|i(tle(barHeight)?|p(Target|Offset)?|me(stamp|zoneOffset|out(State|Handler)|r)?)|oggle|ext(Extent|Format)?|r(ee(NodeAt|Length)|ans(form|actionId)))|I(s(Branch|Open)|n(stanceAtDepth|d(icesByKey|exByKey))|con(SymbolName)?|te(rator|m(sByKey|By(Name|Key)|id|ID|At))|d)|O(utput(Parameter(s|ByName)?|Value(s)?)|peration|ri(entation|ginalCellData))|D(i(s(play(Range|Mode|Clip|Index|edMonth)|kUsage)|rection)|uration|e(pth|faultNodeIconSymbolName|l(taPacket|ay)|bug(Config|ID)?)|a(y(OfWeekNames)?|t(e|a(Mapping(s)?|Item(Text|Property|Format)|Label|All(Height|Property|Format|Width))?))|rawConnectors)|U(se(Shadow|HandCursor|rInput|Fade)|RL|TC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Da(y|te)|FullYear))|P(o(sition|ds)|ercentComplete|a(n(e(M(inimums|aximums)|Height|Title|Width))?|rentNode)|r(operty(Name|Data)?|efer(ences|red(Height|Width))))|E(n(dIndex|abled)|ditingData|x(panderSymbolName|andNodeTrigger))|V(iewed(Pods|Applications)|olume|ersion|alue(Source)?)|F(i(eld|rst(DayOfWeek|VisibleNode))|o(ntList|cus)|ullYear|ade(InLength|OutLength)|rame(Color|Width))|Width|L(ine(Color|Weight)|o(cal|adTarget)|ength|a(stTabIndex|bel(Source)?))|A(s(cii|Boolean|String|Number)|n(yTypedValue|imation)|ctiv(eState(Handler)?|ateHandler)|utoH(ideScrollBar|eight)|llItems|gent))?)?|lobal(StyleFormat|ToLocal)?|ain|roupName)|x(updatePackety|mlDecl)?|m(y(MethodName|Call)|in(imum)?|o(nthNames|tion(TimeOut|Level)|de(lChanged)?|use(Move|O(ut|ver)|Down(Somewhere|Outside)?|Up(Somewhere)?|WheelEnabled)|ve(To)?)|u(ted|lti(pleS(imultaneousAllowed|elections)|line))|e(ssage|nu(Show|Hide)?|th(od)?|diaType)|a(nufacturer|tch|x(scroll|hscroll|imum|HPosition|Chars|VPosition)?)|b(substring|chr|ord|length))|b(ytes(Total|Loaded)|indFormat(Strings|Function)|o(ttom(Scroll)?|ld|rder(Color)?)|u(tton(Height|Width)|iltInItems|ffer(Time|Length)|llet)|e(foreApplyUpdates|gin(GradientFill|Fill))|lockIndent|a(ndwidth|ckground(Style|Color|Disabled)?)|roadcastMessage)|onHTTPStatus)\b - scope: support.function.actionscript.2 - - match: \b(__proto__|__resolve|_accProps|_alpha|_changed|_currentframe|_droptarget|_flash|_focusrect|_framesloaded|_global|_height|_highquality|_level|_listeners|_lockroot|_name|_parent|_quality|_root|_rotation|_soundbuftime|_target|_totalframes|_url|_visible|_width|_x|_xmouse|_xscale|_y|_ymouse|_yscale)\b - scope: support.constant.actionscript.2 - - match: \b(dynamic|extends|import|implements|interface|public|private|new|static|super|var|for|in|break|continue|while|do|return|if|else|case|switch)\b - scope: keyword.control.actionscript.2 - - match: \b(Boolean|Number|String|Void)\b - scope: storage.type.actionscript.2 - - match: \b(null|undefined|true|false)\b - scope: constant.language.actionscript.2 - - match: '\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\b' - scope: constant.numeric.actionscript.2 - - match: '"' - captures: - 0: punctuation.definition.string.begin.actionscript.2 - push: - - meta_scope: string.quoted.double.actionscript.2 - - match: '"' - captures: - 0: punctuation.definition.string.end.actionscript.2 - pop: true - - match: \\. - scope: constant.character.escape.actionscript.2 - - match: "'" - captures: - 0: punctuation.definition.string.begin.actionscript.2 - push: - - meta_scope: string.quoted.single.actionscript.2 - - match: "'" - captures: - 0: punctuation.definition.string.end.actionscript.2 - pop: true - - match: \\. - scope: constant.character.escape.actionscript.2 - - match: \b(BACKSPACE|CAPSLOCK|CONTROL|DELETEKEY|DOWN|END|ENTER|HOME|INSERT|LEFT|LN10|LN2|LOG10E|LOG2E|MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|NaN|PGDN|PGUP|PI|POSITIVE_INFINITY|RIGHT|SPACE|SQRT1_2|SQRT2|UP)\b - scope: support.constant.actionscript.2 - - match: /\* - captures: - 0: punctuation.definition.comment.actionscript.2 - push: - - meta_scope: comment.block.actionscript.2 - - match: \*/ - captures: - 0: punctuation.definition.comment.actionscript.2 - pop: true - - match: ^\s*(\*)(?!/) - captures: - 1: punctuation.definition.comment.actionscript.2 - - match: (//).*$\n? - scope: comment.line.double-slash.actionscript.2 - captures: - 1: punctuation.definition.comment.actionscript.2 - - match: \b(instanceof)\b - scope: keyword.operator.actionscript.2 + - match: \b(?:{{classes}})\b + scope: support.class.actionscript + + - match: \b(?:{{functions}})\b + scope: support.function.actionscript + + - match: \b(?:{{constants}})\b + scope: support.constant.actionscript + + - match: \b(?:{{keywords}})\b + scope: keyword.control.actionscript + + - match: \b(?:{{types}})\b + scope: storage.type.actionscript + + - match: |- + (?x: + \b(?: + null | undefined + | true | false + )\b + ) + scope: constant.language.actionscript + + - match: |- + (?x: + \b + (?: + (?:0(?:x|X)[0-9a-fA-F]*) + | (?: + (?:[0-9]+\.?[0-9]*) + | (?:\.[0-9]+) + ) + (?: + (?:e|E) + (?:\+|-)? + [0-9]+ + )? + ) + (?:L|l|UL|ul|u|U|F|f)? + \b + ) + scope: constant.numeric.actionscript + + - include: strings + + - match: |- + (?x: + \b(?: + BACKSPACE + | CAPSLOCK | CONTROL + | DELETEKEY | DOWN + | END | ENTER + | HOME + | INSERT + | LEFT | LN10 | LN2 | LOG10E | LOG2E + | MAX_VALUE | MIN_VALUE + | NEGATIVE_INFINITY | NaN + | PGDN | PGUP | PI | POSITIVE_INFINITY + | RIGHT + | SPACE | SQRT1_2 | SQRT2 + | UP + )\b + ) + scope: support.constant.actionscript + + - match: \b(?:instanceof)\b + scope: keyword.operator.actionscript + - match: "[-!%&*+=/?:]" - scope: keyword.operator.symbolic.actionscript.2 + scope: keyword.operator.symbolic.actionscript + - match: '^[ \t]*(#)[a-zA-Z]+' - scope: meta.preprocessor.actionscript.2 + scope: meta.preprocessor.actionscript captures: - 1: punctuation.definition.preprocessor.actionscript.2 + 1: punctuation.definition.preprocessor.actionscript + - match: '\b(function)\s+([a-zA-Z_]\w*)\s*(\()' captures: - 1: keyword.declaration.function.actionscript.2 - 2: entity.name.function.actionscript.2 - 3: punctuation.definition.parameters.begin.actionscript.2 + 1: keyword.declaration.function.actionscript + 2: entity.name.function.actionscript + 3: punctuation.definition.parameters.begin.actionscript push: - - meta_scope: meta.function.actionscript.2 + - meta_scope: meta.function.actionscript - match: \) - captures: - 0: punctuation.definition.parameters.end.actionscript.2 - pop: true + scope: punctuation.definition.parameters.end.actionscript + pop: 1 - match: '[^,)\n]+' - scope: variable.parameter.function.actionscript.2 + scope: variable.parameter.function.actionscript + - match: '\b(class)\s+([a-zA-Z_](?:\w|\.)*)(?:\s+(extends)\s+([a-zA-Z_](?:\w|\.)*))?' - scope: meta.class.actionscript.2 + scope: meta.class.actionscript + captures: + 1: keyword.declaration.class.actionscript + 2: entity.name.type.class.actionscript + 3: storage.modifier.extends.actionscript + 4: entity.other.inherited-class.actionscript + + comments: + - include: block-comments + - include: line-comments + + block-comments: + - include: block-comment-basic + + block-comment-basic: + - match: /\* + scope: punctuation.definition.comment.begin.actionscript + push: block-comment-basic-content + + block-comment-basic-content: + - meta_include_prototype: false + - meta_scope: comment.block.actionscript + + - match: \*/ + scope: punctuation.definition.comment.end.actionscript + pop: 1 + + - match: ^\s*(\*)(?!/) captures: - 1: keyword.declaration.class.actionscript.2 - 2: entity.name.type.class.actionscript.2 - 3: storage.modifier.extends.actionscript.2 - 4: entity.other.inherited-class.actionscript.2 + 1: punctuation.definition.comment.actionscript + + line-comments: + - include: line-comment-double-slash + + line-comment-double-slash: + - match: // + scope: punctuation.definition.comment.actionscript + push: line-comment-double-slash-content + + line-comment-double-slash-content: + - meta_include_prototype: false + - meta_scope: comment.line.double-slash.actionscript + + - include: eol-pop + + strings: + - include: double-quoted-strings + - include: single-quoted-strings + + double-quoted-strings: + - match: \" + scope: punctuation.definition.string.begin.actionscript + push: double-quoted-string-content + + double-quoted-string-content: + - meta_include_prototype: false + - meta_scope: string.quoted.double.actionscript + + - match: \" + scope: punctuation.definition.string.end.actionscript + pop: 1 + + - match: \\. + scope: constant.character.escape.actionscript + + single-quoted-strings: + - match: \' + scope: punctuation.definition.string.begin.actionscript + push: single-quoted-string-content + + single-quoted-string-content: + - meta_include_prototype: false + - meta_scope: string.quoted.single.actionscript + + - match: \' + scope: punctuation.definition.string.end.actionscript + pop: 1 + + - match: \\. + scope: constant.character.escape.actionscript From 644e44a7f4e6005724198b21e3db7aad0cd2b219 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sun, 13 Nov 2022 23:25:16 +0100 Subject: [PATCH 02/29] [ActionScript] fix test --- ActionScript/syntax_test_as.as | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActionScript/syntax_test_as.as b/ActionScript/syntax_test_as.as index 97a9ade072..dce7ff2e73 100644 --- a/ActionScript/syntax_test_as.as +++ b/ActionScript/syntax_test_as.as @@ -2,4 +2,4 @@ /** * -/* ^ comment.block.actionscript.2 punctuation.definition.comment.actionscript.2 */ \ No newline at end of file +/* ^ comment.block.actionscript punctuation.definition.comment.actionscript */ From fffd402ea5cfd55fc54651085be8307d8137aaf3 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sun, 13 Nov 2022 23:56:06 +0100 Subject: [PATCH 03/29] [ActionScript] update build file --- ActionScript/ActionScript.sublime-build | 26 ++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/ActionScript/ActionScript.sublime-build b/ActionScript/ActionScript.sublime-build index 4532cea652..9b2d1c463e 100644 --- a/ActionScript/ActionScript.sublime-build +++ b/ActionScript/ActionScript.sublime-build @@ -1,12 +1,16 @@ { - "selector": "source.actionscript", - "cmd": [ - "mxmlc", - "${file}", - "-library-path+=${project_path}/libs", - "-output", "${project_path}/bin/${project_base_name}.swf", - "-debug=false", - "-static-link-runtime-shared-libraries=true" - ], - "file_regex": "^(.+?)\\(([0-9]+)\\): col: (([0-9]+))(.*)$" -} \ No newline at end of file + "selector": "source.actionscript", + "file_patterns": [ + "*.as" + ], + "cmd": [ + "mxmlc", + "${file}", + "-library-path+=${project_path}/libs", + "-output", "${project_path}/bin/${project_base_name}.swf", + "-debug=false", + "-static-link-runtime-shared-libraries=true" + ], + "cancel": { "kill": true }, + "file_regex": "^(.+?)\\(([0-9]+)\\): col: (([0-9]+))(.*)$" +} From ef8b621942512f42b67513b76905b9c82a52b33e Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sun, 20 Nov 2022 00:55:40 +0100 Subject: [PATCH 04/29] Update ActionScript.sublime-syntax --- ActionScript/ActionScript.sublime-syntax | 132 +++++++++++++---------- 1 file changed, 76 insertions(+), 56 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index fab2ceb3b1..62e7cc982f 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -696,13 +696,6 @@ variables: ###[ Contexts ]######################################################################################################### contexts: - prototype: - - include: comments - - eol-pop: - - match: '$\n?' - pop: 1 - main: - match: \b(?:{{classes}})\b scope: support.class.actionscript @@ -719,57 +712,10 @@ contexts: - match: \b(?:{{types}})\b scope: storage.type.actionscript - - match: |- - (?x: - \b(?: - null | undefined - | true | false - )\b - ) - scope: constant.language.actionscript - - - match: |- - (?x: - \b - (?: - (?:0(?:x|X)[0-9a-fA-F]*) - | (?: - (?:[0-9]+\.?[0-9]*) - | (?:\.[0-9]+) - ) - (?: - (?:e|E) - (?:\+|-)? - [0-9]+ - )? - ) - (?:L|l|UL|ul|u|U|F|f)? - \b - ) - scope: constant.numeric.actionscript + - include: constants - include: strings - - match: |- - (?x: - \b(?: - BACKSPACE - | CAPSLOCK | CONTROL - | DELETEKEY | DOWN - | END | ENTER - | HOME - | INSERT - | LEFT | LN10 | LN2 | LOG10E | LOG2E - | MAX_VALUE | MIN_VALUE - | NEGATIVE_INFINITY | NaN - | PGDN | PGUP | PI | POSITIVE_INFINITY - | RIGHT - | SPACE | SQRT1_2 | SQRT2 - | UP - )\b - ) - scope: support.constant.actionscript - - match: \b(?:instanceof)\b scope: keyword.operator.actionscript @@ -788,9 +734,11 @@ contexts: 3: punctuation.definition.parameters.begin.actionscript push: - meta_scope: meta.function.actionscript + - match: \) scope: punctuation.definition.parameters.end.actionscript pop: 1 + - match: '[^,)\n]+' scope: variable.parameter.function.actionscript @@ -802,9 +750,14 @@ contexts: 3: storage.modifier.extends.actionscript 4: entity.other.inherited-class.actionscript + prototype: + - include: comments + +###[ Comments ]######################################################################################################### + comments: - - include: block-comments - include: line-comments + - include: block-comments block-comments: - include: block-comment-basic @@ -840,6 +793,8 @@ contexts: - include: eol-pop +###[ Strings ]########################################################################################################## + strings: - include: double-quoted-strings - include: single-quoted-strings @@ -875,3 +830,68 @@ contexts: - match: \\. scope: constant.character.escape.actionscript + +###[ Constants ]######################################################################################################## + + constants: + - include: language-constants + - include: numeric-constants + - include: keyboard-input-constants + + language-constants: + - match: |- + (?x: + \b(?: + null | undefined + | true | false + )\b + ) + scope: constant.language.actionscript + + numeric-constants: + - match: |- + (?x: + \b + (?: + (?:0(?:x|X)[0-9a-fA-F]*) + | (?: + (?:[0-9]+\.?[0-9]*) + | (?:\.[0-9]+) + ) + (?: + (?:e|E) + (?:\+|-)? + [0-9]+ + )? + ) + (?:L|l|UL|ul|u|U|F|f)? + \b + ) + scope: constant.numeric.actionscript + + keyboard-input-constants: + - match: |- + (?x: + \b(?: + BACKSPACE + | CAPSLOCK | CONTROL + | DELETEKEY | DOWN + | END | ENTER + | HOME + | INSERT + | LEFT | LN10 | LN2 | LOG10E | LOG2E + | MAX_VALUE | MIN_VALUE + | NEGATIVE_INFINITY | NaN + | PGDN | PGUP | PI | POSITIVE_INFINITY + | RIGHT + | SPACE | SQRT1_2 | SQRT2 + | UP + )\b + ) + scope: support.constant.actionscript + +###[ Prototypes ]####################################################################################################### + + eol-pop: + - match: '$\n?' + pop: 1 From b20d13cd9f30eb4888701ecb1fd6e5ca3788530a Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sun, 20 Nov 2022 01:34:35 +0100 Subject: [PATCH 05/29] [ActionScript] add some tests --- ActionScript/syntax_test_as.as | 90 ++++++++++++++++++++++++++++++++-- 1 file changed, 87 insertions(+), 3 deletions(-) diff --git a/ActionScript/syntax_test_as.as b/ActionScript/syntax_test_as.as index dce7ff2e73..0cd53664d9 100644 --- a/ActionScript/syntax_test_as.as +++ b/ActionScript/syntax_test_as.as @@ -1,5 +1,89 @@ -/* SYNTAX TEST "Packages/ActionScript/ActionScript.sublime-syntax" */ +// SYNTAX TEST "Packages/ActionScript/ActionScript.sublime-syntax" + +// <- source.actionscript + +// this is a comment +// <- comment.line.double-slash punctuation.definition.comment + // <- comment.line.double-slash punctuation.definition.comment +//^^^^^^^^^^^^^^^^^^ comment.line.double-slash + +// // this is a comment, not a comment within a comment +// <- comment.line.double-slash punctuation.definition.comment + // <- comment.line.double-slash punctuation.definition.comment +//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - comment.line.double-slash comment.line.double-slash + +// /* this is a comment, not a comment within a comment */ +// <- comment.line.double-slash punctuation.definition.comment + // <- comment.line.double-slash punctuation.definition.comment +//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - comment.line.double-slash comment.block + +/* comment block */ +// <- comment.block punctuation.definition.comment.begin + // <- comment.block punctuation.definition.comment.begin +//^^^^^^^^^^^^^^^^^ comment.block +// ^^ comment.block punctuation.definition.comment.end + + +/* // comment block */ +// <- comment.block punctuation.definition.comment.begin + // <- comment.block punctuation.definition.comment.begin +//^^^^^^^^^^^^^^^^^^^^ comment.block +// ^^^^^^^^^^^^^^^^^^^ - comment.block comment.line.double-slash +// ^^ comment.block punctuation.definition.comment.end /** - * -/* ^ comment.block.actionscript punctuation.definition.comment.actionscript */ + * + // <- comment.block punctuation.definition.comment +*/ + + + + class com.example.Greeter extends MovieClip +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.class +// ^^^^^ meta.class keyword.declaration.class +// ^^^^^^^^^^^^^^^^^^^ meta.class entity.name.type +// ^^^^^^^ meta.class storage.modifier.extends +// ^^^^^^^^^ meta.class entity.other.inherited-class + { + public function Greeter() +// ^^^^^^ keyword.control +// ^^^^^^^^^^^^^^^^^^ meta.function +// ^^^^^^^^ meta.function keyword.declaration.function +// ^^^^^^^ meta.function entity.name.function +// ^ meta.function punctuation.definition.parameters.begin +// ^ meta.function punctuation.definition.parameters.end + { + var txtHello: TextField = this.createTextField("txtHello", 0, 0, 0, 100, 100); +// ^^^ keyword.control +// ^ keyword.operator.symbolic +// ^^^^^^^^^ support.class +// ^ keyword.operator.symbolic +// ^^^^ support.function +// ^^^^^^^^^^^^^^^ support.function +// ^^^^^^^^^^ string.quoted.double +// ^ string.quoted.double punctuation.definition.string.begin +// ^ string.quoted.double punctuation.definition.string.end +// ^ constant.numeric + txtHello.text = "Hello, world"; + } + } + + + private function getFunctionName(e:Error):String { +// ^^^^^^^ meta.function variable.parameter +// ^ keyword.operator.symbolic +// ^^^^^^ storage.type + var stackTrace:String = e.getStackTrace(); // entire stack trace + var startIndex:int = stackTrace.indexOf("at "); // start of first line + var endIndex:int = stackTrace.indexOf("()"); // end of function name + + return stackTrace.substring(startIndex + 3, endIndex); +// ^^^^^^ keyword.control + } + + private function on_applicationComplete(event:FlexEvent):void { + trace(getFunctionName(new Error()); +// ^^^ keyword.control + } From add6a42e66fa51003cfa7568e328f7f6fef75ef1 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sun, 20 Nov 2022 01:43:13 +0100 Subject: [PATCH 06/29] Update syntax_test_as.as --- ActionScript/syntax_test_as.as | 53 +++++++++++++++------------------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/ActionScript/syntax_test_as.as b/ActionScript/syntax_test_as.as index 0cd53664d9..2fd09b1c9e 100644 --- a/ActionScript/syntax_test_as.as +++ b/ActionScript/syntax_test_as.as @@ -2,41 +2,36 @@ // <- source.actionscript -// this is a comment -// <- comment.line.double-slash punctuation.definition.comment - // <- comment.line.double-slash punctuation.definition.comment -//^^^^^^^^^^^^^^^^^^ comment.line.double-slash + // this is a comment +// ^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash +// ^^ comment.line.double-slash punctuation.definition.comment -// // this is a comment, not a comment within a comment -// <- comment.line.double-slash punctuation.definition.comment - // <- comment.line.double-slash punctuation.definition.comment -//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - comment.line.double-slash comment.line.double-slash + // // this is a comment, not a comment within a comment +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash +// ^^ comment.line.double-slash punctuation.definition.comment +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - comment.line.double-slash comment.line.double-slash -// /* this is a comment, not a comment within a comment */ -// <- comment.line.double-slash punctuation.definition.comment - // <- comment.line.double-slash punctuation.definition.comment -//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - comment.line.double-slash comment.block + // /* this is a comment, not a comment within a comment */ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash +// ^^ comment.line.double-slash punctuation.definition.comment +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - comment.line.double-slash comment.block -/* comment block */ -// <- comment.block punctuation.definition.comment.begin - // <- comment.block punctuation.definition.comment.begin -//^^^^^^^^^^^^^^^^^ comment.block -// ^^ comment.block punctuation.definition.comment.end + /* comment block */ +// ^^^^^^^^^^^^^^^^^^^ comment.block +// ^^ comment.block punctuation.definition.comment.begin +// ^^ comment.block punctuation.definition.comment.end -/* // comment block */ -// <- comment.block punctuation.definition.comment.begin - // <- comment.block punctuation.definition.comment.begin -//^^^^^^^^^^^^^^^^^^^^ comment.block -// ^^^^^^^^^^^^^^^^^^^ - comment.block comment.line.double-slash -// ^^ comment.block punctuation.definition.comment.end + /* // comment block */ +// ^^^^^^^^^^^^^^^^^^^^^^ comment.block +// ^^ comment.block punctuation.definition.comment.begin +// ^^^^^^^^^^^^^^^^^^^ - comment.block comment.line.double-slash +// ^^ comment.block punctuation.definition.comment.end -/** - * - // <- comment.block punctuation.definition.comment -*/ + /** + * +// ^ comment.block punctuation.definition.comment + */ From 16c0bc8a0bf7255274a2126836e16c39ede94cab Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Thu, 8 Dec 2022 00:01:38 +0100 Subject: [PATCH 07/29] Update ActionScript.sublime-syntax --- ActionScript/ActionScript.sublime-syntax | 102 ++++++++++++----------- 1 file changed, 54 insertions(+), 48 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 62e7cc982f..c21ad99ffd 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -12,7 +12,7 @@ first_line_match: |- ^ \s* // .*? -\*- .*? \baction-?script\b .*? -\*- # editorconfig ) -###[ Variables ]######################################################################################################## +##[ Variables ]######################################################################################################### variables: classes: |- @@ -692,8 +692,37 @@ variables: | String | Void ) + constant_numeric_exponent: |- + (?x: + [eE] + [-+]?? + \d+ + ) + constant_keyboard_inputs: |- + (?x: + BACKSPACE + | CAPSLOCK | CONTROL + | DELETEKEY | DOWN + | END | ENTER + | HOME + | INSERT + | LEFT | LN10 | LN2 | LOG10E | LOG2E + | MAX_VALUE | MIN_VALUE + | NEGATIVE_INFINITY | NaN + | PGDN | PGUP | PI | POSITIVE_INFINITY + | RIGHT + | SPACE | SQRT1_2 | SQRT2 + | UP + ) + constant_language: |- + (?x: + null + | undefined + | true + | false + ) -###[ Contexts ]######################################################################################################### +##[ Contexts ]########################################################################################################## contexts: main: @@ -719,7 +748,7 @@ contexts: - match: \b(?:instanceof)\b scope: keyword.operator.actionscript - - match: "[-!%&*+=/?:]" + - match: '[-!%&*+=/?:]' scope: keyword.operator.symbolic.actionscript - match: '^[ \t]*(#)[a-zA-Z]+' @@ -753,7 +782,7 @@ contexts: prototype: - include: comments -###[ Comments ]######################################################################################################### +##[ Comments ]########################################################################################################## comments: - include: line-comments @@ -793,7 +822,7 @@ contexts: - include: eol-pop -###[ Strings ]########################################################################################################## +##[ Strings ]########################################################################################################### strings: - include: double-quoted-strings @@ -831,7 +860,7 @@ contexts: - match: \\. scope: constant.character.escape.actionscript -###[ Constants ]######################################################################################################## +##[ Constants ]######################################################################################################### constants: - include: language-constants @@ -839,58 +868,35 @@ contexts: - include: keyboard-input-constants language-constants: - - match: |- - (?x: - \b(?: - null | undefined - | true | false - )\b - ) + - match: \b{{constant_language}}\b scope: constant.language.actionscript numeric-constants: + - match: ([-+]??)(0[xX])(\h*)(L|l|UL|ul|u|U|F|f)? + scope: meta.number.integer.hexadecimal.actionscript + captures: + 1: constant.numeric.sign.actionscript + 2: constant.numeric.base.actionscript + 3: constant.numeric.value.actionscript + 4: constant.numeric.suffix.actionscript + - match: |- (?x: - \b - (?: - (?:0(?:x|X)[0-9a-fA-F]*) - | (?: - (?:[0-9]+\.?[0-9]*) - | (?:\.[0-9]+) - ) - (?: - (?:e|E) - (?:\+|-)? - [0-9]+ - )? - ) - (?:L|l|UL|ul|u|U|F|f)? - \b + (\d+\.?\d*|\.\d+) + ({{constant_numeric_exponent}})? + (L|l|UL|ul|u|U|F|f)? ) - scope: constant.numeric.actionscript + scope: meta.number.actionscript + captures: + 1: constant.numeric.value.actionscript + 2: constant.numeric.actionscript + 3: constant.numeric.suffix.actionscript keyboard-input-constants: - - match: |- - (?x: - \b(?: - BACKSPACE - | CAPSLOCK | CONTROL - | DELETEKEY | DOWN - | END | ENTER - | HOME - | INSERT - | LEFT | LN10 | LN2 | LOG10E | LOG2E - | MAX_VALUE | MIN_VALUE - | NEGATIVE_INFINITY | NaN - | PGDN | PGUP | PI | POSITIVE_INFINITY - | RIGHT - | SPACE | SQRT1_2 | SQRT2 - | UP - )\b - ) + - match: \b{{constant_keyboard_inputs}}\b scope: support.constant.actionscript -###[ Prototypes ]####################################################################################################### +##[ Prototypes ]######################################################################################################## eol-pop: - match: '$\n?' From efa05f049d962776ea153a909d6c1fcf346b3609 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Thu, 8 Dec 2022 19:57:11 +0100 Subject: [PATCH 08/29] Update ActionScript/ActionScript.sublime-syntax Co-authored-by: deathaxe --- ActionScript/ActionScript.sublime-syntax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index c21ad99ffd..3d6da2a66d 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -835,7 +835,7 @@ contexts: double-quoted-string-content: - meta_include_prototype: false - - meta_scope: string.quoted.double.actionscript + - meta_scope: meta.string.actionscript string.quoted.double.actionscript - match: \" scope: punctuation.definition.string.end.actionscript From 7b7763a6e7bcd5d6d084c61e5548cec2f55491ab Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Thu, 8 Dec 2022 19:57:24 +0100 Subject: [PATCH 09/29] Update ActionScript/ActionScript.sublime-syntax Co-authored-by: deathaxe --- ActionScript/ActionScript.sublime-syntax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 3d6da2a66d..494629152f 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -851,7 +851,7 @@ contexts: single-quoted-string-content: - meta_include_prototype: false - - meta_scope: string.quoted.single.actionscript + - meta_scope: meta.string.actionscript string.quoted.single.actionscript - match: \' scope: punctuation.definition.string.end.actionscript From c4595d766ce0650c3102cd8ea476ebd2e7ce942c Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Thu, 8 Dec 2022 19:57:37 +0100 Subject: [PATCH 10/29] Update ActionScript/ActionScript.sublime-syntax Co-authored-by: deathaxe --- ActionScript/ActionScript.sublime-syntax | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 494629152f..fd6f5dbf6f 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -872,13 +872,12 @@ contexts: scope: constant.language.actionscript numeric-constants: - - match: ([-+]??)(0[xX])(\h*)(L|l|UL|ul|u|U|F|f)? + - match: (0[xX])(\h*)(L|l|UL|ul|u|U|F|f)? scope: meta.number.integer.hexadecimal.actionscript captures: - 1: constant.numeric.sign.actionscript - 2: constant.numeric.base.actionscript - 3: constant.numeric.value.actionscript - 4: constant.numeric.suffix.actionscript + 1: constant.numeric.base.actionscript + 2: constant.numeric.value.actionscript + 3: constant.numeric.suffix.actionscript - match: |- (?x: From b43ece0ece2448f4df991e2830ee4f9e12c99732 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Thu, 8 Dec 2022 20:03:16 +0100 Subject: [PATCH 11/29] Update ActionScript/ActionScript.sublime-syntax Co-authored-by: deathaxe --- ActionScript/ActionScript.sublime-syntax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index fd6f5dbf6f..68f02aaa47 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -12,7 +12,7 @@ first_line_match: |- ^ \s* // .*? -\*- .*? \baction-?script\b .*? -\*- # editorconfig ) -##[ Variables ]######################################################################################################### +##[ VARIABLES ]################################################################ variables: classes: |- From 01f6d77499126799f8cfab337a54d9bbc04f48b1 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 10:04:06 +0100 Subject: [PATCH 12/29] Update ActionScript.sublime-syntax --- ActionScript/ActionScript.sublime-syntax | 67 ++++++++++-------------- 1 file changed, 28 insertions(+), 39 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 68f02aaa47..991c1cd8c4 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -12,7 +12,7 @@ first_line_match: |- ^ \s* // .*? -\*- .*? \baction-?script\b .*? -\*- # editorconfig ) -##[ VARIABLES ]################################################################ +###[ VARIABLES ]################################################################ variables: classes: |- @@ -695,7 +695,7 @@ variables: constant_numeric_exponent: |- (?x: [eE] - [-+]?? + [-+]? \d+ ) constant_keyboard_inputs: |- @@ -714,15 +714,8 @@ variables: | SPACE | SQRT1_2 | SQRT2 | UP ) - constant_language: |- - (?x: - null - | undefined - | true - | false - ) -##[ Contexts ]########################################################################################################## +###[ CONTEXTS ]################################################################# contexts: main: @@ -732,8 +725,7 @@ contexts: - match: \b(?:{{functions}})\b scope: support.function.actionscript - - match: \b(?:{{constants}})\b - scope: support.constant.actionscript + - include: constants - match: \b(?:{{keywords}})\b scope: keyword.control.actionscript @@ -741,8 +733,6 @@ contexts: - match: \b(?:{{types}})\b scope: storage.type.actionscript - - include: constants - - include: strings - match: \b(?:instanceof)\b @@ -782,21 +772,18 @@ contexts: prototype: - include: comments -##[ Comments ]########################################################################################################## +###[ COMMENTS ]################################################################# comments: - - include: line-comments - - include: block-comments - - block-comments: - - include: block-comment-basic + - include: line-comment + - include: block-comment - block-comment-basic: + block-comment: - match: /\* scope: punctuation.definition.comment.begin.actionscript - push: block-comment-basic-content + push: block-comment-content - block-comment-basic-content: + block-comment-content: - meta_include_prototype: false - meta_scope: comment.block.actionscript @@ -808,21 +795,18 @@ contexts: captures: 1: punctuation.definition.comment.actionscript - line-comments: - - include: line-comment-double-slash - - line-comment-double-slash: + line-comment: - match: // scope: punctuation.definition.comment.actionscript - push: line-comment-double-slash-content + push: line-comment-content - line-comment-double-slash-content: + line-comment-content: - meta_include_prototype: false - meta_scope: comment.line.double-slash.actionscript - include: eol-pop -##[ Strings ]########################################################################################################### +###[ STRINGS ]################################################################## strings: - include: double-quoted-strings @@ -860,16 +844,25 @@ contexts: - match: \\. scope: constant.character.escape.actionscript -##[ Constants ]######################################################################################################### +###[ CONSTANTS ]################################################################ constants: - include: language-constants - include: numeric-constants - - include: keyboard-input-constants language-constants: - - match: \b{{constant_language}}\b - scope: constant.language.actionscript + - match: \b(?:false|true)\b + scope: constant.language.boolean.actionscript + - match: \b(?:null)\b + scope: constant.language.null.actionscript + - match: \b(?:undefined)\b + scope: constant.language.undefined.actionscript + + - match: \b(?:{{constants}})\b + scope: support.constant.actionscript + + - match: \b(?:{{constant_keyboard_inputs}})\b + scope: support.constant.actionscript numeric-constants: - match: (0[xX])(\h*)(L|l|UL|ul|u|U|F|f)? @@ -891,11 +884,7 @@ contexts: 2: constant.numeric.actionscript 3: constant.numeric.suffix.actionscript - keyboard-input-constants: - - match: \b{{constant_keyboard_inputs}}\b - scope: support.constant.actionscript - -##[ Prototypes ]######################################################################################################## +###[ PROTOTYPES ]############################################################### eol-pop: - match: '$\n?' From 5198b890984eac9bf86211d2cccb5cae6f9e22d4 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 10:18:37 +0100 Subject: [PATCH 13/29] Update ActionScript.sublime-syntax --- ActionScript/ActionScript.sublime-syntax | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 991c1cd8c4..6fa47568da 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -698,6 +698,10 @@ variables: [-+]? \d+ ) + constant_numeric_suffix: |- + (?x: + L|l|UL|ul|u|U|F|f + ) constant_keyboard_inputs: |- (?x: BACKSPACE @@ -819,7 +823,9 @@ contexts: double-quoted-string-content: - meta_include_prototype: false - - meta_scope: meta.string.actionscript string.quoted.double.actionscript + - meta_scope: >- + meta.string.actionscript + string.quoted.double.actionscript - match: \" scope: punctuation.definition.string.end.actionscript @@ -835,7 +841,9 @@ contexts: single-quoted-string-content: - meta_include_prototype: false - - meta_scope: meta.string.actionscript string.quoted.single.actionscript + - meta_scope: >- + meta.string.actionscript + string.quoted.single.actionscript - match: \' scope: punctuation.definition.string.end.actionscript @@ -865,7 +873,7 @@ contexts: scope: support.constant.actionscript numeric-constants: - - match: (0[xX])(\h*)(L|l|UL|ul|u|U|F|f)? + - match: (0[xX])(\h*)({{constant_numeric_suffix}})? scope: meta.number.integer.hexadecimal.actionscript captures: 1: constant.numeric.base.actionscript @@ -876,7 +884,7 @@ contexts: (?x: (\d+\.?\d*|\.\d+) ({{constant_numeric_exponent}})? - (L|l|UL|ul|u|U|F|f)? + ({{constant_numeric_suffix}})? ) scope: meta.number.actionscript captures: From fb742116352c9a67760874172fb40e4a68ca8375 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 12:29:04 +0100 Subject: [PATCH 14/29] Update ActionScript/ActionScript.sublime-syntax Co-authored-by: deathaxe --- ActionScript/ActionScript.sublime-syntax | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 6fa47568da..148c912ec5 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -686,12 +686,7 @@ variables: | while ) types: |- - (?x: - Boolean - | Number - | String - | Void - ) + (?x: Boolean | Number | String | Void ) constant_numeric_exponent: |- (?x: [eE] From 269bd1651c630cd45d3a8cf99b84034ee5569b61 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 12:29:19 +0100 Subject: [PATCH 15/29] Update ActionScript/ActionScript.sublime-syntax Co-authored-by: deathaxe --- ActionScript/ActionScript.sublime-syntax | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 148c912ec5..f2f319c2e0 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -688,11 +688,7 @@ variables: types: |- (?x: Boolean | Number | String | Void ) constant_numeric_exponent: |- - (?x: - [eE] - [-+]? - \d+ - ) + (?x: [eE] [-+]? \d+ ) constant_numeric_suffix: |- (?x: L|l|UL|ul|u|U|F|f From fde72e873bee58bc9cb95be8f06cb91c4751b8fc Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 12:29:34 +0100 Subject: [PATCH 16/29] Update ActionScript/ActionScript.sublime-syntax Co-authored-by: deathaxe --- ActionScript/ActionScript.sublime-syntax | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index f2f319c2e0..179226cf85 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -690,9 +690,7 @@ variables: constant_numeric_exponent: |- (?x: [eE] [-+]? \d+ ) constant_numeric_suffix: |- - (?x: - L|l|UL|ul|u|U|F|f - ) + (?x: L | l | UL | ul | U | u | F | f ) constant_keyboard_inputs: |- (?x: BACKSPACE From 79d06b2e5dbec97f033adba85dc91906069e1273 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 12:29:56 +0100 Subject: [PATCH 17/29] Update ActionScript/ActionScript.sublime-syntax Co-authored-by: deathaxe --- ActionScript/ActionScript.sublime-syntax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 179226cf85..9fa306ef4b 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -712,7 +712,7 @@ variables: contexts: main: - - match: \b(?:{{classes}})\b + - match: \b{{classes}}\b scope: support.class.actionscript - match: \b(?:{{functions}})\b From 65afe84fb02bea7ff37b0a574882f9e64cd28a65 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 12:30:06 +0100 Subject: [PATCH 18/29] Update ActionScript/ActionScript.sublime-syntax Co-authored-by: deathaxe --- ActionScript/ActionScript.sublime-syntax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 9fa306ef4b..9f03fcf790 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -728,7 +728,7 @@ contexts: - include: strings - - match: \b(?:instanceof)\b + - match: \binstanceof\b scope: keyword.operator.actionscript - match: '[-!%&*+=/?:]' From 6c931d825d25b214adbb99e7f78a4f9bd1cee174 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 12:36:18 +0100 Subject: [PATCH 19/29] Update ActionScript.sublime-syntax --- ActionScript/ActionScript.sublime-syntax | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 9f03fcf790..8010898623 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -715,15 +715,15 @@ contexts: - match: \b{{classes}}\b scope: support.class.actionscript - - match: \b(?:{{functions}})\b + - match: \b{{functions}}\b scope: support.function.actionscript - include: constants - - match: \b(?:{{keywords}})\b + - match: \b{{keywords}}\b scope: keyword.control.actionscript - - match: \b(?:{{types}})\b + - match: \b{{types}}\b scope: storage.type.actionscript - include: strings @@ -855,10 +855,10 @@ contexts: - match: \b(?:undefined)\b scope: constant.language.undefined.actionscript - - match: \b(?:{{constants}})\b + - match: \b{{constants}}\b scope: support.constant.actionscript - - match: \b(?:{{constant_keyboard_inputs}})\b + - match: \b{{constant_keyboard_inputs}}\b scope: support.constant.actionscript numeric-constants: From 0dd35dc2caeaf573834d4c204641579d20991b09 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 13:15:58 +0100 Subject: [PATCH 20/29] Update ActionScript.sublime-syntax --- ActionScript/ActionScript.sublime-syntax | 106 +++++++++++++++++++---- 1 file changed, 90 insertions(+), 16 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 8010898623..be2e0b25d8 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -701,7 +701,7 @@ variables: | INSERT | LEFT | LN10 | LN2 | LOG10E | LOG2E | MAX_VALUE | MIN_VALUE - | NEGATIVE_INFINITY | NaN + | NEGATIVE_INFINITY | PGDN | PGUP | PI | POSITIVE_INFINITY | RIGHT | SPACE | SQRT1_2 | SQRT2 @@ -731,8 +731,7 @@ contexts: - match: \binstanceof\b scope: keyword.operator.actionscript - - match: '[-!%&*+=/?:]' - scope: keyword.operator.symbolic.actionscript + - include: keyword-operators - match: '^[ \t]*(#)[a-zA-Z]+' scope: meta.preprocessor.actionscript @@ -771,6 +770,17 @@ contexts: - include: line-comment - include: block-comment + line-comment: + - match: // + scope: punctuation.definition.comment.actionscript + push: line-comment-content + + line-comment-content: + - meta_include_prototype: false + - meta_scope: comment.line.double-slash.actionscript + + - include: eol-pop + block-comment: - match: /\* scope: punctuation.definition.comment.begin.actionscript @@ -788,17 +798,6 @@ contexts: captures: 1: punctuation.definition.comment.actionscript - line-comment: - - match: // - scope: punctuation.definition.comment.actionscript - push: line-comment-content - - line-comment-content: - - meta_include_prototype: false - - meta_scope: comment.line.double-slash.actionscript - - - include: eol-pop - ###[ STRINGS ]################################################################## strings: @@ -820,8 +819,7 @@ contexts: scope: punctuation.definition.string.end.actionscript pop: 1 - - match: \\. - scope: constant.character.escape.actionscript + - include: string-escape-characters single-quoted-strings: - match: \' @@ -838,6 +836,9 @@ contexts: scope: punctuation.definition.string.end.actionscript pop: 1 + - include: string-escape-characters + + string-escape-characters: - match: \\. scope: constant.character.escape.actionscript @@ -855,6 +856,14 @@ contexts: - match: \b(?:undefined)\b scope: constant.language.undefined.actionscript + - match: ([-]?)(Infinity) + scope: meta.number.float.decimal.actionscript + captures: + 1: constant.numeric.sign.actionscript + 2: constant.language.infinity.actionscript + - match: \b(?:NaN)\b + scope: constant.language.nan.actionscript + - match: \b{{constants}}\b scope: support.constant.actionscript @@ -881,6 +890,71 @@ contexts: 2: constant.numeric.actionscript 3: constant.numeric.suffix.actionscript +###[ KEYWORD OPERATORS ]######################################################## + + keyword-operators: + - include: keyword-operator-bitwise-shift + - include: keyword-operator-relational + - include: keyword-operator-arithmetic + - include: keyword-operator-logical + - include: keyword-operator-bitwise + - include: keyword-operator-comparison + - include: keyword-operator-assignment + + keyword-operator-bitwise-shift: + - match: '<<' + scope: keyword.operator.bitwise.shift.left.signed.actionscript + - match: '>>' + scope: keyword.operator.bitwise.shift.right.signed.actionscript + + keyword-operator-relational: + - match: '<=' + scope: keyword.operator.relational.less-equal.actionscript + - match: '>=' + scope: keyword.operator.relational.greater-equal.actionscript + - match: '<' + scope: keyword.operator.relational.less.actionscript + - match: '>' + scope: keyword.operator.relational.greater.actionscript + + keyword-operator-arithmetic: + - match: '\+\+' + scope: keyword.operator.arithmetic.increment.actionscript + - match: '\-\-' + scope: keyword.operator.arithmetic.decrement.actionscript + - match: '[%*+\/\-]' + scope: keyword.operator.arithmetic.actionscript + + keyword-operator-logical: + - match: '&&' + scope: keyword.operator.logical.and.actionscript + - match: '\|\|' + scope: keyword.operator.logical.or.actionscript + - match: '!(?!=)' + scope: keyword.operator.logical.not.actionscript + + keyword-operator-bitwise: + - match: '~' + scope: keyword.operator.bitwise.not.actionscript + - match: '\^' + scope: keyword.operator.bitwise.xor.actionscript + - match: '&' + scope: keyword.operator.bitwise.and.actionscript + - match: '\|' + scope: keyword.operator.bitwise.or.actionscript + + keyword-operator-comparison: + - match: '==' + scope: keyword.operator.comparison.equal.value.actionscript + - match: '!=' + scope: keyword.operator.comparison.not-equal.value.actionscript + + keyword-operator-assignment: + - match: '[%*+\/\-]=' + scope: keyword.operator.assignment.augmented.actionscript + - match: '=' + scope: keyword.operator.assignment.actionscript + ###[ PROTOTYPES ]############################################################### eol-pop: From dd7a70b8068a96a89fbb8f13ca7aafdef867943a Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 13:18:42 +0100 Subject: [PATCH 21/29] Update ActionScript.sublime-build --- ActionScript/ActionScript.sublime-build | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ActionScript/ActionScript.sublime-build b/ActionScript/ActionScript.sublime-build index 9b2d1c463e..d276e29640 100644 --- a/ActionScript/ActionScript.sublime-build +++ b/ActionScript/ActionScript.sublime-build @@ -1,8 +1,4 @@ { - "selector": "source.actionscript", - "file_patterns": [ - "*.as" - ], "cmd": [ "mxmlc", "${file}", @@ -11,6 +7,6 @@ "-debug=false", "-static-link-runtime-shared-libraries=true" ], - "cancel": { "kill": true }, + "selector": "source.actionscript", "file_regex": "^(.+?)\\(([0-9]+)\\): col: (([0-9]+))(.*)$" } From 74204a4b5098dc7bbd7a6af0f4ca71ba6104804a Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Sat, 10 Dec 2022 20:33:11 +0100 Subject: [PATCH 22/29] Update ActionScript.sublime-syntax --- ActionScript/ActionScript.sublime-syntax | 53 +++++++++++++++++++----- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index be2e0b25d8..76483b17a5 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -651,18 +651,14 @@ variables: constants: |- (?x: __proto__ | __resolve - | _accProps | _alpha + | _alpha | _changed | _currentframe | _droptarget - | _flash | _focusrect | _framesloaded - | _global - | _height | _highquality - | _level | _listeners | _lockroot + | _flash | _framesloaded + | _height + | _listeners | _lockroot | _name - | _parent - | _quality - | _root | _rotation - | _soundbuftime + | _rotation | _target | _totalframes | _url | _visible @@ -670,6 +666,10 @@ variables: | _x | _xmouse | _xscale | _y | _ymouse | _yscale ) + properties_global: |- + (?x: _accProps | _focusrect | _global | _level | _parent | _quality | _root | _soundbuftime | this) + deprecated_properties_global: |- + (?x: _highquality | maxscroll | scroll) keywords: |- (?x: break @@ -864,7 +864,10 @@ contexts: - match: \b(?:NaN)\b scope: constant.language.nan.actionscript - - match: \b{{constants}}\b + - match: \b{{deprecated_properties_global}}\b + scope: invalid.deprecated.properties-global.actionscript + + - match: \b(?:{{constants}}|{{properties_global}})\b scope: support.constant.actionscript - match: \b{{constant_keyboard_inputs}}\b @@ -893,17 +896,33 @@ contexts: ###[ KEYWORD OPERATORS ]######################################################## keyword-operators: + - include: keyword-operator-assignment-bitwise-shift - include: keyword-operator-bitwise-shift - include: keyword-operator-relational - include: keyword-operator-arithmetic - include: keyword-operator-logical + - include: keyword-operator-assignment-bitwise - include: keyword-operator-bitwise - include: keyword-operator-comparison - include: keyword-operator-assignment + keyword-operator-assignment-bitwise-shift: + - match: '<<<=' + scope: keyword.operator.assignment.bitwise.shift.left.unsigned.actionscript + - match: '<<=' + scope: keyword.operator.assignment.bitwise.shift.left.signed.actionscript + - match: '>>>=' + scope: keyword.operator.assignment.bitwise.shift.right.unsigned.actionscript + - match: '>>=' + scope: keyword.operator.assignment.bitwise.shift.right.signed.actionscript + keyword-operator-bitwise-shift: + - match: '<<<' + scope: keyword.operator.bitwise.shift.left.unsigned.actionscript - match: '<<' scope: keyword.operator.bitwise.shift.left.signed.actionscript + - match: '>>>' + scope: keyword.operator.bitwise.shift.right.unsigned.actionscript - match: '>>' scope: keyword.operator.bitwise.shift.right.signed.actionscript @@ -933,6 +952,16 @@ contexts: - match: '!(?!=)' scope: keyword.operator.logical.not.actionscript + keyword-operator-assignment-bitwise: + - match: '~=' + scope: keyword.operator.assignment.bitwise.not.actionscript + - match: '\^=' + scope: keyword.operator.assignment.bitwise.xor.actionscript + - match: '&=' + scope: keyword.operator.assignment.bitwise.and.actionscript + - match: '\|=' + scope: keyword.operator.assignment.bitwise.or.actionscript + keyword-operator-bitwise: - match: '~' scope: keyword.operator.bitwise.not.actionscript @@ -944,8 +973,12 @@ contexts: scope: keyword.operator.bitwise.or.actionscript keyword-operator-comparison: + - match: '===' + scope: keyword.operator.comparison.equal.value.strict.actionscript - match: '==' scope: keyword.operator.comparison.equal.value.actionscript + - match: '!==' + scope: keyword.operator.comparison.not-equal.value.strict.actionscript - match: '!=' scope: keyword.operator.comparison.not-equal.value.actionscript From 00aed39475909cad625a342765a0f2ad94917c17 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Fri, 23 Dec 2022 00:59:42 +0100 Subject: [PATCH 23/29] Update ActionScript.sublime-syntax --- ActionScript/ActionScript.sublime-syntax | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 76483b17a5..089ffd5ad4 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -896,25 +896,25 @@ contexts: ###[ KEYWORD OPERATORS ]######################################################## keyword-operators: - - include: keyword-operator-assignment-bitwise-shift + - include: keyword-operator-assignment-augmented-bitwise-shift - include: keyword-operator-bitwise-shift - include: keyword-operator-relational - include: keyword-operator-arithmetic - include: keyword-operator-logical - - include: keyword-operator-assignment-bitwise + - include: keyword-operator-assignment-augmented-bitwise - include: keyword-operator-bitwise - include: keyword-operator-comparison - include: keyword-operator-assignment - keyword-operator-assignment-bitwise-shift: + keyword-operator-assignment-augmented-bitwise-shift: - match: '<<<=' - scope: keyword.operator.assignment.bitwise.shift.left.unsigned.actionscript + scope: keyword.operator.assignment.augmented.bitwise.shift.left.unsigned.actionscript - match: '<<=' - scope: keyword.operator.assignment.bitwise.shift.left.signed.actionscript + scope: keyword.operator.assignment.augmented.bitwise.shift.left.signed.actionscript - match: '>>>=' - scope: keyword.operator.assignment.bitwise.shift.right.unsigned.actionscript + scope: keyword.operator.assignment.augmented.bitwise.shift.right.unsigned.actionscript - match: '>>=' - scope: keyword.operator.assignment.bitwise.shift.right.signed.actionscript + scope: keyword.operator.assignment.augmented.bitwise.shift.right.signed.actionscript keyword-operator-bitwise-shift: - match: '<<<' @@ -952,15 +952,15 @@ contexts: - match: '!(?!=)' scope: keyword.operator.logical.not.actionscript - keyword-operator-assignment-bitwise: + keyword-operator-assignment-augmented-bitwise: - match: '~=' - scope: keyword.operator.assignment.bitwise.not.actionscript + scope: keyword.operator.assignment.augmented.bitwise.not.actionscript - match: '\^=' - scope: keyword.operator.assignment.bitwise.xor.actionscript + scope: keyword.operator.assignment.augmented.bitwise.xor.actionscript - match: '&=' - scope: keyword.operator.assignment.bitwise.and.actionscript + scope: keyword.operator.assignment.augmented.bitwise.and.actionscript - match: '\|=' - scope: keyword.operator.assignment.bitwise.or.actionscript + scope: keyword.operator.assignment.augmented.bitwise.or.actionscript keyword-operator-bitwise: - match: '~' From 610b1c598cd139fa76594aae21a3f1639c44c316 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Fri, 23 Dec 2022 01:01:53 +0100 Subject: [PATCH 24/29] Update syntax_test_as.as --- ActionScript/syntax_test_as.as | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ActionScript/syntax_test_as.as b/ActionScript/syntax_test_as.as index 2fd09b1c9e..73b84d4db1 100644 --- a/ActionScript/syntax_test_as.as +++ b/ActionScript/syntax_test_as.as @@ -52,9 +52,8 @@ { var txtHello: TextField = this.createTextField("txtHello", 0, 0, 0, 100, 100); // ^^^ keyword.control -// ^ keyword.operator.symbolic // ^^^^^^^^^ support.class -// ^ keyword.operator.symbolic +// ^ keyword.operator.assignment // ^^^^ support.function // ^^^^^^^^^^^^^^^ support.function // ^^^^^^^^^^ string.quoted.double @@ -68,7 +67,6 @@ private function getFunctionName(e:Error):String { // ^^^^^^^ meta.function variable.parameter -// ^ keyword.operator.symbolic // ^^^^^^ storage.type var stackTrace:String = e.getStackTrace(); // entire stack trace var startIndex:int = stackTrace.indexOf("at "); // start of first line From c5bc3856e792d6d213b901cde9d1b1644001c0e7 Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Mon, 23 Jan 2023 12:27:37 +0100 Subject: [PATCH 25/29] Update ActionScript.sublime-syntax --- ActionScript/ActionScript.sublime-syntax | 110 ++++++++++++++++++----- 1 file changed, 86 insertions(+), 24 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index 089ffd5ad4..cd40474187 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -9,7 +9,7 @@ file_extensions: first_line_match: |- (?xi: - ^ \s* // .*? -\*- .*? \baction-?script\b .*? -\*- # editorconfig + ^ \s* // .*? -\*- .*? \baction-?script\b .*? -\*- # editorconfig ) ###[ VARIABLES ]################################################################ @@ -711,6 +711,10 @@ variables: ###[ CONTEXTS ]################################################################# contexts: + + prototype: + - include: comments + main: - match: \b{{classes}}\b scope: support.class.actionscript @@ -723,14 +727,10 @@ contexts: - match: \b{{keywords}}\b scope: keyword.control.actionscript - - match: \b{{types}}\b - scope: storage.type.actionscript + - include: types - include: strings - - match: \binstanceof\b - scope: keyword.operator.actionscript - - include: keyword-operators - match: '^[ \t]*(#)[a-zA-Z]+' @@ -761,16 +761,13 @@ contexts: 3: storage.modifier.extends.actionscript 4: entity.other.inherited-class.actionscript - prototype: - - include: comments - ###[ COMMENTS ]################################################################# comments: - - include: line-comment - - include: block-comment + - include: line-comments + - include: block-comments - line-comment: + line-comments: - match: // scope: punctuation.definition.comment.actionscript push: line-comment-content @@ -781,7 +778,7 @@ contexts: - include: eol-pop - block-comment: + block-comments: - match: /\* scope: punctuation.definition.comment.begin.actionscript push: block-comment-content @@ -849,29 +846,47 @@ contexts: - include: numeric-constants language-constants: + - include: valid-language-constants + - include: invalid-language-constants + + valid-language-constants: - match: \b(?:false|true)\b scope: constant.language.boolean.actionscript + - match: \b(?:null)\b scope: constant.language.null.actionscript + - match: \b(?:undefined)\b scope: constant.language.undefined.actionscript - - match: ([-]?)(Infinity) - scope: meta.number.float.decimal.actionscript - captures: - 1: constant.numeric.sign.actionscript - 2: constant.language.infinity.actionscript - match: \b(?:NaN)\b scope: constant.language.nan.actionscript - - match: \b{{deprecated_properties_global}}\b - scope: invalid.deprecated.properties-global.actionscript + - match: (?:(\+)|([-]?))(Infinity) + scope: meta.number.float.decimal.actionscript + captures: + 1: invalid.illegal.constant-numeric-sign.actionscript + 2: constant.numeric.sign.actionscript + 3: constant.language.infinity.actionscript - - match: \b(?:{{constants}}|{{properties_global}})\b + - match: |- + (?x: + \b(?: + {{constants}} + | {{properties_global}} + | {{constant_keyboard_inputs}} + )\b + ) scope: support.constant.actionscript - - match: \b{{constant_keyboard_inputs}}\b - scope: support.constant.actionscript + invalid-language-constants: + - match: \b{{deprecated_properties_global}}\b + scope: invalid.deprecated.properties-global.actionscript + + # when erroneously containing upper or lower case letters + # where they don't belong + - match: \b(?i:false|true|null|undefined|nan)\b + scope: invalid.illegal.expected-language-constant.actionscript numeric-constants: - match: (0[xX])(\h*)({{constant_numeric_suffix}})? @@ -896,6 +911,9 @@ contexts: ###[ KEYWORD OPERATORS ]######################################################## keyword-operators: + - match: \b(?:instanceof)\b + scope: keyword.operator.actionscript + - include: keyword-operator-assignment-augmented-bitwise-shift - include: keyword-operator-bitwise-shift - include: keyword-operator-relational @@ -906,88 +924,132 @@ contexts: - include: keyword-operator-comparison - include: keyword-operator-assignment + - include: invalid-operators + + invalid-operators: + - match: \b(?:and|not|or)\b + scope: invalid.deprecated.keyword-operator-logical.actionscript + + - match: \b(?:le|lt|ge|gt)\b + scope: invalid.deprecated.keyword-operator-relational.actionscript + + - match: \b(?:eq|ne)\b + scope: invalid.deprecated.keyword-operator-comparison.actionscript + + - match: \b(?:add)\b + scope: invalid.deprecated.keyword-operator-arithmetic.actionscript + keyword-operator-assignment-augmented-bitwise-shift: - match: '<<<=' scope: keyword.operator.assignment.augmented.bitwise.shift.left.unsigned.actionscript + - match: '<<=' scope: keyword.operator.assignment.augmented.bitwise.shift.left.signed.actionscript + - match: '>>>=' scope: keyword.operator.assignment.augmented.bitwise.shift.right.unsigned.actionscript + - match: '>>=' scope: keyword.operator.assignment.augmented.bitwise.shift.right.signed.actionscript keyword-operator-bitwise-shift: - match: '<<<' scope: keyword.operator.bitwise.shift.left.unsigned.actionscript + - match: '<<' scope: keyword.operator.bitwise.shift.left.signed.actionscript + - match: '>>>' scope: keyword.operator.bitwise.shift.right.unsigned.actionscript + - match: '>>' scope: keyword.operator.bitwise.shift.right.signed.actionscript keyword-operator-relational: - match: '<=' scope: keyword.operator.relational.less-equal.actionscript + - match: '>=' scope: keyword.operator.relational.greater-equal.actionscript + - match: '<' scope: keyword.operator.relational.less.actionscript + - match: '>' scope: keyword.operator.relational.greater.actionscript keyword-operator-arithmetic: - match: '\+\+' scope: keyword.operator.arithmetic.increment.actionscript + - match: '\-\-' scope: keyword.operator.arithmetic.decrement.actionscript - - match: '[%*+\/\-]' + + - match: '[%*+\/\-](?!=)' scope: keyword.operator.arithmetic.actionscript keyword-operator-logical: - match: '&&' scope: keyword.operator.logical.and.actionscript + - match: '\|\|' scope: keyword.operator.logical.or.actionscript + - match: '!(?!=)' scope: keyword.operator.logical.not.actionscript keyword-operator-assignment-augmented-bitwise: - match: '~=' scope: keyword.operator.assignment.augmented.bitwise.not.actionscript + - match: '\^=' scope: keyword.operator.assignment.augmented.bitwise.xor.actionscript + - match: '&=' scope: keyword.operator.assignment.augmented.bitwise.and.actionscript + - match: '\|=' scope: keyword.operator.assignment.augmented.bitwise.or.actionscript keyword-operator-bitwise: - match: '~' scope: keyword.operator.bitwise.not.actionscript + - match: '\^' scope: keyword.operator.bitwise.xor.actionscript + - match: '&' scope: keyword.operator.bitwise.and.actionscript + - match: '\|' scope: keyword.operator.bitwise.or.actionscript keyword-operator-comparison: - match: '===' scope: keyword.operator.comparison.equal.value.strict.actionscript + - match: '==' scope: keyword.operator.comparison.equal.value.actionscript + - match: '!==' scope: keyword.operator.comparison.not-equal.value.strict.actionscript + - match: '!=' scope: keyword.operator.comparison.not-equal.value.actionscript keyword-operator-assignment: - match: '[%*+\/\-]=' scope: keyword.operator.assignment.augmented.actionscript + - match: '=' scope: keyword.operator.assignment.actionscript +###[ TYPES ]#################################################################### + + types: + - match: \b(?:{{types}})\b + scope: storage.type.actionscript + ###[ PROTOTYPES ]############################################################### eol-pop: From aa6ae1e7bb945b8108120a1009fb250de7f67fbb Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Mon, 23 Jan 2023 13:10:09 +0100 Subject: [PATCH 26/29] Update syntax_test_as.as --- ActionScript/syntax_test_as.as | 108 +++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/ActionScript/syntax_test_as.as b/ActionScript/syntax_test_as.as index 73b84d4db1..254db2c9ec 100644 --- a/ActionScript/syntax_test_as.as +++ b/ActionScript/syntax_test_as.as @@ -2,6 +2,12 @@ // <- source.actionscript + + +///[ COMMENTS ]///////////////////////////////////////////////////////////////// + + + // this is a comment // ^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash // ^^ comment.line.double-slash punctuation.definition.comment @@ -35,6 +41,103 @@ +///[ STRINGS ]////////////////////////////////////////////////////////////////// + + + + // strings + + + +///[ TYPES ]////////////////////////////////////////////////////////////////// + + + + var typeBoolean:Boolean = true; +// ^^^^^^^ storage.type + + var typeNumber:Number = 0; +// ^^^^^^ storage.type + + var typeString:String = "some text"; +// ^^^^^^ storage.type + + var typeVoid:Void; +// ^^^^ storage.type + + var typeArray:Array = [1, 2, 3]; +// ^^^^^ support.class + + var typeArray:Object = { one: 1, two: 2 }; +// ^^^^^^ support.class + + + +///[ CONSTANTS ]//////////////////////////////////////////////////////////////// + + + + var isFalse:Boolean = false; +// ^^^^^ constant.language.boolean + + var isTrue:Boolean = true; +// ^^^^ constant.language.boolean + + var isUndefined = undefined; +// ^^^^^^^^^ constant.language.undefined + + var isNull = null; +// ^^^^ constant.language.null + + var isNan = NaN; +// ^^^ constant.language.nan + + var isInfinity = Infinity; +// ^^^^^^^^ meta.number.float.decimal +// ^^^^^^^^ constant.language.infinity + + var isNegInfinity = -Infinity; +// ^^^^^^^^^ meta.number.float.decimal +// ^ constant.numeric.sign +// ^^^^^^^^ constant.language.infinity + + var isPosInfinity = +Infinity; +// ^^^^^^^^^ meta.number.float.decimal +// ^ invalid.illegal.constant-numeric-sign +// ^^^^^^^^ constant.language.infinity + + + +///[ NUMBERS ]////////////////////////////////////////////////////////////////// + + + + var intZero:Number = 0; + var intNine:Number = 9; + + var intNegZero:Number = -0; + var intNegNine:Number = -9; + + var floatZero:Number = 0.0; + var floatNine:Number = 9.0; + + var floatNegZero:Number = -0.0; + var floatNegNine:Number = -9.0; + + + +///[ OPERATORS ]//////////////////////////////////////////////////////////////// + + + + // operators + + + +///[ CLASSES ]////////////////////////////////////////////////////////////////// + + + class com.example.Greeter extends MovieClip // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.class // ^^^^^ meta.class keyword.declaration.class @@ -65,6 +168,11 @@ } + +///[ FUNCTIONS ]//////////////////////////////////////////////////////////////// + + + private function getFunctionName(e:Error):String { // ^^^^^^^ meta.function variable.parameter // ^^^^^^ storage.type From a7de20788f577d06152c3f78ce6314989c28a9dd Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Mon, 23 Jan 2023 13:28:09 +0100 Subject: [PATCH 27/29] Update ActionScript.sublime-syntax --- ActionScript/ActionScript.sublime-syntax | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ActionScript/ActionScript.sublime-syntax b/ActionScript/ActionScript.sublime-syntax index cd40474187..c2fdf1aa49 100644 --- a/ActionScript/ActionScript.sublime-syntax +++ b/ActionScript/ActionScript.sublime-syntax @@ -686,7 +686,7 @@ variables: | while ) types: |- - (?x: Boolean | Number | String | Void ) + (?x: Array | Boolean | Number | Object | String | Void ) constant_numeric_exponent: |- (?x: [eE] [-+]? \d+ ) constant_numeric_suffix: |- @@ -1047,8 +1047,10 @@ contexts: ###[ TYPES ]#################################################################### types: - - match: \b(?:{{types}})\b - scope: storage.type.actionscript + - match: (:)({{types}}) + captures: + 1: punctuation.separator.actionscript + 2: storage.type.actionscript ###[ PROTOTYPES ]############################################################### From 3e360a8839fcfa60b917a7ef2a33a1012408f1ab Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Mon, 23 Jan 2023 13:28:55 +0100 Subject: [PATCH 28/29] Update syntax_test_as.as --- ActionScript/syntax_test_as.as | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ActionScript/syntax_test_as.as b/ActionScript/syntax_test_as.as index 254db2c9ec..d2bc04479f 100644 --- a/ActionScript/syntax_test_as.as +++ b/ActionScript/syntax_test_as.as @@ -66,10 +66,10 @@ // ^^^^ storage.type var typeArray:Array = [1, 2, 3]; -// ^^^^^ support.class +// ^^^^^ storage.type var typeArray:Object = { one: 1, two: 2 }; -// ^^^^^^ support.class +// ^^^^^^ storage.type From 638620f3a8749edb15b2d60fcd2e3de2c0fa399c Mon Sep 17 00:00:00 2001 From: Johannes Rappen Date: Mon, 23 Jan 2023 13:30:12 +0100 Subject: [PATCH 29/29] Update syntax_test_as.as --- ActionScript/syntax_test_as.as | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ActionScript/syntax_test_as.as b/ActionScript/syntax_test_as.as index d2bc04479f..4739e78bde 100644 --- a/ActionScript/syntax_test_as.as +++ b/ActionScript/syntax_test_as.as @@ -68,8 +68,8 @@ var typeArray:Array = [1, 2, 3]; // ^^^^^ storage.type - var typeArray:Object = { one: 1, two: 2 }; -// ^^^^^^ storage.type + var typeObject:Object = { one: 1, two: 2 }; +// ^^^^^^ storage.type