github-linguist 5.2.0 → 5.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/annotation.liquidhaskell.haskell.json +1445 -0
  3. data/grammars/hint.haskell.json +134 -17
  4. data/grammars/hint.message.haskell.json +134 -17
  5. data/grammars/hint.type.haskell.json +134 -17
  6. data/grammars/source.abl.json +48 -48
  7. data/grammars/source.afm.json +8 -1
  8. data/grammars/source.angelscript.json +195 -0
  9. data/grammars/source.ats.json +128 -58
  10. data/grammars/source.awk.json +138 -138
  11. data/grammars/source.ballerina.json +434 -0
  12. data/grammars/source.chapel.json +1 -1
  13. data/grammars/source.clips.json +20 -20
  14. data/grammars/source.cobol.json +4 -3
  15. data/grammars/source.coffee.json +556 -109
  16. data/grammars/source.cs.json +10 -5
  17. data/grammars/source.csound-document.json +1 -1
  18. data/grammars/source.csound-score.json +9 -9
  19. data/grammars/source.csound.json +23 -28
  20. data/grammars/source.css.json +6 -5
  21. data/grammars/source.data-weave.json +1584 -0
  22. data/grammars/source.elixir.json +3 -61
  23. data/grammars/source.elm.json +88 -88
  24. data/grammars/source.emacs.lisp.json +12 -1
  25. data/grammars/source.haskell.json +134 -17
  26. data/grammars/source.hsig.json +1376 -0
  27. data/grammars/source.httpspec.json +128 -128
  28. data/grammars/source.jison.json +6 -14
  29. data/grammars/source.jisonlex.json +1 -9
  30. data/grammars/source.js.json +1 -0
  31. data/grammars/source.js.regexp.json +0 -4
  32. data/grammars/source.js.regexp.replacement.json +0 -4
  33. data/grammars/source.jsdoc.json +3 -3
  34. data/grammars/source.lsl.json +146 -53
  35. data/grammars/source.mercury.json +166 -166
  36. data/grammars/source.ne.json +108 -0
  37. data/grammars/source.nim_filter.json +51 -51
  38. data/grammars/source.nut.json +266 -0
  39. data/grammars/source.opal.json +112 -112
  40. data/grammars/source.opalsysdefs.json +16 -16
  41. data/grammars/source.pan.json +1 -1
  42. data/grammars/source.papyrus.skyrim.json +720 -720
  43. data/grammars/source.pawn.json +2 -2
  44. data/grammars/source.prolog.eclipse.json +42 -42
  45. data/grammars/source.prolog.json +41 -41
  46. data/grammars/source.purescript.json +41 -25
  47. data/grammars/source.python.json +47 -34
  48. data/grammars/source.racket.json +54 -54
  49. data/grammars/source.reason.json +37 -3
  50. data/grammars/source.regexp.python.json +31 -0
  51. data/grammars/source.ruby.gemfile.json +27 -0
  52. data/grammars/source.ruby.json +1057 -356
  53. data/grammars/source.rust.json +1 -1
  54. data/grammars/source.sbt.json +13 -3
  55. data/grammars/source.scala.json +74 -55
  56. data/grammars/source.shaderlab.json +1 -1
  57. data/grammars/source.shell.json +26 -21
  58. data/grammars/source.shen.json +91 -91
  59. data/grammars/source.sqf.json +1 -1
  60. data/grammars/source.supercollider.json +1 -1
  61. data/grammars/source.swift.json +4 -0
  62. data/grammars/source.terra.json +36 -37
  63. data/grammars/source.terraform.json +98 -98
  64. data/grammars/source.ts.json +2231 -1677
  65. data/grammars/source.tsx.json +142 -3520
  66. data/grammars/source.vbnet.json +201 -263
  67. data/grammars/source.viml.json +2 -2
  68. data/grammars/source.wdl.json +200 -0
  69. data/grammars/source.yaml.json +34 -16
  70. data/grammars/text.find-refs.json +3 -3
  71. data/grammars/text.haml.json +1 -1
  72. data/grammars/text.html.abl.json +6 -6
  73. data/grammars/text.html.erb.json +8 -11
  74. data/grammars/text.html.php.blade.json +256 -220
  75. data/grammars/text.html.vue.json +1 -1
  76. data/grammars/text.slim.json +31 -17
  77. data/grammars/text.tex.latex.haskell.json +150 -33
  78. data/lib/linguist/heuristics.rb +8 -0
  79. data/lib/linguist/languages.json +1 -1
  80. data/lib/linguist/languages.yml +82 -26
  81. data/lib/linguist/samples.json +134512 -132868
  82. data/lib/linguist/vendor.yml +3 -0
  83. data/lib/linguist/version.rb +1 -1
  84. metadata +13 -4
@@ -1,9 +1,5 @@
1
1
  {
2
2
  "scopeName": "source.js.regexp.replacement",
3
- "name": "Regular Expression Replacement (JavaScript)",
4
- "fileTypes": [
5
-
6
- ],
7
3
  "patterns": [
8
4
  {
9
5
  "include": "#regexp-replacement"
@@ -224,7 +224,7 @@
224
224
  },
225
225
  {
226
226
  "name": "variable.other.jsdoc",
227
- "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?:\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|[^*])*? # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))",
227
+ "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else (sorry)\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))",
228
228
  "captures": {
229
229
  "1": {
230
230
  "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
@@ -254,7 +254,7 @@
254
254
  ]
255
255
  },
256
256
  {
257
- "begin": "((@)(?:define|enum|exception|implements|modifies|namespace|private|protected|returns?|suppress|throws|type))\\s+(?={)",
257
+ "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)",
258
258
  "beginCaptures": {
259
259
  "1": {
260
260
  "name": "storage.type.class.jsdoc"
@@ -331,7 +331,7 @@
331
331
  "name": "punctuation.definition.block.tag.jsdoc"
332
332
  }
333
333
  },
334
- "match": "(?x) (@)\n(?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles\n|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright\n|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception\n|exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func\n|function|global|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface\n|internal|kind|lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module\n|name|namespace|noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|preserve\n|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static\n|struct|submodule|summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted\n|uses|var|variation|version|virtual|writeOnce)\n\\b",
334
+ "match": "(?x) (@)\n(?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles\n|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright\n|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception\n|exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func\n|function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc\n|inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method\n|mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects\n|override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected\n|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary\n|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation\n|version|virtual|writeOnce|yields?)\n\\b",
335
335
  "name": "storage.type.class.jsdoc"
336
336
  },
337
337
  {
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "fileTypes": [
3
- "esl",
4
- "lsl"
3
+ "lsl",
4
+ "lslp",
5
+ "lslm",
6
+ "lslo",
7
+ "esl"
5
8
  ],
6
9
  "keyEquivalent": "^~L",
7
10
  "name": "Second Life LSL",
@@ -10,68 +13,97 @@
10
13
  "include": "#round-brackets"
11
14
  },
12
15
  {
13
- "begin": "(^[ \\t]+)?(?=//)",
14
- "beginCaptures": {
16
+ "include": "#comments"
17
+ },
18
+ {
19
+ "match": "==|!=",
20
+ "name": "keyword.operator.comparison.lsl"
21
+ },
22
+ {
23
+ "match": "[-+*/%]?=",
24
+ "name": "keyword.operator.assignment.lsl"
25
+ },
26
+ {
27
+ "match": "\\|\\|?|\\^|&&?|!|~",
28
+ "name": "keyword.operator.logical.lsl"
29
+ },
30
+ {
31
+ "match": "\\+\\+?|\\-\\-?|<<|>>|<=|>=|<|>|\\*|/|%",
32
+ "name": "keyword.operator.arithmetic.lsl"
33
+ },
34
+ {
35
+ "include": "#numeric"
36
+ },
37
+ {
38
+ "captures": {
15
39
  "1": {
16
- "name": "punctuation.whitespace.comment.leading.lsl"
40
+ "name": "keyword.control.jump.lsl"
41
+ },
42
+ "2": {
43
+ "name": "constant.other.reference.label.lsl"
17
44
  }
18
45
  },
19
- "end": "(?!\\G)",
20
- "patterns": [
21
- {
22
- "begin": "//",
23
- "beginCaptures": {
24
- "0": {
25
- "name": "punctuation.definition.comment.lsl"
26
- }
27
- },
28
- "end": "\\n",
29
- "name": "comment.line.double-slash.lsl"
30
- }
31
- ]
32
- },
33
- {
34
- "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(|-)?[0-9]+)?)\\b",
35
- "name": "constant.numeric.lsl"
46
+ "match": "\\b(jump)\\s+([a-zA-Z_][a-zA-Z_0-9]*\\b)"
36
47
  },
37
48
  {
38
49
  "comment": "LSL Flow-control keywords",
39
- "match": "\\b(default|state|for|do|while|if|else|jump|return )\\b",
50
+ "match": "\\b(default|state|for|do|while|if|else|jump|return|event|print)\\b",
40
51
  "name": "keyword.control.lsl"
41
52
  },
42
53
  {
43
54
  "comment": "LSL Types",
44
- "match": "\\b(integer|float|string|key|vector|rotation|list|function)\\b",
55
+ "match": "\\b(integer|float|string|key|vector|rotation|quaternion|list)\\b",
45
56
  "name": "storage.type.lsl"
46
57
  },
47
58
  {
48
59
  "comment": "LSL Constants",
49
- "match": "\\b(PI|TWO_PI|NULL_KEY|SCRIPTED)\\b",
50
- "name": "constant.language.lsl"
60
+ "match": "\\b(TRUE|FALSE)\\b",
61
+ "name": "constant.language.boolean.lsl"
51
62
  },
52
63
  {
53
64
  "comment": "LSL Events",
54
- "match": "\\b(at_rot_target|at_target|attach|changed|collision|collision_end|collision_start|control|dataserver|email|http_response|land_collision|land_collision_end|land_collision_start|link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|not_at_target|object_rez|on_rez|remote_data|run_time_permissions|sensor|state_entry|state_exit|timer|touch|touch_end|touch_start)\\b",
55
- "name": "constant.language.lsl.events"
65
+ "match": "\\b(l(?:and_collision(?:_(?:start|end))?|i(?:nk_message|sten))|t(?:ouch(?:_(?:start|end))?|ransaction_result|imer)|c(?:o(?:llision(?:_(?:start|end))?|ntrol)|hanged)|e(?:xperience_permissions(?:_denied)?|mail)|r(?:un_time_permissions|emote_data)|no(?:t_a(?:t_ro)?t_target|_sensor)|s(?:tate_e(?:ntry|xit)|ensor)|mo(?:ving_(?:start|end)|ney)|at(?:(?:_rot)?_target|tach)|http_re(?:sponse|quest)|o(?:bject|n)_rez|path_update|dataserver)\\b",
66
+ "name": "constant.language.events.lsl"
56
67
  },
57
68
  {
58
69
  "comment": "LSL Functions ll*",
59
- "match": "\\b(llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|llAdjustSoundVolume|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCeil|llClearCameraParams|llCloseRemoteDataChannel|llCloud|llCollisionFilter|llCollisionSound|llCollisionSprite|llCos|llCreateLink|llCSV2List|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llFabs|llFloor|llForceMouselook|llFrand|llGetAccel|llGetAgentInfo|llGetAgentSize|llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAttached|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|llGetColor|llGetCreator|llGetDate|llGetEnergy|llGetForce|llGetFreeMemory|llGetGeometricCenter|llGetGMTclock|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|llGetLandOwnerAt|llGetLinkKey|llGetLinkName|llGetLinkNumber|llGetListEntryType|llGetListLength|llGetLocalPos|llGetLocalRot|llGetMass|llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|llGetNumberOfSides|llGetObjectDesc|llGetObjectMass|llGetObjectName|llGetObjectPermMask|llGetOmega|llGetOwner|llGetOwnerKey|llGetParcelFlags|llGetPermissions|llGetPermissionsKey|llGetPos|llGetPrimitiveParams|llGetRegionCorner|llGetRegionFlags|llGetRegionFPS|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|llGetRootRotation|llGetRot|llGetScale|llGetScriptName|llGetScriptState|llGetSimulatorHostname|llGetStartParameter|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|llGetTimestamp|llGetTorque|llGetUnixTime|llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|llHTTPRequest|llInsertString|llInstantMessage|llIntegerToBase64|llKey2Name|llList2CSV|llList2Float|llList2Integer|llList2Key|llList2List|llList2ListStrided|llList2Rot|llList2String|llList2Vector|llListen|llListenControl|llListenRemove|llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|llListStatistics|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|llLoopSoundSlave|llMapDestination|llMD5String|llMessageLinked|llMinEventDelay|llModifyLand|llModPow|llMoveToTarget|llOffsetTexture|llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|llPassCollisions|llPassTouches|llPlaySound|llPlaySoundSlave|llPointAt|llPow|llPreloadSound|llPushObject|llReleaseCamera|llReleaseControls|llRemoteDataReply|llRemoteDataSetRegion|llRemoteLoadScriptPin|llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|llRequestAgentData|llRequestInventoryData|llRequestPermissions|llRequestSimulatorData|llResetOtherScript|llResetScript|llResetTime|llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|llRot2Fwd|llRot2Left|llRot2Up|llRotateTexture|llRotBetween|llRotLookAt|llRotTarget|llRotTargetRemove|llRound|llSameGroup|llSay|llScaleTexture|llScriptDanger|llSendRemoteData|llSensor|llSensorRemove|llSensorRepeat|llSetAlpha|llSetBuoyancy|llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetColor|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|llSetLinkAlpha|llSetLinkColor|llSetLocalRot|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|llSetPayPrice|llSetPos|llSetPrimitiveParams|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|llSetSitText|llSetSoundQueueing|llSetStatus|llSetText|llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|llSetVehicleVectorParam|llShout|llSin|llSitTarget|llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|llStopMoveToTarget|llStopPointAt|llStopSound|llStringLength|llStringToBase64|llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|llTeleportAgentHome|llToLower|llToUpper|llTriggerSound|llTriggerSoundLimited|llUnescapeURL|llUnSit|llVecDist|llVecMag|llVecNorm|llVolumeDetect|llWater|llWhisper|llWind|llXorBase64StringsCorrect)\\b",
70
+ "match": "(?x)\n\t\t\t\t\\b(ll(?:\n\t\t\t\t\tG(?:e(?:t(?:P(?:arcel(?:M(?:axPrims|usicURL)|Prim(?:Owners|Count)|(?:Detail|Flag)s)|(?:rim(?:Media|itive)Param|o)s|ermissions(?:Key)?|hysicsMaterial)|S(?:ta(?:t(?:icPath|us)|rtParameter)|im(?:ulatorHostname|Stats)|c(?:ript(?:Stat|Nam)|al)e|u(?:nDirection|bString)|PMaxMemory)|L(?:i(?:nk(?:N(?:umber(?:OfSides)?|ame)|PrimitiveParams|Media|Key)|st(?:EntryType|Length))|ocal(?:Pos|Rot)|andOwnerAt)|A(?:n(?:imation(?:Override|List)?|dResetTime)|gent(?:L(?:anguage|ist)|Info|Size)|ttached(?:List)?|ccel|lpha)|R(?:egion(?:F(?:lags|PS)|TimeDilation|AgentCount|Corner|Name)|o(?:ot(?:Posi|Rota)tion|t))|O(?:bject(?:P(?:rimCount|ermMask)|De(?:tails|sc)|Mass|Name)|wner(?:Key)?|mega)|N(?:umberOf(?:(?:NotecardLin|Sid)e|Prim)s|otecardLine|extEmail)|C(?:amera(?:Pos|Rot)|losestNavPoint|(?:reat|ol)or|enterOfMass)|T(?:exture(?:(?:Offse|Ro)t|Scale)?|ime(?:OfDay|stamp)?|orque)|M(?:a(?:xScaleFactor|ss(?:MKS)?)|inScaleFactor|emoryLimit)|Inventory(?:N(?:umber|ame)|PermMask|Creator|Type|Key)|E(?:xperience(?:ErrorMessage|Details)|n(?:ergy|v))|U(?:se(?:dMemory|rname)|nixTime)|F(?:ree(?:Memory|URLs)|orce)|G(?:eometricCenter|MTclock)|D(?:isplayNam|at)e|BoundingBox|HTTPHeader|Wallclock|Key|Vel)|nerateKey)|round(?:(?:Norma|Repe)l|Contour|Slope)?|ive(?:Inventory(?:List)?|Money))\n\t\t\t\t | S(?:e(?:t(?:L(?:ink(?:PrimitiveParams(?:Fast)?|Texture(?:Anim)?|C(?:amera|olor)|(?:Alph|Medi)a)|ocalRot)|P(?:(?:rim(?:Media|itive)Param|o)s|a(?:rcelMusicURL|yPrice)|hysicsMaterial)|Ve(?:hicle(?:(?:Rotation|Vector)Param|Fl(?:oatParam|ags)|Type)|locity)|C(?:amera(?:(?:Eye|At)Offset|Params)|o(?:ntentType|lor)|lickAction)|S(?:ound(?:Queueing|Radius)|c(?:riptStat|al)e|itText|tatus)|T(?:ext(?:ure(?:Anim)?)?|o(?:uchText|rque)|imerEvent)|A(?:n(?:imationOverride|gularVelocity)|lpha)|R(?:e(?:moteScriptAccessPin|gionPos)|ot)|(?:Forc(?:eAndTorqu)?|Damag)e|(?:HoverHeigh|MemoryLimi)t|Object(?:Desc|Name)|KeyframedMotion|Buoyancy)|n(?:sor(?:Re(?:move|peat))?|dRemoteData))|t(?:op(?:(?:MoveToTarge|LookA)t|Animation|Hover|Sound)|ring(?:T(?:oBase64|rim)|Length)|artAnimation)|c(?:ale(?:ByFactor|Texture)|ript(?:Profil|Dang)er)|i(?:t(?:OnLink|Target)|n)|a(?:meGroup|y)|ubStringIndex|(?:hou|qr)t|HA1String|leep)\n\t\t\t\t | R(?:e(?:quest(?:(?:Experience)?Permissions|S(?:imulatorData|ecureURL)|(?:Inventory|Agent)Data|U(?:sername|RL)|DisplayName)|mo(?:ve(?:FromLand(?:Pass|Ban)List|VehicleFlags|Inventory)|te(?:LoadScriptPin|DataReply))|set(?:(?:Land(?:Pass|Ban)Lis|(?:Other)?Scrip)t|(?:AnimationOverrid|Tim)e)|turnObjectsBy(?:Owner|ID)|lease(?:Controls|URL)|z(?:AtRoo|Objec)t|gionSay(?:To)?|adKeyValue)|o(?:t(?:2(?:A(?:ngle|xis)|Euler|Left|Fwd|Up)|Target(?:Remove)?|ateTexture|Between|LookAt)|und))\n\t\t\t\t | L(?:i(?:st(?:2(?:(?:Intege|Vecto)r|List(?:Strided)?|(?:Floa|Ro)t|String|Json|CSV|Key)|R(?:eplaceList|andomize)|en(?:Control|Remove)?|(?:Insert|Find)List|S(?:tatistics|ort))|nk(?:ParticleSystem|SitTarget))|o(?:o(?:pSound(?:Master|Slave)?|kAt)|g(?:10)?|adURL))\n\t\t\t\t | D(?:e(?:t(?:ected(?:T(?:ouch(?:(?:Bin|N)ormal|Face|Pos|ST|UV)|ype)|(?:LinkNumb|Own)er|Gr(?:oup|ab)|Name|Key|Pos|Rot|Vel)|achFromAvatar)|lete(?:Sub(?:String|List)|Character|KeyValue))|ataSizeKeyValue|umpList2String|i(?:alog|e))\n\t\t\t\t | A(?:(?:vatarOn(?:Link)?SitTarge|x(?:isAngle|es)2Ro)t|(?:pply(?:Rotational)?Impuls|gentInExperienc)e|d(?:dToLand(?:Pass|Ban)List|justSoundVolume)|t(?:tachToAvatar(?:Temp)?|an2)|(?:ngleBetwee|si)n|llowInventoryDrop|(?:co|b)s)\n\t\t\t\t | P(?:a(?:r(?:celMedia(?:CommandList|Query)|seString(?:KeepNulls|2List)|ticleSystem)|(?:ss(?:Collision|Touche)|trolPoint)s)|laySound(?:Slave)?|u(?:shObject|rsue)|reloadSound|ow)\n\t\t\t\t | C(?:l(?:ear(?:(?:Link|Prim)Media|CameraParams)|oseRemoteDataChannel)|reate(?:Character|KeyValue|Link)|o(?:llision(?:Filter|Sound)|s)|SV2List|astRay|eil)\n\t\t\t\t | T(?:r(?:iggerSoun(?:dLimite)?d|ansferLindenDollars)|e(?:leportAgent(?:GlobalCoords|Home)?|xtBox)|a(?:rget(?:Remove|Omega)?|keControls|n)|o(?:Low|Upp)er)\n\t\t\t\t | M(?:a(?:nageEstateAccess|pDestination)|o(?:d(?:ifyLand|Pow)|veToTarget)|essageLinked|inEventDelay|D5String)\n\t\t\t\t | E(?:(?:xecCharacterCm|jectFromLan|dgeOfWorl)d|scapeURL|uler2Rot|mail|vade)\n\t\t\t\t | O(?:penRemoteDataChannel|ffsetTexture|verMyLand|wnerSay)\n\t\t\t\t | B(?:ase64To(?:Integer|String)|reak(?:AllLinks|Link))\n\t\t\t\t | U(?:pdate(?:Character|KeyValue)|n(?:escapeURL|Sit))\n\t\t\t\t | In(?:s(?:tantMessage|ertString)|tegerToBase64)\n\t\t\t\t | F(?:l(?:eeFrom|oor)|orceMouselook|rand|abs)\n\t\t\t\t | Json(?:(?:[GS]etValu|ValueTyp)e|2List)\n\t\t\t\t | V(?:ec(?:Dist|Norm|Mag)|olumeDetect)\n\t\t\t\t | W(?:a(?:nderWithin|ter)|hisper|ind)\n\t\t\t\t | Key(?:(?:Count|s)KeyValu|2Nam)e\n\t\t\t\t | HTTPRe(?:sponse|quest)\n\t\t\t\t | NavigateTo\n\t\t\t\t | XorBase64\n\t\t\t\t))\\b\n\t\t\t",
60
71
  "name": "support.function.lsl"
61
72
  },
73
+ {
74
+ "comment": "LSL Functions only available to certain Linden Lab employees",
75
+ "match": "(?x)\n\t\t\t\t\\b(ll(?:\n\t\t\t\t\tSet(?:Inventory|Object)PermMask\n\t\t\t\t | GodLikeRezObject\n\t\t\t\t))\\b\n\t\t\t",
76
+ "name": "support.function.god-mode.lsl"
77
+ },
78
+ {
79
+ "match": "(?x)\n\t\t\t\t\\b(ll(?:\n\t\t\t\t\tMake(?:Explosion|Fire|Fountain|Smoke)\n\t\t\t\t | XorBase64Strings(?:Correct)?\n\t\t\t\t | Sound(?:Preload)?\n\t\t\t\t | RemoteDataSetRegion\n\t\t\t\t))\\b\n\t\t\t",
80
+ "name": "invalid.deprecated.support.function.lsl"
81
+ },
82
+ {
83
+ "match": "(?x)\n\t\t\t\t\\b(ll(?:\n\t\t\t\t\tC(?:l(?:earExperiencePermissions|oud)|ollisionSprite)\n\t\t\t\t | Re(?:freshPrimURL|leaseCamera|moteLoadScript)\n\t\t\t\t | S(?:etPrimURL|topPointAt)\n\t\t\t\t | GetExperienceList\n\t\t\t\t | TakeCamera\n\t\t\t\t | PointAt\n\t\t\t\t))\\b\n\t\t\t",
84
+ "name": "invalid.illegal.reserved-function.lsl"
85
+ },
62
86
  {
63
87
  "comment": "LSL Function Constants",
64
- "match": "\\b(ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|AGENT_AWAY|AGENT_BUSY|AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_BACK|ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_LEAR|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|ATTACH_LLLEG|ATTACH_LPEC|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|ATTACH_RHAND|ATTACH_RHIP|ATTACH_RLARM|ATTACH_RLLEG|ATTACH_RPEC|ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_OWNER|CHANGED_REGION|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|CHANGED_TEXTURE|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_RATING|DATA_SIM_POS|DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DEG_TO_RAD|EOF|FALSE|HTTP_BODY_MAXLENGTH|HTTP_BODY_TRUNCATED|HTTP_METHOD|HTTP_MIMETYPE|INVENTORY_ALL|INVENTORY_ANIMATION|INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|INVENTORY_SOUND|INVENTORY_TEXTURE|LAND_LARGE_BRUSH|LAND_LEVEL|LAND_LOWER|LAND_MEDIUM_BRUSH|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMALL_BRUSH|LAND_SMOOTH|LINK_ALL_CHILDREN|LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|NULL_KEY|PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_USE_ACCESS_GROUP|PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_PAUSE|PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_STOP|PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASSIVE|PAY_DEFAULT|PAY_HIDE|PERM_ALL|PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_TAKE_CONTROLS|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|PI|PI_BY_TWO|PING_PONG|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_CAST_SHADOWS|PRIM_COLOR|PRIM_FLEXIBLE|PRIM_FULLBRIGHT|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|PRIM_HOLE_TRIANGLE|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|PRIM_MATERIAL_GLASS|PRIM_MATERIAL_LIGHT|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_PHANTOM|PRIM_PHYSICS|PRIM_POINT_LIGHT|PRIM_POSITION|PRIM_ROTATION|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_TEMP_ON_REZ|PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXTURE|PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_START_ALPHA|PSYS_PART_START_COLOR|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_INNERANGLE|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|PSYS_SRC_OUTERANGLE|PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PUBLIC_CHANNEL|RAD_TO_DEG|REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|REGION_FLAG_FIXED_SUN|REGION_FLAG_SANDBOX|REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REVERSE|ROTATE|SCALE|SCRIPTED|SMOOTH|SQRT2|STATUS_BLOCK_GRAB|STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_PHANTOM|STATUS_PHYSICS|STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|STATUS_SANDBOX|TRUE|TWO_PI|TYPE_FLOAT|TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|ZERO_ROTATION|ZERO_VECTOR)\\b",
88
+ "match": "(?x)\n\t\t\t\t\\b(\n\t\t\t\t\tP(?:R(?:IM_(?:M(?:EDIA_(?:MAX_(?:W(?:HITELIST_(?:COUNT|SIZE)|IDTH_PIXELS)|HEIGHT_PIXELS|URL_LENGTH)|P(?:ERM(?:_(?:(?:ANY|N)ONE|GROUP|OWNER)|S_(?:INTERACT|CONTROL))|ARAM_MAX)|A(?:UTO_(?:SCALE|LOOP|PLAY|ZOOM)|LT_IMAGE_ENABLE)|C(?:ONTROLS(?:_(?:STANDARD|MINI))?|URRENT_URL)|W(?:HITELIST(?:_ENABLE)?|IDTH_PIXELS)|H(?:EIGHT_PIXELS|OME_URL)|FIRST_CLICK_INTERACT)|ATERIAL(?:_(?:PLASTIC|RUBBER|FLESH|GLASS|METAL|STONE|WOOD))?)|S(?:C(?:ULPT_(?:TYPE_(?:(?:SPHER|PLAN)E|CYLINDER|TORUS|MASK)|FLAG_(?:INVERT|MIRROR))|RIPTED_SIT_ONLY)|HINY_(?:MEDIUM|HIGH|NONE|LOW)|I(?:T_TARGET|ZE)|PECULAR|LICE)|BUMP_(?:S(?:T(?:UCCO|ONE)|UCTION|IDING|HINY)|B(?:RI(?:CKS|GHT)|LOBS|ARK)|(?:(?:LARGE)?TIL|NON)E|C(?:ONCRETE|HECKER)|D(?:ISKS|ARK)|W(?:EAVE|OOD)|GRAVEL)|T(?:YPE(?:_(?:S(?:CULPT|PHERE)|T(?:ORUS|UBE)|CYLINDER|PRISM|RING|BOX))?|E(?:X(?:GEN(?:_(?:DEFAULT|PLANAR))?|T(?:URE)?)|MP_ON_REZ))|P(?:H(?:YSICS(?:_SHAPE_(?:(?:NON|TYP)E|CONVEX|PRIM))?|ANTOM)|O(?:S(?:_LOCAL|ITION)|INT_LIGHT))|AL(?:PHA_MODE(?:_(?:(?:EMISSIV|NON)E|BLEND|MASK))?|LOW_UNSIT)|HOLE_(?:(?:(?:TRIANG|CIRC)L|SQUAR)E|DEFAULT)|F(?:ULLBRIGHT|LEXIBLE)|ROT(?:_LOCAL|ATION)|N(?:ORMAL|AME)|LINK_TARGET|COLOR|OMEGA|DESC|GLOW)|OFILE_(?:SCRIPT_MEMORY|NONE))|A(?:RCEL_(?:FLAG_(?:ALLOW_(?:(?:CREATE(?:_GROUP)?_OBJEC|SCRIP)TS|GROUP_(?:OBJECT_ENTRY|SCRIPTS)|(?:ALL_OBJECT_ENTR|FL)Y|TERRAFORM|LANDMARK|DAMAGE)|USE_(?:(?:LAND_PASS|BAN)_LIST|ACCESS_(?:GROUP|LIST))|RESTRICT_PUSHOBJECT|LOCAL_SOUND_ONLY)|MEDIA_COMMAND_(?:A(?:UTO_ALIGN|GENT)|T(?:EXTUR|IM|YP)E|LOOP(?:_SET)?|P(?:AUSE|LAY)|U(?:NLOAD|RL)|S(?:IZE|TOP)|DESC)|DETAILS_(?:SEE_AVATARS|GROUP|OWNER|AREA|DESC|NAME|ID)|COUNT_(?:T(?:OTAL|EMP)|O(?:TH|WN)ER|SELECTED|GROUP))|Y(?:MENT_INFO_(?:ON_FILE|USED)|_(?:DEFAULT|HIDE))|SS(?:_(?:IF_NOT_HANDLED|ALWAYS|NEVER)|IVE)|TROL_PAUSE_AT_WAYPOINTS)|SYS_(?:PART_(?:B(?:F_(?:ONE(?:_MINUS_(?:SOURCE_(?:ALPHA|COLOR)|DEST_COLOR))?|SOURCE_(?:ALPHA|COLOR)|DEST_COLOR|ZERO)|LEND_FUNC_(?:SOURCE|DEST)|OUNCE_MASK)|(?:INTERP_(?:COLOR|SCALE)|TARGET_(?:LINEAR|POS)|RIBBON|WIND)_MASK|E(?:ND_(?:ALPHA|COLOR|SCALE|GLOW)|MISSIVE_MASK)|F(?:OLLOW_(?:VELOCITY|SRC)_MASK|LAGS)|START_(?:ALPHA|COLOR|SCALE|GLOW)|MAX_AGE)|SRC_(?:PATTERN(?:_(?:ANGLE(?:_CONE(?:_EMPTY)?)?|EXPLODE|DROP))?|BURST_(?:SPEED_M(?:AX|IN)|RA(?:DIUS|TE)|PART_COUNT)|A(?:NGLE_(?:BEGIN|END)|CCEL)|T(?:ARGET_KEY|EXTURE)|MAX_AGE|OMEGA))|U(?:_(?:FAILURE_(?:(?:(?:PARCEL_)?UNREACHABL|TARGET_GON)E|NO_(?:VALID_DESTINATION|NAVMESH)|DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:START|GOAL)|OTHER)|(?:SLOWDOWN_DISTANCE|GOAL)_REACHED|EVADE_(?:SPOTTED|HIDDEN))|RSUIT_(?:(?:INTERCEP|OFFSE)T|GOAL_TOLERANCE|FUZZ_FACTOR)|BLIC_CHANNEL)|ERM(?:ISSION_(?:T(?:R(?:IGGER_ANIMATION|ACK_CAMERA)|AKE_CONTROLS|ELEPORT)|(?:OVERRIDE_ANIMATION|RETURN_OBJECT)S|(?:SILENT_ESTATE_MANAGEMEN|DEBI)T|C(?:ONTROL_CAMERA|HANGE_LINKS)|ATTACH)|_(?:MO(?:DIFY|VE)|TRANSFER|COPY|ALL))|I(?:NG_PONG|_BY_TWO)?)\n\t\t\t\t | C(?:HA(?:RACTER_(?:A(?:CCOUNT_FOR_SKIPPED_FRAMES|VOIDANCE_MODE)|MAX_(?:(?:AC|DE)CEL|TURN_RADIUS|SPEED)|CMD_(?:(?:SMOOTH_)?STO|JUM)P|TYPE(?:_(?:[ABCD]|NONE))?|DESIRED(?:_TURN)?_SPEED|STAY_WITHIN_PARCEL|ORIENTATION|LENGTH|RADIUS)|NGED_(?:TE(?:LEPORT|XTURE)|REGION(?:_START)?|(?:COLO|OWNE)R|S(?:CAL|HAP)E|ALLOWED_DROP|INVENTORY|MEDIA|LINK))|AMERA_(?:P(?:OSITION(?:_(?:L(?:OCKED|AG)|THRESHOLD))?|ITCH)|FOCUS(?:_(?:L(?:OCKED|AG)|THRESHOLD|OFFSET))?|BEHINDNESS_(?:ANGLE|LAG)|(?:DISTANC|ACTIV)E)|ONT(?:ROL_(?:R(?:OT_(?:RIGH|LEF)|IGH)T|(?:ML_LBUTTO|DOW)N|L(?:BUTTON|EFT)|BACK|FWD|UP)|ENT_TYPE_(?:(?:X(?:HT)?|HT)ML|(?:ATO|FOR)M|JSON|LLSD|TEXT|RSS))|LICK_ACTION_(?:OPEN(?:_MEDIA)?|(?:PL?A|BU)Y|TOUCH|NONE|SIT))\n\t\t\t\t | A(?:TTACH_(?:H(?:UD_(?:TOP_(?:(?:RIGH|LEF)T|CENTER)|BOTTOM(?:_(?:RIGH|LEF)T)?|CENTER_[12])|IND_[LR]FOOT|EAD)|R(?:H(?:AND(?:_RING1)?|IP)|L(?:ARM|LEG)|U(?:ARM|LEG)|E(?:AR|YE)|IGHT_PEC|SHOULDER|FOOT|WING)|L(?:H(?:AND(?:_RING1)?|IP)|E(?:FT_PEC|AR|YE)|L(?:ARM|LEG)|U(?:ARM|LEG)|SHOULDER|FOOT|WING)|FACE_(?:LE(?:AR|YE)|RE(?:AR|YE)|TONGUE|JAW)|TAIL_(?:BASE|TIP)|AVATAR_CENTER|B(?:ELLY|ACK)|CH(?:EST|IN)|N(?:ECK|OSE)|PELVIS|GROIN|MOUTH)|GENT(?:_(?:A(?:TTACHMENTS|LWAYS_RUN|UTOPILOT|WAY)|LIST_(?:PARCEL(?:_OWNER)?|REGION)|B(?:Y_(?:LEGACY_|USER)NAME|USY)|(?:CROUCH|WALK|FLY|TYP)ING|S(?:CRIPTED|ITTING)|MOUSELOOK|ON_OBJECT|IN_AIR))?|VOID_(?:(?:DYNAMIC_OBSTACLE|CHARACTER)S|NONE)|LL_SIDES|NIM_ON|CTIVE)\n\t\t\t\t | O(?:BJECT_(?:R(?:E(?:TURN_(?:PARCEL(?:_OWNER)?|REGION)|NDER_WEIGHT|ZZER_KEY)|(?:UNNING_SCRIPT_COUN|O?O)T)|P(?:H(?:YSICS(?:_COST)?|ANTOM)|RIM_(?:EQUIVALENCE|COUNT)|ATHFINDING_TYPE|OS)|S(?:(?:E(?:LECT_COUN|RVER_COS)|TREAMING_COS|IT_COUN)T|CRIPT_(?:MEMORY|TIME))|T(?:OTAL_(?:INVENTORY|SCRIPT)_COUNT|EMP_(?:ATTACHED|ON_REZ))|C(?:REAT(?:ION_TIME|OR)|HARACTER_TIME|LICK_ACTION)|ATTACHED_(?:SLOTS_AVAILABLE|POINT)|(?:BODY_SHAPE_TYP|NAM)E|GROUP(?:_TAG)?|O(?:MEGA|WNER)|UNKNOWN_DETAIL|LAST_OWNER_ID|HOVER_HEIGHT|VELOCITY|DESC)|PT_(?:(?:(?:EXCLUSION|MATERIAL)_VOLUM|(?:STATIC_OBSTAC|WALKAB)L)E|(?:(?:CHARACT|OTH)E|AVATA)R|LEGACY_LINKSET))\n\t\t\t\t | VE(?:HICLE_(?:FLAG_(?:HOVER_(?:(?:TERRAIN|WATER|UP)_ONLY|GLOBAL_HEIGHT)|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED|NO_DEFLECTION_UP)|LINEAR_(?:MOTOR_(?:D(?:ECAY_TIMESCALE|IRECTION)|TIMESCALE|OFFSET)|DEFLECTION_(?:EFFICIENCY|TIMESCALE)|FRICTION_TIMESCALE)|ANGULAR_(?:MOTOR_(?:D(?:ECAY_TIMESCALE|IRECTION)|TIMESCALE)|DEFLECTION_(?:EFFICIENCY|TIMESCALE)|FRICTION_TIMESCALE)|TYPE_(?:(?:AIRPLA|NO)NE|B(?:ALLOON|OAT)|SLED|CAR)|B(?:ANKING_(?:EFFICIENCY|TIMESCALE|MIX)|UOYANCY)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|HOVER_(?:EFFICIENCY|TIMESCALE|HEIGHT)|REFERENCE_FRAME)|RTICAL)\n\t\t\t\t | R(?:E(?:GION_FLAG_(?:BLOCK_(?:FLY(?:OVER)?|TERRAFORM)|ALLOW_D(?:IRECT_TELEPORT|AMAGE)|DISABLE_(?:COLLISION|PHYSIC)S|RESTRICT_PUSHOBJECT|FIXED_SUN|SANDBOX)|MOTE_DATA_(?:RE(?:QUEST|PLY)|CHANNEL)|QUIRE_LINE_OF_SIGHT|STITUTION|VERSE)|C(?:_(?:REJECT_(?:(?:NON)?PHYSICAL|(?:AGENT|TYPE)S|LAND)|GET_(?:LINK_NUM|ROOT_KEY|NORMAL)|D(?:ETECT_PHANTOM|ATA_FLAGS)|MAX_HITS)|ERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN))|AD_TO_DEG|OTATE)\n\t\t\t\t | S(?:T(?:ATUS_(?:(?:NOT_(?:SUPPORTE|FOUN)|WHITELIST_FAILE)D|B(?:LOCK_GRAB(?:_OBJECT)?|OUNDS_ERROR)|(?:MALFORMED_PARAM|CAST_SHADOW)S|R(?:ETURN_AT_EDGE|OTATE_[XYZ])|PH(?:ANTOM|YSICS)|INTERNAL_ERROR|TYPE_MISMATCH|DIE_AT_EDGE|SANDBOX|OK)|RING_TRIM(?:_(?:HEAD|TAIL))?)|I(?:T_(?:NO(?:_(?:EXPERIENCE_PERMISSION|SIT_TARGET|ACCESS)|T_EXPERIENCE)|INVALID_(?:(?:OBJEC|AGEN)T|LINK))|M_STAT_PCT_CHARS_STEPPED)|C(?:RIPTED|ALE)|MOOTH|QRT2)\n\t\t\t\t | XP_ERROR_(?:(?:(?:EXPERIENCE(?:_(?:SUSPEND|DISABL)|S_DISABL)|(?:MATURITY|QUOTA)_EXCEED|THROTTL)E|KEY_NOT_FOUN)D|NO(?:T_(?:PERMITTE(?:D_LAN)?|FOUN)D|(?:_EXPERIENC|N)E)|RE(?:QUEST_PERM_TIMEOUT|TRY_UPDATE)|INVALID_(?:EXPERIENCE|PARAMETERS)|STOR(?:AGE_EXCEPTION|E_DISABLED)|UNKNOWN_ERROR)\n\t\t\t\t | L(?:I(?:ST_STAT_(?:S(?:UM(?:_SQUARES)?|TD_DEV)|M(?:(?:E(?:DI)?A|I)N|AX)|GEOMETRIC_MEAN|NUM_COUNT|RANGE)|NK_(?:ALL_(?:CHILDREN|OTHERS)|(?:ROO|SE)T|THIS))|AND_(?:R(?:EVERT|AISE)|L(?:EVEL|OWER)|SMOOTH|NOISE)|OOP)\n\t\t\t\t | T(?:YPE_(?:IN(?:TEGER|VALID)|ROTATION|STRING|VECTOR|FLOAT|KEY)|EXTURE_(?:(?:TRANSPAREN|DEFAUL)T|PLYWOOD|BLANK|MEDIA)|OUCH_INVALID_(?:TEXCOORD|VECTOR|FACE)|RAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|WO_PI)\n\t\t\t\t | E(?:STATE_ACCESS_(?:ALLOWED_(?:AGENT_(?:REMOVE|ADD)|GROUP_(?:REMOVE|ADD))|BANNED_AGENT_(?:REMOVE|ADD))|RR_(?:(?:(?:RUNTIME|PARCEL)_PERMISSION|MALFORMED_PARAM)S|THROTTLED|GENERIC)|OF)\n\t\t\t\t | H(?:TTP_(?:VER(?:BOSE_THROTTLE|IFY_CERT)|BODY_(?:MAXLENGTH|TRUNCATED)|(?:USER_AGEN|ACCEP)T|M(?:IMETYPE|ETHOD)|PRAGMA_NO_CACHE|CUSTOM_HEADER)|ORIZONTAL)\n\t\t\t\t | INVENTORY_(?:(?:BODYPAR|OBJEC)T|A(?:NIMATION|LL)|(?:GES|TEX)TURE|NO(?:TECARD|NE)|S(?:CRIPT|OUND)|CLOTHING|LANDMARK)\n\t\t\t\t | KFM_(?:C(?:MD_(?:P(?:AUSE|LAY)|STOP)|OMMAND)|R(?:OTATION|EVERSE)|TRANSLATION|PING_PONG|FORWARD|DATA|LOOP|MODE)\n\t\t\t\t | D(?:ATA_(?:SIM_(?:(?:STATU|PO)S|RATING)|(?:ONLIN|NAM)E|PAYINFO|BORN)|E(?:BUG_CHANNEL|G_TO_RAD|NSITY))\n\t\t\t\t | JSON_(?:(?:DELET|FALS|TRU)E|A(?:PPEND|RRAY)|NU(?:MBER|LL)|INVALID|OBJECT|STRING)\n\t\t\t\t | G(?:CNP_(?:RADIUS|STATIC)|RAVITY_MULTIPLIER)\n\t\t\t\t | MASK_(?:(?:EVERYON|BAS)E|GROUP|OWNER|NEXT)\n\t\t\t\t | F(?:ORCE_DIRECT_PATH|RICTION)\n\t\t\t\t | URL_REQUEST_(?:GRANT|DENI)ED\n\t\t\t\t | WANDER_PAUSE_AT_WAYPOINTS\n\t\t\t\t | ZERO_(?:ROTATION|VECTOR)\n\t\t\t\t | NULL_KEY\n\t\t\t\t)\\b\n\t\t\t",
65
89
  "name": "support.constant.lsl"
66
90
  },
67
91
  {
68
- "match": "\\b\\w+ *(?=\\()",
92
+ "match": "(?x)\n\t\t\t\t\\b(\n\t\t\t\t\tPERMISSION_(?:CHANGE_(?:JOINT|PERMISSION)S|RE(?:MAP_CONTROLS|LEASE_OWNERSHIP))\n\t\t\t\t | LAND_(?:SMALL|MEDIUM|LARGE)_BRUSH\n\t\t\t\t | PRIM_(?:CAST_SHADOWS|MATERIAL_LIGHT)\n\t\t\t\t | PSYS_SRC_(?:(?:INN|OUT)ERANGLE|OBJ_REL_MASK)\n\t\t\t\t | ATTACH_[LR]PEC\n\t\t\t\t | VEHICLE_FLAG_NO_FLY_UP\n\t\t\t\t | DATA_RATING\n\t\t\t\t)\\b\n\t\t\t",
93
+ "name": "invalid.deprecated.constant.lsl"
94
+ },
95
+ {
96
+ "match": "\\b[a-zA-Z_][a-zA-Z_0-9]*(?=\\s*\\()",
69
97
  "name": "entity.name.function.lsl"
70
98
  },
71
99
  {
72
- "match": "\\b\\w+\\b",
100
+ "match": "\\b[a-zA-Z_][a-zA-Z_0-9]*\\b",
73
101
  "name": "variable.other.lsl"
74
102
  },
103
+ {
104
+ "match": "\\B@[a-zA-Z_][a-zA-Z_0-9]*\\b",
105
+ "name": "constant.other.reference.label.lsl"
106
+ },
75
107
  {
76
108
  "begin": "\"",
77
109
  "beginCaptures": {
@@ -88,38 +120,89 @@
88
120
  "name": "string.quoted.double.lsl",
89
121
  "patterns": [
90
122
  {
91
- "match": "\\\\[\\\\\"snt]",
123
+ "match": "\\\\[\\\\\"nt]",
92
124
  "name": "constant.character.escape.lsl"
93
- },
94
- {
95
- "match": "\\\\([u][0-9A-Fa-f]{4}|[U][0-9A-Fa-f]{8})",
96
- "name": "constant.character.escape.unicode.lsl"
97
125
  }
98
126
  ]
99
127
  }
100
128
  ],
101
129
  "repository": {
102
- "round-brackets": {
130
+ "comments": {
103
131
  "patterns": [
104
132
  {
105
- "begin": "\\{",
133
+ "begin": "/\\*",
106
134
  "beginCaptures": {
107
135
  "0": {
108
- "name": "punctuation.section.scope.begin.lsl"
136
+ "name": "punctuation.definition.comment.begin.lsl"
109
137
  }
110
138
  },
111
- "captures": {
139
+ "end": "\\*/",
140
+ "endCaptures": {
141
+ "0": {
142
+ "name": "punctuation.definition.comment.end.lsl"
143
+ }
144
+ },
145
+ "name": "comment.block.lsl"
146
+ },
147
+ {
148
+ "begin": "(^[ \\t]+)?(?=//)",
149
+ "beginCaptures": {
112
150
  "1": {
113
- "name": "meta.brace.curly"
151
+ "name": "punctuation.whitespace.comment.leading.lsl"
152
+ }
153
+ },
154
+ "end": "(?!\\G)",
155
+ "patterns": [
156
+ {
157
+ "begin": "//",
158
+ "beginCaptures": {
159
+ "0": {
160
+ "name": "punctuation.definition.comment.lsl"
161
+ }
162
+ },
163
+ "end": "\\n",
164
+ "name": "comment.line.double-slash.lsl"
165
+ }
166
+ ]
167
+ }
168
+ ]
169
+ },
170
+ "numeric": {
171
+ "patterns": [
172
+ {
173
+ "match": "\\b0(x|X)[0-9a-fA-F]+\\b",
174
+ "name": "constant.numeric.integer.hexadecimal.lsl"
175
+ },
176
+ {
177
+ "match": "\\b[0-9]+([Ee][-+]?[0-9]+)\\b",
178
+ "name": "constant.numeric.float.lsl"
179
+ },
180
+ {
181
+ "match": "\\b([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([Ee][-+]?[0-9]+)?[fF]?\\b",
182
+ "name": "constant.numeric.float.lsl"
183
+ },
184
+ {
185
+ "match": "\\b[0-9]+\\b",
186
+ "name": "constant.numeric.integer.lsl"
187
+ }
188
+ ]
189
+ },
190
+ "round-brackets": {
191
+ "patterns": [
192
+ {
193
+ "begin": "\\{",
194
+ "beginCaptures": {
195
+ "0": {
196
+ "name": "punctuation.section.scope.begin.lsl"
114
197
  }
115
198
  },
116
- "end": "(\\})\\n?",
199
+ "end": "\\}",
117
200
  "endCaptures": {
118
- "1": {
201
+ "0": {
119
202
  "name": "punctuation.section.scope.end.lsl"
120
203
  }
121
204
  },
122
- "name": "meta.group.braces.curly",
205
+ "name": "meta.block.lsl",
123
206
  "patterns": [
124
207
  {
125
208
  "include": "$base"
@@ -128,13 +211,18 @@
128
211
  },
129
212
  {
130
213
  "begin": "\\(",
131
- "captures": {
132
- "1": {
133
- "name": "meta.brace.round"
214
+ "beginCaptures": {
215
+ "0": {
216
+ "name": "punctuation.section.group.begin.lsl"
134
217
  }
135
218
  },
136
219
  "end": "\\)",
137
- "name": "meta.group.braces.round",
220
+ "endCaptures": {
221
+ "0": {
222
+ "name": "punctuation.section.group.end.lsl"
223
+ }
224
+ },
225
+ "name": "meta.group.parenthesis.lsl",
138
226
  "patterns": [
139
227
  {
140
228
  "include": "$base"
@@ -143,13 +231,18 @@
143
231
  },
144
232
  {
145
233
  "begin": "\\[",
146
- "captures": {
147
- "1": {
148
- "name": "meta.brace.square"
234
+ "beginCaptures": {
235
+ "0": {
236
+ "name": "punctuation.section.array.begin.lsl"
149
237
  }
150
238
  },
151
239
  "end": "\\]",
152
- "name": "meta.group.braces.square",
240
+ "endCaptures": {
241
+ "0": {
242
+ "name": "punctuation.section.array.end.lsl"
243
+ }
244
+ },
245
+ "name": "meta.array.lsl",
153
246
  "patterns": [
154
247
  {
155
248
  "include": "$base"
@@ -4,160 +4,21 @@
4
4
  "moo"
5
5
  ],
6
6
  "name": "Mercury",
7
- "patterns": [
8
- {
9
- "include": "#number"
10
- },
11
- {
12
- "include": "#string_quoted_double"
13
- },
14
- {
15
- "include": "#inline_bin_op"
16
- },
17
- {
18
- "include": "#atom"
19
- },
20
- {
21
- "include": "#block_comment"
22
- },
23
- {
24
- "include": "#line_comment"
25
- },
26
- {
27
- "include": "#decl_keywords"
28
- },
29
- {
30
- "include": "#purity_level"
31
- },
32
- {
33
- "include": "#declarations"
34
- },
35
- {
36
- "include": "#common_ops"
37
- },
38
- {
39
- "include": "#determ_keywords"
40
- },
41
- {
42
- "include": "#logic_keywords"
43
- },
44
- {
45
- "include": "#foreign_mods"
46
- },
47
- {
48
- "include": "#variables"
49
- }
50
- ],
7
+ "scopeName": "source.mercury",
8
+ "uuid": "A3E186F8-CF20-4983-B132-209EDF43E3DE",
51
9
  "repository": {
52
- "atom": {
53
- "begin": "'",
54
- "beginCaptures": {
55
- "0": {
56
- "name": "punctuation.definition.string.begin.source.mercury"
57
- }
58
- },
59
- "end": "'(?!['])",
60
- "endCaptures": {
61
- "0": {
62
- "name": "punctuation.definition.string.end.source.mercury"
63
- }
64
- },
65
- "name": "string.quoted.single.source.mercury",
66
- "patterns": [
67
- {
68
- "match": "\\\\.",
69
- "name": "constant.character.escape.source.mercury"
70
- },
71
- {
72
- "match": "\\'\\'",
73
- "name": "constant.character.escape.quote.source.mercury"
74
- }
75
- ]
76
- },
77
10
  "block_comment": {
11
+ "name": "comment.block.source.mercury",
78
12
  "begin": "/\\*",
79
13
  "captures": {
80
14
  "0": {
81
15
  "name": "punctuation.definition.comment.source.mercury"
82
16
  }
83
17
  },
84
- "end": "\\*/",
85
- "name": "comment.block.source.mercury"
86
- },
87
- "common_ops": {
88
- "patterns": [
89
- {
90
- "match": "(-(?![>-])|[+](?![+])|[*][*]?|/(?![\\\\/])|//|\\\\(?![/=]))",
91
- "name": "keyword.operator.arithmetic.source.mercury"
92
- },
93
- {
94
- "match": "(=<|>=|<(?![=])|(?![-])>)",
95
- "name": "keyword.operator.comparison.source.mercury"
96
- },
97
- {
98
- "match": "(<=>|<=|=>|\\\\=|==|:-|=(?![=<>])|,|;|->|/\\\\(?![=])|\\\\/|@)",
99
- "name": "keyword.operator.logic.source.mercury"
100
- },
101
- {
102
- "match": "(-->|--->|[+][+](?![+])|::|:=|![\\.:]?|\\||\\^)",
103
- "name": "keyword.operator.other.source.mercury"
104
- },
105
- {
106
- "match": "(\\(|\\)|\\[|\\]|\\{|\\})",
107
- "name": "keyword.operator.list.source.mercury"
108
- },
109
- {
110
- "match": "\\.(?=[ \\t]*($|%))",
111
- "name": "keyword.operator.terminator.source.mercury"
112
- }
113
- ]
114
- },
115
- "decl_keywords": {
116
- "match": "\\b(is|where)\\b",
117
- "name": "keyword.control.declaration.source.mercury"
118
- },
119
- "declarations": {
120
- "patterns": [
121
- {
122
- "captures": {
123
- "1": {
124
- "name": "keyword.operator.logic.source.mercury"
125
- }
126
- },
127
- "match": "(?x)(^[ \\t]*:-)[ ]((use|include|end|import|)_module|module |func|pred|type(class)?|inst(ance)? |mode|interface|implementation )\\b",
128
- "name": "keyword.control.declaration.source.mercury"
129
- },
130
- {
131
- "captures": {
132
- "1": {
133
- "name": "keyword.operator.logic.source.mercury"
134
- },
135
- "2": {
136
- "name": "keyword.control.pragma.source.mercury"
137
- }
138
- },
139
- "match": "(?x)(^[ \\t]*:-)[ ](pragma)[ ](check_termination|does_not_terminate|fact_table |inline|loop_check|memo|minimal_model|no_inline |obsolete|promise_equivalent_clauses|source_file |terminates|type_spec |foreign_(proc|type|decl|code|export(_enum)? |enum|import_module) )\\b",
140
- "name": "constant.language.pragma.source.mercury"
141
- }
142
- ]
143
- },
144
- "determ_keywords": {
145
- "match": "(?x)\\b(require_(_switch_arms)?)?(multi|cc_(multi|nondet) |det|semidet|nondet |errorneous|failure )\\b",
146
- "name": "constant.language.determ.source.mercury"
147
- },
148
- "foreign_mods": {
149
- "match": "(?x)\\b(affects_liveness|(does_not|doesnt)_affect_liveness |attach_to_io_state |can_pass_as_mercury_type|stable |(may_call|will_not)(_call_mercury|_modify) |(may_)(not_)?_duplicate |(no_|unknown_)?sharing|tabled_for_io|local |(un)?trailed |(not_|maybe_)?thread_safe |will_not_throw_exception )\\b",
150
- "name": "storage.type.source.mercury"
151
- },
152
- "impl_defined_variable": {
153
- "match": "[$][a-zA-Z0-9_]*\\b",
154
- "name": "variable.language.source.mercury"
155
- },
156
- "inline_bin_op": {
157
- "match": "`[^`]+`",
158
- "name": "keyword.operator.other.source.mercury"
18
+ "end": "\\*/"
159
19
  },
160
20
  "line_comment": {
21
+ "name": "comment.comment.source.mercury",
161
22
  "begin": "(^[ \\t]+)?(%([-]+%)?)",
162
23
  "beginCaptures": {
163
24
  "1": {
@@ -168,9 +29,9 @@
168
29
  }
169
30
  },
170
31
  "end": "(?!\\G)",
171
- "name": "comment.comment.source.mercury",
172
32
  "patterns": [
173
33
  {
34
+ "match": "(([ \\t]+(XXX|TODO|FIXME|WARNING|IMPORTANT|NOTE(_TO_IMPLEMENTORS)?)\\b)*)(.*)",
174
35
  "captures": {
175
36
  "0": {
176
37
  "name": "comment.comment.source.mercury"
@@ -178,28 +39,12 @@
178
39
  "1": {
179
40
  "name": "constant.language.warn.source.mercury"
180
41
  }
181
- },
182
- "match": "(([ \\t]+(XXX|TODO|FIXME|WARNING|IMPORTANT|NOTE(_TO_IMPLEMENTORS)?)\\b)*)(.*)"
42
+ }
183
43
  }
184
44
  ]
185
45
  },
186
- "logic_keywords": {
187
- "match": "(?x)\\b(yes|no|true|false|(semidet_)?succeed|(semidet_)?fail |some|all|require_complete_switch )\\b",
188
- "name": "constant.language.logic.source.mercury"
189
- },
190
- "number": {
191
- "match": "\\b(0(?!['])[0-7]*|0['].|[1-9][0-9]*|\\.[0-9]+([eE][0-9]+)?|0[xX][0-9a-fA-F]+|0[bB][01]+)\\b",
192
- "name": "constant.numeric.source.mercury"
193
- },
194
- "purity_level": {
195
- "match": "\\b((promise_)(semi)?pure|(im|semi)?pure)\\b",
196
- "name": "storage.type.source.mercury"
197
- },
198
- "singleton_variable": {
199
- "match": "\\b_[A-Z]?[a-zA-Z0-9_]*\\b",
200
- "name": "support.variable"
201
- },
202
46
  "string_quoted_double": {
47
+ "name": "string.quoted.double.source.mercury",
203
48
  "begin": "\"",
204
49
  "beginCaptures": {
205
50
  "0": {
@@ -212,7 +57,6 @@
212
57
  "name": "punctuation.literal.string.end.source.mercury"
213
58
  }
214
59
  },
215
- "name": "string.quoted.double.source.mercury",
216
60
  "patterns": [
217
61
  {
218
62
  "match": "\\\\.",
@@ -228,6 +72,63 @@
228
72
  }
229
73
  ]
230
74
  },
75
+ "atom": {
76
+ "name": "string.quoted.single.source.mercury",
77
+ "begin": "'",
78
+ "beginCaptures": {
79
+ "0": {
80
+ "name": "punctuation.definition.string.begin.source.mercury"
81
+ }
82
+ },
83
+ "end": "'(?!['])",
84
+ "endCaptures": {
85
+ "0": {
86
+ "name": "punctuation.definition.string.end.source.mercury"
87
+ }
88
+ },
89
+ "patterns": [
90
+ {
91
+ "match": "\\\\.",
92
+ "name": "constant.character.escape.source.mercury"
93
+ },
94
+ {
95
+ "match": "\\'\\'",
96
+ "name": "constant.character.escape.quote.source.mercury"
97
+ }
98
+ ]
99
+ },
100
+ "inline_bin_op": {
101
+ "match": "`[^`]+`",
102
+ "name": "keyword.operator.other.source.mercury"
103
+ },
104
+ "decl_keywords": {
105
+ "match": "\\b(is|where)\\b",
106
+ "name": "keyword.control.declaration.source.mercury"
107
+ },
108
+ "determ_keywords": {
109
+ "match": "(?x)\\b(require_(_switch_arms)?)?(multi|cc_(multi|nondet) |det|semidet|nondet |errorneous|failure )\\b",
110
+ "name": "constant.language.determ.source.mercury"
111
+ },
112
+ "logic_keywords": {
113
+ "match": "(?x)\\b(yes|no|true|false|(semidet_)?succeed|(semidet_)?fail |some|all|require_complete_switch )\\b",
114
+ "name": "constant.language.logic.source.mercury"
115
+ },
116
+ "purity_level": {
117
+ "match": "\\b((promise_)(semi)?pure|(im|semi)?pure)\\b",
118
+ "name": "storage.type.source.mercury"
119
+ },
120
+ "foreign_mods": {
121
+ "match": "(?x)\\b(affects_liveness|(does_not|doesnt)_affect_liveness |attach_to_io_state |can_pass_as_mercury_type|stable |(may_call|will_not)(_call_mercury|_modify) |(may_)(not_)?_duplicate |(no_|unknown_)?sharing|tabled_for_io|local |(un)?trailed |(not_|maybe_)?thread_safe |will_not_throw_exception )\\b",
122
+ "name": "storage.type.source.mercury"
123
+ },
124
+ "impl_defined_variable": {
125
+ "match": "[$][a-zA-Z0-9_]*\\b",
126
+ "name": "variable.language.source.mercury"
127
+ },
128
+ "singleton_variable": {
129
+ "match": "\\b_[A-Z]?[a-zA-Z0-9_]*\\b",
130
+ "name": "support.variable"
131
+ },
231
132
  "variable": {
232
133
  "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
233
134
  "name": "variable.other"
@@ -244,8 +145,107 @@
244
145
  "include": "#variable"
245
146
  }
246
147
  ]
148
+ },
149
+ "declarations": {
150
+ "patterns": [
151
+ {
152
+ "match": "(?x)(^[ \\t]*:-)[ ]((use|include|end|import|)_module|module |func|pred|type(class)?|inst(ance)? |mode|interface|implementation )\\b",
153
+ "captures": {
154
+ "1": {
155
+ "name": "keyword.operator.logic.source.mercury"
156
+ }
157
+ },
158
+ "name": "keyword.control.declaration.source.mercury"
159
+ },
160
+ {
161
+ "match": "(?x)(^[ \\t]*:-)[ ](pragma)[ ](check_termination|does_not_terminate|fact_table |inline|loop_check|memo|minimal_model|no_inline |obsolete|promise_equivalent_clauses|source_file |terminates|type_spec |foreign_(proc|type|decl|code|export(_enum)? |enum|import_module) )\\b",
162
+ "captures": {
163
+ "1": {
164
+ "name": "keyword.operator.logic.source.mercury"
165
+ },
166
+ "2": {
167
+ "name": "keyword.control.pragma.source.mercury"
168
+ }
169
+ },
170
+ "name": "constant.language.pragma.source.mercury"
171
+ }
172
+ ]
173
+ },
174
+ "common_ops": {
175
+ "patterns": [
176
+ {
177
+ "match": "(-(?![>-])|[+](?![+])|[*][*]?|/(?![\\\\/])|//|\\\\(?![/=]))",
178
+ "name": "keyword.operator.arithmetic.source.mercury"
179
+ },
180
+ {
181
+ "match": "(=<|>=|<(?![=])|(?![-])>)",
182
+ "name": "keyword.operator.comparison.source.mercury"
183
+ },
184
+ {
185
+ "match": "(<=>|<=|=>|\\\\=|==|:-|=(?![=<>])|,|;|->|/\\\\(?![=])|\\\\/|@)",
186
+ "name": "keyword.operator.logic.source.mercury"
187
+ },
188
+ {
189
+ "match": "(-->|--->|[+][+](?![+])|::|:=|![\\.:]?|\\||\\^)",
190
+ "name": "keyword.operator.other.source.mercury"
191
+ },
192
+ {
193
+ "match": "(\\(|\\)|\\[|\\]|\\{|\\})",
194
+ "name": "keyword.operator.list.source.mercury"
195
+ },
196
+ {
197
+ "match": "\\.(?=[ \\t]*($|%))",
198
+ "name": "keyword.operator.terminator.source.mercury"
199
+ }
200
+ ]
201
+ },
202
+ "number": {
203
+ "match": "\\b(0(?!['])[0-7]*|0['].|[1-9][0-9]*|\\.[0-9]+([eE][0-9]+)?|0[xX][0-9a-fA-F]+|0[bB][01]+)\\b",
204
+ "name": "constant.numeric.source.mercury"
247
205
  }
248
206
  },
249
- "scopeName": "source.mercury",
250
- "uuid": "A3E186F8-CF20-4983-B132-209EDF43E3DE"
207
+ "patterns": [
208
+ {
209
+ "include": "#number"
210
+ },
211
+ {
212
+ "include": "#string_quoted_double"
213
+ },
214
+ {
215
+ "include": "#inline_bin_op"
216
+ },
217
+ {
218
+ "include": "#atom"
219
+ },
220
+ {
221
+ "include": "#block_comment"
222
+ },
223
+ {
224
+ "include": "#line_comment"
225
+ },
226
+ {
227
+ "include": "#decl_keywords"
228
+ },
229
+ {
230
+ "include": "#purity_level"
231
+ },
232
+ {
233
+ "include": "#declarations"
234
+ },
235
+ {
236
+ "include": "#common_ops"
237
+ },
238
+ {
239
+ "include": "#determ_keywords"
240
+ },
241
+ {
242
+ "include": "#logic_keywords"
243
+ },
244
+ {
245
+ "include": "#foreign_mods"
246
+ },
247
+ {
248
+ "include": "#variables"
249
+ }
250
+ ]
251
251
  }