Unnamed repository; edit this file 'description' to name the repository.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
"return" @keyword.control.return

"local" @keyword.storage.modifier

"type" @keyword.storage.type

"function" @keyword.function

(break_stmt) @keyword.control
(continue_stmt) @keyword.control
(readwrite) @keyword.storage.modifier

[
  "do"
  "end"
] @keyword

[
  "while"
  "repeat"
  "until"
  "for"
] @keyword.control.repeat

[
  "if"
  "elseif"
  "else"
  "then"
] @keyword.control.conditional

[
  "in"
  "and"
  "or"
  "not"
] @keyword.operator

(ifexp
[
  "if"
  "then"
  "elseif"
  "else"
] @keyword.operator)

(type_stmt "export" @keyword.control.import) 

(_
  operator: [
    "+" "-" "*"  "/"  "//" "%"
    "^" "#" "==" "~=" "<=" ">="
    "<" ">" "&"  "|"  "->" "::"
    ".."
  ] @operator
)

(_
  assign_symbol: [
    "="  "+=" "-=" "*=" "/=" "//="
    "%=" "^=" "..="
  ] @operator
)

[
  ";"
  ":"
  ","
  "."
] @punctuation.delimiter

(string) @string

(_
  variable_name: (name) @variable
)

(_
  parameter_name: (name) @variable.parameter
)

(_
  method_name: (name) @function.method
)

(_
  function_name: (name) @function
)

(_
  table_name: (name) @namespace
)

(_
  field_name: (name) @variable.other.member
)

(table
[
  "{"
  "}"
] @constructor)

; special comment directives
(chunk
  .
  (comment)*
  .
  (comment) @keyword.directive
  (#match? @keyword.directive "^--!(strict|native)[\r]?$")
)

(comment) @comment

(number) @constant.numeric

(unicode_escape
  "{" @punctuation.special
  "codepoint" @constant.numeric.integer
  "}" @punctuation.special
)
(unicode_escape) @constant.character.escape
(dec_byte_escape) @constant.character.escape
(hex_byte_escape) @constant.character.escape
(simple_escape) @constant.character.escape

(interp_start) @punctuation.special
(interp_content) @string
(interp_brace_open) @punctuation.special
(interp_brace_close) @punctuation.special
(interp_end) @punctuation.special

[
 "("
 ")"
 "["
 "]"
 "{"
 "}"
 "<"
 ">"
] @punctuation.bracket

(_
  type_name: (name) @type
)

(type_stmt
  left: (name) @type
)

(_
  attribute_name: (name) @attribute
)

(exp
  (vararg) @constant
)

(nil) @constant.builtin

(boolean) @constant.builtin.boolean

(_
  generic_type_name: (name) @type.parameter
)

(_
  generic_typepack_name: (name) @type.parameter
)

(dyntype
  "typeof" @keyword.directive
)

(_
  module_namespace: (name) @namespace
)

; if the value of the field is a function, then
; color the name of a field assignment as a method
(field
  field_name: (name) @function.method
  value: (anon_fn)
)

; if a call statement is an invocation on a variable,
; color the last name in a name sequence as a function
(call_stmt
  invoked: (var
    variable_name: (name) @function
  )
)

(call_stmt
  invoked: (var
    table_name: (name) @namespace
    (key
      field_name: (name) @function
    )
    .
  )
)

(call_stmt
  invoked: (_
    (key
      field_name: (name) @function
    )
    .
  )
)

(fn_stmt
  (key
    field_name: (name) @function.method
  )
  .
  (paramlist)?
)

(_
  type_name: (name) @type.builtin
  (#any-of? @type.builtin
    "number" "string" "any"
    "never"                             "unknown"                          "boolean"
    "thread"                            "userdata"                         "Accessory"
    "Accoutrement"                      "Actor"                            "AdGui"
    "AdPortal"                          "AdService"                        "AdvancedDragger"
    "AirController"                     "AlignOrientation"                 "AlignPosition"
    "AnalysticsSettings"                "AnalyticsService"                 "AngularVelocity"
    "Animation"                         "AnimationClip"                    "AnimationClipProvider"
    "AnimationController"               "AnimationFromVideoCreatorService" "AnimationFromVideoCreatorStudioService"
    "AnimationRigData"                  "AnimationStreamTrack"             "AnimationTrack"
    "Animator"                          "AppStorageService"                "AppUpdateService"
    "ArcHandles"                        "AssetCounterService"              "AssetDeliveryProxy"
    "AssetImportService"                "AssetImportSession"               "AssetManagerService"
    "AssetService"                      "AssetSoundEffect"                 "Atmosphere"
    "Attachment"                        "AvatarEditorService"              "AvatarImportService"
    "Axes"                              "Backpack"                         "BackpackItem"
    "BadgeService"                      "BallSocketConstraint"             "BasePart"
    "BasePlayerGui"                     "BaseScript"                       "BaseWrap"
    "Beam"                              "BillboardGui"                     "BinaryStringValue"
    "BindableEvent"                     "BindableFunction"                 "BloomEffect"
    "BlurEffect"                        "BodyAngularVelocity"              "BodyColors"
    "BodyForce"                         "BodyGyro"                         "BodyMover"
    "BodyPosition"                      "BodyThrust"                       "BodyVelocity"
    "Bone"                              "BoolValue"                        "BoxHandleAdornment"
    "Breakpoint"                        "BrickColor"                       "BrickColorValue"
    "BrowserService"                    "BubbleChatConfiguration"          "BulkImportService"
    "CFrame"                            "CFrameValue"                      "CSGDictionaryService"
    "CacheableContentProvider"          "CalloutService"                   "Camera"
    "CanvasGroup"                       "CatalogPages"                     "CatalogSearchParams"
    "ChangeHistoryService"              "ChannelSelectorSoundEffect"       "CharacterAppearance"
    "CharacterMesh"                     "Chat"                             "ChatInputBarConfiguration"
    "ChatWindowConfiguration"           "ChorusSoundEffect"                "ClickDetector"
    "ClientReplicator"                  "ClimbController"                  "Clothing"
    "CloudLocalizationTable"            "Clouds"                           "ClusterPacketCache"
    "CollectionService"                 "Color3"                           "ColorCorrectionEffect"
    "ColorSequence"                     "ColorSequenceKeypoint"            "CommandInstance"
    "CommandService"                    "CompressorSoundEffect"            "ConeHandleAdornment"
    "Configuration"                     "ConfigureServerService"           "Constraint"
    "Content"                           "ContentProvider"                  "ContextActionService"
    "Controller"                        "ControllerBase"                   "ControllerManager"
    "ControllerService"                 "CookiesService"                   "CoreGui"
    "CorePackages"                      "CoreScript"                       "CoreScriptSyncService"
    "CornerWedgePart"                   "CrossDMScriptChangeListener"      "CurveAnimation"
    "CustomSoundEffect"                 "CylinderHandleAdornment"          "CylindricalConstraint"
    "DataModel"                         "DataModelMesh"                    "DataModelPatchService"
    "DataModelSession"                  "DataStore"                        "DataStoreIncrementOptions"
    "DataStoreInfo"                     "DataStoreKey"                     "DataStoreKeyInfo"
    "DataStoreKeyPages"                 "DataStoreListingPages"            "DataStoreObjectVersionInfo"
    "DataStoreOptions"                  "DataStorePages"                   "DataStoreService"
    "DataStoreSetOptions"               "DataStoreVersionPages"            "DateTime"
    "Debris"                            "DebugSettings"                    "DebuggablePluginWatcher"
    "DebuggerBreakpoint"                "DebuggerConnection"               "DebuggerConnectionManager"
    "DebuggerLuaResponse"               "DebuggerManager"                  "DebuggerUIService"
    "DebuggerVariable"                  "DebuggerWatch"                    "Decal"
    "DepthOfFieldEffect"                "DeviceIdService"                  "Dialog"
    "DialogChoice"                      "DistortionSoundEffect"            "DockWidgetPluginGui"
    "DockWidgetPluginGuiInfo"           "DraftsService"                    "Dragger"
    "DraggerService"                    "DynamicRotate"                    "EchoSoundEffect"
    "EditableImage"                     "EditableMesh"                     "EmotesPages"
    "Enum"                              "EnumItem"                         "Enums"
    "EqualizerSoundEffect"              "EulerRotationCurve"               "EventIngestService"
    "ExperienceInviteOptions"           "Explosion"                        "FaceAnimatorService"
    "FaceControls"                      "FaceInstance"                     "Faces"
    "FacialAnimationRecordingService"   "FacialAnimationStreamingService"  "Feature"
    "File"                              "FileMesh"                         "Fire"
    "FlagStandService"                  "FlangeSoundEffect"                "FloatCurve"
    "FlyweightService"                  "Folder"                           "Font"
    "ForceField"                        "FormFactorPart"                   "Frame"
    "FriendPages"                       "FriendService"                    "GamePassService"
    "GameSettings"                      "GamepadService"                   "GenericSettings"
    "Geometry"                          "GetTextBoundsParams"              "GlobalDataStore"
    "GlobalSettings"                    "GoogleAnalyticsConfiguration"     "GroundController"
    "GroupService"                      "GuiBase"                          "GuiButton"
    "GuiLabel"                          "GuiObject"                        "GuiService"
    "GuidRegistryService"               "HSRDataContentProvider"           "HandleAdornment"
    "Handles"                           "HandlesBase"                      "HapticService"
    "HeightmapImporterService"          "HiddenSurfaceRemovalAsset"        "Highlight"
    "HingeConstraint"                   "HttpRbxApiService"                "HttpRequest"
    "HttpService"                       "Humanoid"                         "HumanoidController"
    "HumanoidDescription"               "IKControl"                        "ILegacyStudioBridge"
    "IXPService"                        "ImageButton"                      "ImageHandleAdornment"
    "ImageLabel"                        "ImporterAnimationSettings"        "ImporterBaseSettings"
    "ImporterFacsSettings"              "ImporterGroupSettings"            "ImporterJointSettings"
    "ImporterMaterialSettings"          "ImporterMeshSettings"             "ImporterRootSettings"
    "IncrementalPatchBuilder"           "InputObject"                      "InsertService"
    "Instance"                          "InstanceAdornment"                "IntValue"
    "InventoryPages"                    "JointInstance"                    "KeyboardService"
    "Keyframe"                          "KeyframeMarker"                   "KeyframeSequence"
    "KeyframeSequenceProvider"          "LSPFileSyncService"               "LanguageService"
    "LayerCollector"                    "LegacyStudioBridge"               "Light"
    "Lighting"                          "LineForce"                        "LineHandleAdornment"
    "LinearVelocity"                    "LocalDebuggerConnection"          "LocalScript"
    "LocalStorageService"               "LocalizationService"              "LocalizationTable"
    "LodDataEntity"                     "LodDataService"                   "LogService"
    "LoginService"                      "LuaSettings"                      "LuaSourceContainer"
    "LuaWebService"                     "LuauScriptAnalyzerService"        "MarkerCurve"
    "MarketplaceService"                "MaterialService"                  "MaterialVariant"
    "MemStorageConnection"              "MemStorageService"                "MemoryStoreQueue"
    "MemoryStoreService"                "MemoryStoreSortedMap"             "MeshContentProvider"
    "MeshPart"                          "MessageBusConnection"             "MessageBusService"
    "MessagingService"                  "MetaBreakpoint"                   "MetaBreakpointContext"
    "MetaBreakpointManager"             "Model"                            "ModuleScript"
    "Motor"                             "Mouse"                            "MouseService"
    "MultipleDocumentInterfaceInstance" "NegateOperation"                  "NetworkClient"
    "NetworkMarker"                     "NetworkPeer"                      "NetworkReplicator"
    "NetworkServer"                     "NetworkSettings"                  "NoCollisionConstraint"
    "NonReplicatedCSGDictionaryService" "NotificationService"              "NumberPose"
    "NumberRange"                       "NumberSequence"                   "NumberSequenceKeypoint"
    "NumberValue"                       "Object"                           "ObjectValue"
    "OrderedDataStore"                  "OutfitPages"                      "OverlapParams"
    "PVAdornment"                       "PVInstance"                       "PackageLink"
    "PackageService"                    "PackageUIService"                 "Pages"
    "Pants"                             "ParabolaAdornment"                "Part"
    "PartAdornment"                     "PartOperation"                    "PartOperationAsset"
    "ParticleEmitter"                   "PatchMapping"                     "Path"
    "PathWaypoint"                      "PathfindingLink"                  "PathfindingModifier"
    "PathfindingService"                "PausedState"                      "PausedStateBreakpoint"
    "PausedStateException"              "PermissionsService"               "PhysicalProperties"
    "PhysicsService"                    "PhysicsSettings"                  "PitchShiftSoundEffect"
    "PlaneConstraint"                   "Platform"                         "Player"
    "PlayerEmulatorService"             "PlayerGui"                        "PlayerMouse"
    "PlayerScripts"                     "Players"                          "Plugin"
    "PluginAction"                      "PluginDebugService"               "PluginDragEvent"
    "PluginGui"                         "PluginGuiService"                 "PluginManagementService"
    "PluginManager"                     "PluginManagerInterface"           "PluginMenu"
    "PluginMouse"                       "PluginPolicyService"              "PluginToolbar"
    "PluginToolbarButton"               "PointLight"                       "PolicyService"
    "Pose"                              "PoseBase"                         "PostEffect"
    "PrismaticConstraint"               "ProcessInstancePhysicsService"    "ProximityPrompt"
    "ProximityPromptService"            "PublishService"                   "QWidgetPluginGui"
    "RBXScriptConnection"               "Random"                           "Ray"
    "RayValue"                          "RaycastParams"                    "RaycastResult"
    "RbxAnalyticsService"               "Rect"                             "ReflectionMetadata"
    "ReflectionMetadataCallbacks"       "ReflectionMetadataClass"          "ReflectionMetadataClasses"
    "ReflectionMetadataEnum"            "ReflectionMetadataEnumItem"       "ReflectionMetadataEnums"
    "ReflectionMetadataEvents"          "ReflectionMetadataFunctions"      "ReflectionMetadataItem"
    "ReflectionMetadataMember"          "ReflectionMetadataProperties"     "ReflectionMetadataYieldFunctions"
    "Region3"                           "Region3int16"                     "RemoteDebuggerServer"
    "RemoteEvent"                       "RemoteFunction"                   "RenderSettings"
    "RenderingTest"                     "ReplicatedFirst"                  "ReplicatedStorage"
    "ReverbSoundEffect"                 "RigidConstraint"                  "RobloxPluginGuiService"
    "RobloxReplicatedStorage"           "RodConstraint"                    "RopeConstraint"
    "RotationCurve"                     "RtMessagingService"               "RunService"
    "RunningAverageItemDouble"          "RunningAverageItemInt"            "RunningAverageTimeIntervalItem"
    "RuntimeScriptService"              "ScreenGui"                        "ScreenshotHud"
    "Script"                            "ScriptChangeService"              "ScriptCloneWatcher"
    "ScriptCloneWatcherHelper"          "ScriptContext"                    "ScriptDebugger"
    "ScriptDocument"                    "ScriptEditorService"              "ScriptRegistrationService"
    "ScriptService"                     "ScrollingFrame"                   "Seat"
    "Selection"                         "SelectionBox"                     "SelectionLasso"
    "SelectionSphere"                   "ServerReplicator"                 "ServerScriptService"
    "ServerStorage"                     "ServiceProvider"                  "SessionService"
    "Shirt"                             "ShirtGraphic"                     "SkateboardController"
    "Sky"                               "SlidingBallConstraint"            "Smoke"
    "SnippetService"                    "SocialService"                    "SolidModelContentProvider"
    "Sound"                             "SoundEffect"                      "SoundGroup"
    "SoundService"                      "Sparkles"                         "SpawnLocation"
    "SpawnerService"                    "SpecialMesh"                      "SphereHandleAdornment"
    "SpotLight"                         "SpringConstraint"                 "StackFrame"
    "StandalonePluginScripts"           "StandardPages"                    "StarterCharacterScripts"
    "StarterGear"                       "StarterGui"                       "StarterPack"
    "StarterPlayer"                     "StarterPlayerScripts"             "Stats"
    "StatsItem"                         "StopWatchReporter"                "StringValue"
    "Studio"                            "StudioAssetService"               "StudioData"
    "StudioDeviceEmulatorService"       "StudioHighDpiService"             "StudioPublishService"
    "StudioScriptDebugEventListener"    "StudioService"                    "StudioTheme"
    "SunRaysEffect"                     "SurfaceAppearance"                "SurfaceGui"
    "SurfaceGuiBase"                    "SurfaceLight"                     "SurfaceSelection"
    "SwimController"                    "TaskScheduler"                    "Team"
    "TeamCreateService"                 "Teams"                            "TeleportAsyncResult"
    "TeleportOptions"                   "TeleportService"                  "TemporaryCageMeshProvider"
    "TemporaryScriptService"            "Terrain"                          "TerrainDetail"
    "TerrainRegion"                     "TestService"                      "TextBox"
    "TextBoxService"                    "TextButton"                       "TextChannel"
    "TextChatCommand"                   "TextChatConfigurations"           "TextChatMessage"
    "TextChatMessageProperties"         "TextChatService"                  "TextFilterResult"
    "TextLabel"                         "TextService"                      "TextSource"
    "Texture"                           "ThirdPartyUserService"            "ThreadState"
    "TimerService"                      "ToastNotificationService"         "Tool"
    "Torque"                            "TorsionSpringConstraint"          "TotalCountTimeIntervalItem"
    "TouchInputService"                 "TouchTransmitter"                 "TracerService"
    "TrackerLodController"              "TrackerStreamAnimation"           "Trail"
    "Translator"                        "TremoloSoundEffect"               "TriangleMeshPart"
    "TrussPart"                         "Tween"                            "TweenBase"
    "TweenInfo"                         "TweenService"                     "UDim"
    "UGCValidationService"              "UIAspectRatioConstraint"          "UIBase"
    "UIComponent"                       "UIConstraint"                     "UICorner"
    "UIGradient"                        "UIGridLayout"                     "UIGridStyleLayout"
    "UILayout"                          "UIListLayout"                     "UIPadding"
    "UIPageLayout"                      "UIScale"                          "UISizeConstraint"
    "UIStroke"                          "UITableLayout"                    "UITextSizeConstraint"
    "UnionOperation"                    "UniversalConstraint"              "UnreliableRemoteEvent"
    "UnvalidatedAssetService"           "UserGameSettings"                 "UserInputService"
    "UserService"                       "UserSettings"                     "UserStorageService"
    "VRService"                         "ValueBase"                        "Vector2"
    "Vector2int16"                      "Vector3"                          "Vector3int16"
    "VectorForce"                       "VehicleController"                "VehicleSeat"
    "VelocityMotor"                     "VersionControlService"            "VideoCaptureService"
    "VideoFrame"                        "ViewportFrame"                    "VirtualInputManager"
    "VirtualUser"                       "VisibilityService"                "Visit"
    "VoiceChannel"                      "VoiceChatInternal"                "VoiceChatService"
    "WedgePart"                         "Weld"                             "WeldConstraint"
    "WireframeHandleAdornment"          "Workspace"                        "WorldModel"
    "WorldRoot"                         "WrapLayer"                        "WrapTarget"
  )
)

(var
  variable_name: (name) @function.builtin
  (#any-of? @function.builtin
    "assert"        "collectgarbage" "elapsedTime"
    "error"         "gcinfo"         "getfenv"
    "getmetatable"  "ipairs"         "loadstring"
    "next"          "newproxy"       "pairs"
    "pcall"         "PluginManager"  "print"
    "printidentity" "rawequal"       "rawget"
    "rawlen"        "rawset"         "require"
    "select"        "setfenv"        "setmetatable"
    "spawn"         "tick"           "time"
    "tonumber"      "tostring"       "type"
    "typeof"        "unpack"         "UserSettings"
    "version"       "warn"           "workspace"
    "xpcall")
)

(var
  .
  (name) @variable.builtin
  (#any-of? @variable.builtin
    "_G"        "_VERSION" "bit32"
    "coroutine" "debug"    "game"
    "math"      "os"       "plugin"
    "script"    "string"   "table"
    "task"      "utf8"     "workspace"
  )
)

(_ 
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "bit32")
  .
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin 
      "arshift" "lrotate" "lshift" "replace" 
      "rrotate" "rshift" "btest" "bxor" 
      "band" "bnot" "bor" "countlz" 
      "countrz" "extract" "byteswap"
    )
  )?
)

(_ table_name:
  (name) @variable.builtin
  (#eq? @variable.builtin "coroutine")
  .
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin
      "close"  "create"  "isyieldable"
      "resume" "running" "status"
      "wrap"   "yield"
    )
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "debug")
  .
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin
      "info"       "traceback"           "profilebegin"
      "profileend" "resetmemorycategory" "setmemorycategory"
      "dumpcodesize"
    )
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "math")
  .
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin
      "abs"        "acos"  "asin"
      "atan"       "atan2" "ceil"
      "clamp"      "cos"   "cosh"
      "deg"        "exp"   "floor"
      "fmod"       "frexp" "ldexp"
      "log"        "log10" "max"
      "min"        "modf"  "noise"
      "pow"        "rad"   "random"
      "randomseed" "round" "sign"
      "sin"        "sinh"  "sqrt"
      "tan"        "tanh"
    )
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "math")
  .
  (key
    field_name: (name) @constant.builtin
    ; (#match? @constant.builtin "^(huge|pi)$")
    (#any-of? @constant.builtin "huge" "pi")
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "os")
  .
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin
      "clock" "date" "difftime"
      "time")
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "string")
  .
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin
      "byte"    "char"     "find"
      "format"  "gmatch"   "gsub"
      "len"     "lower"    "match"
      "pack"    "packsize" "rep"
      "reverse" "split"    "sub"
      "unpack"  "upper")
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "table")
  .
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin 
      "create" "clear"    "clone" 
      "concat" "foreach"  "foreachi" 
      "find"   "freeze"   "getn" 
      "insert" "isfrozen" "maxn" 
      "move"   "pack"     "remove"
      "sort"   "unpack")
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "task")
  .
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin 
      "cancel"      "defer"         "delay" 
      "synchronize" "desynchronize" "spawn" 
      "wait")
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "utf8")
  .
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin 
      "char"         "codepoint"    "codes"
      "graphemes"    "len"          "offset"
      "nfcnormalize" "nfdnormalize")
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "utf8")
  .
  (key
    field_name: (name) @constant.builtin
    (#eq? @constant.builtin "charpattern")
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "buffer")
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin
      "create"   "fromstring" "tostring"
      "len"      "copy"       "fill"
      "readi8"   "readu8"     "readi16"
      "readu16"  "readi32"    "readu32"
      "readf32"  "readf64"    "writei8"
      "writeu8"  "writei16"   "writeu16"
      "writei32" "writeu32"   "writef32"
      "writef64" "readstring" "writestring")
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "vector")
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin
      "create" "magnitude" "normalize"
      "cross"  "dot"       "angle"
      "floor"  "ceil"      "abs"
      "sign"   "clamp"     "max"
      "min"
    )
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "vector")
  (key
    field_name: (name) @constant.builtin
    (#any-of? @constant.builtin
      "zero" "one"
    )
  )?
)

(_
  table_name: (name) @variable.builtin
  (#eq? @variable.builtin "Content")
  (key
    field_name: (name) @function.builtin
    (#any-of? @function.builtin
      "fromUri" "fromAssetId" "fromObject"
    )
  )?
)

(type_fn_stmt
  body: (_
    [
      (_
        variable_name: (name) @variable.builtin
        (#eq? @variable.builtin "types")
      )
      (_
        table_name: (name) @variable.builtin
        (#eq? @variable.builtin "types")
        (key
          field_name: (name) @function.builtin
          (#any-of? @function.builtin
            ""
          )
        )
      )
    ]
  )
)

(call_stmt
  method_table: (var
    (name) @variable.builtin
    (#eq? @variable.builtin "game")
  )
  method_name: (name) @function.builtin
  (#eq? @function.builtin "GetService")
  (arglist
    .
    (string)? @string.special
    (#any-of? @string.special
      "\"AccountService\""                         "\"AchievementService\""                "\"AdService\""
      "\"AnalyticsService\""                       "\"AnimationClipProvider\""             "\"AnimationFromVideoCreatorService\""
      "\"AnimationFromVideoCreatorStudioService\"" "\"AnnotationsService\""                "\"AppLifecycleObserverService\""
      "\"AppUpdateService\""                       "\"AssetCounterService\""               "\"AssetDeliveryProxy\""
      "\"AssetImportService\""                     "\"AssetManagerService\""               "\"AssetService\""
      "\"AudioFocusService\""                      "\"AvatarChatService\""                 "\"AvatarCreationService\""
      "\"AvatarEditorService\""                    "\"AvatarImportService\""               "\"BadgeService\""
      "\"CoreGui\""                                "\"StarterGui\""                        "\"BrowserService\""
      "\"BulkImportService\""                      "\"CacheableContentProvider\""          "\"HSRDataContentProvider\""
      "\"MeshContentProvider\""                    "\"SolidModelContentProvider\""         "\"CalloutService\""
      "\"CaptureService\""                         "\"ChangeHistoryService\""              "\"Chat\""
      "\"ChatbotUIService\""                       "\"CloudCRUDService\""                  "\"ClusterPacketCache\""
      "\"CollaboratorsService\""                   "\"CollectionService\""                 "\"CommandService\""
      "\"CommerceService\""                        "\"ConfigureServerService\""            "\"ConnectivityService\""
      "\"ContentProvider\""                        "\"ContextActionService\""              "\"ControllerService\""
      "\"ConversationalAIAcceptanceService\""      "\"CookiesService\""                    "\"CorePackages\""
      "\"CoreScriptDebuggingManagerHelper\""       "\"CoreScriptSyncService\""             "\"CreationDBService\""
      "\"CreatorStoreService\""                    "\"CrossDMScriptChangeListener\""       "\"DataModelPatchService\""
      "\"DataStoreService\""                       "\"Debris\""                            "\"DebuggablePluginWatcher\""
      "\"DebuggerConnectionManager\""              "\"DebuggerManager\""                   "\"DebuggerUIService\""
      "\"DeviceIdService\""                        "\"DraftsService\""                     "\"DraggerService\""
      "\"EditableService\""                        "\"EventIngestService\""                "\"ExampleService\""
      "\"ExperienceAuthService\""                  "\"ExperienceNotificationService\""     "\"ExperienceService\""
      "\"ExperienceStateCaptureService\""          "\"FaceAnimatorService\""               "\"FacialAnimationRecordingService\""
      "\"FacialAnimationStreamingServiceV2\""      "\"FlagStandService\""                  "\"FlyweightService\""
      "\"CSGDictionaryService\""                   "\"NonReplicatedCSGDictionaryService\"" "\"FriendService\""
      "\"GamePassService\""                        "\"GamepadService\""                    "\"GenericChallengeService\""
      "\"Geometry\""                               "\"GeometryService\""                   "\"GoogleAnalyticsConfiguration\""
      "\"GroupService\""                           "\"GuiService\""                        "\"GuidRegistryService\""
      "\"HapticService\""                          "\"HeatmapService\""                    "\"HeightmapImporterService\""
      "\"Hopper\""                                 "\"HttpRbxApiService\""                 "\"HttpService\""
      "\"ILegacyStudioBridge\""                    "\"LegacyStudioBridge\""                "\"IXPService\""
      "\"IncrementalPatchBuilder\""                "\"InsertService\""                     "\"InternalSyncService\""
      "\"JointsService\""                          "\"KeyboardService\""                   "\"KeyframeSequenceProvider\""
      "\"LSPFileSyncService\""                     "\"LanguageService\""                   "\"Lighting\""
      "\"LinkingService\""                         "\"LiveScriptingService\""              "\"LocalStorageService\""
      "\"AppStorageService\""                      "\"UserStorageService\""                "\"LocalizationService\""
      "\"LodDataService\""                         "\"LogReporterService\""                "\"LogService\""
      "\"LoginService\""                           "\"LuaWebService\""                     "\"LuauScriptAnalyzerService\""
      "\"MarketplaceService\""                     "\"MaterialGenerationService\""         "\"MaterialService\""
      "\"MemStorageService\""                      "\"MemoryStoreService\""                "\"MessageBusService\""
      "\"MessagingService\""                       "\"MetaBreakpointManager\""             "\"MouseService\""
      "\"NetworkClient\""                          "\"NetworkServer\""                     "\"NetworkSettings\""
      "\"NotificationService\""                    "\"OmniRecommendationsService\""        "\"OpenCloudService\""
      "\"Workspace\""                              "\"PackageService\""                    "\"PackageUIService\""
      "\"PatchBundlerFileWatch\""                  "\"PathfindingService\""                "\"PermissionsService\""
      "\"PhysicsService\""                         "\"PlaceStatsService\""                 "\"PlacesService\""
      "\"PlatformCloudStorageService\""            "\"PlatformFriendsService\""            "\"PlayerEmulatorService\""
      "\"PlayerHydrationService\""                 "\"PlayerViewService\""                 "\"Players\""
      "\"PluginDebugService\""                     "\"PluginGuiService\""                  "\"PluginManagementService\""
      "\"PluginPolicyService\""                    "\"PointsService\""                     "\"PolicyService\""
      "\"ProcessInstancePhysicsService\""          "\"ProximityPromptService\""            "\"PublishService\""
      "\"RbxAnalyticsService\""                    "\"ReflectionService\""                 "\"RemoteCursorService\""
      "\"RemoteDebuggerServer\""                   "\"RenderSettings\""                    "\"ReplicatedFirst\""
      "\"ReplicatedStorage\""                      "\"RibbonNotificationService\""         "\"RobloxPluginGuiService\""
      "\"RobloxReplicatedStorage\""                "\"RobloxServerStorage\""               "\"RomarkRbxAnalyticsService\""
      "\"RomarkService\""                          "\"RtMessagingService\""                "\"RunService\""
      "\"RuntimeScriptService\""                   "\"SafetyService\""                     "\"ScriptChangeService\""
      "\"ScriptCloneWatcher\""                     "\"ScriptCloneWatcherHelper\""          "\"ScriptCommitService\""
      "\"ScriptContext\""                          "\"ScriptEditorService\""               "\"ScriptProfilerService\""
      "\"ScriptRegistrationService\""              "\"ScriptService\""                     "\"Selection\""
      "\"SelectionHighlightManager\""              "\"ServerScriptService\""               "\"ServerStorage\""
      "\"ServiceVisibilityService\""               "\"SessionService\""                    "\"SharedTableRegistry\""
      "\"ShorelineUpgraderService\""               "\"SmoothVoxelsUpgraderService\""       "\"SnippetService\""
      "\"SocialService\""                          "\"SoundService\""                      "\"SpawnerService\""
      "\"StartPageService\""                       "\"StarterPack\""                       "\"StarterPlayer\""
      "\"StartupMessageService\""                  "\"Stats\""                             "\"StopWatchReporter\""
      "\"StreamingService\""                       "\"Studio\""                            "\"StudioAssetService\""
      "\"StudioData\""                             "\"StudioDeviceEmulatorService\""       "\"StudioPublishService\""
      "\"StudioScriptDebugEventListener\""         "\"StudioSdkService\""                  "\"StudioService\""
      "\"StudioUserService\""                      "\"StudioWidgetsService\""              "\"StylingService\""
      "\"TaskScheduler\""                          "\"TeamCreateData\""                    "\"TeamCreatePublishService\""
      "\"TeamCreateService\""                      "\"Teams\""                             "\"TeleportService\""
      "\"TemporaryCageMeshProvider\""              "\"TemporaryScriptService\""            "\"TestService\""
      "\"TextBoxService\""                         "\"TextChatService\""                   "\"TextService\""
      "\"TextureGenerationService\""               "\"ThirdPartyUserService\""             "\"TimerService\""
      "\"ToastNotificationService\""               "\"TouchInputService\""                 "\"TracerService\""
      "\"TutorialService\""                        "\"TweenService\""                      "\"UGCAvatarService\""
      "\"UGCValidationService\""                   "\"UIDragDetectorService\""             "\"UnvalidatedAssetService\""
      "\"UserInputService\""                       "\"UserService\""                       "\"VRService\""
      "\"VRStatusService\""                        "\"VersionControlService\""             "\"VideoCaptureService\""
      "\"VideoService\""                           "\"VirtualInputManager\""               "\"VirtualUser\""
      "\"VisibilityCheckDispatcher\""              "\"Visit\""                             "\"VisualizationModeService\""
      "\"VoiceChatInternal\""                      "\"VoiceChatService\""                  "\"WebViewService\""
    )
    .
  )
)