gdscript.py 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586
  1. # -*- coding: utf-8 -*-
  2. """
  3. pygments.lexers.gdscript
  4. ~~~~~~~~~~~~~~~~~~~~~~
  5. Lexer for GDScript.
  6. :copyright: Copyright 2xxx by The Godot Engine Community
  7. :license: MIT.
  8. modified by Daniel J. Ramirez <[email protected]> based on the original python.py pygment
  9. further expanded and consolidated with the godot-docs lexer by Zackery R. Smith <[email protected]> and Ste.
  10. """
  11. from pygments.lexer import RegexLexer, include, bygroups, words, combined
  12. from pygments.token import (
  13. Keyword,
  14. Literal,
  15. Name,
  16. Comment,
  17. String,
  18. Number,
  19. Operator,
  20. Whitespace,
  21. Punctuation,
  22. )
  23. __all__ = ["GDScriptLexer"]
  24. class GDScriptLexer(RegexLexer):
  25. """
  26. For GDScript source code.
  27. """
  28. name = "GDScript"
  29. url = "https://www.godotengine.org"
  30. aliases = ["gdscript", "gd"]
  31. filenames = ["*.gd"]
  32. mimetypes = ["text/x-gdscript", "application/x-gdscript"]
  33. # taken from pygments/gdscript.py
  34. @staticmethod
  35. def inner_string_rules(ttype):
  36. return [
  37. # the old style '%s' % (...) string formatting
  38. (
  39. r"%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?"
  40. "[hlL]?[E-GXc-giorsux%]",
  41. String.Interpol,
  42. ),
  43. # backslashes, quotes, and formatting signs must be parsed one at a time
  44. (r'[^\\\'"%\n]+', ttype),
  45. (r'[\'"\\]', ttype),
  46. # unhandled string formatting sign
  47. (r"%", ttype),
  48. # newlines are an error (use "nl" state)
  49. ]
  50. tokens = {
  51. "whitespace": [(r"\s+", Whitespace)],
  52. "comment": [
  53. (r"##.*$", Comment.Doc),
  54. (r"#(?:end)?region.*$", Comment.Region),
  55. (r"#.*$", Comment.Single),
  56. ],
  57. "punctuation": [
  58. (r"[]{}(),:;[]", Punctuation),
  59. (r":\n", Punctuation),
  60. (r"\\", Punctuation),
  61. ],
  62. # NOTE: from github.com/godotengine/godot-docs
  63. "keyword": [
  64. (
  65. words(
  66. (
  67. # modules/gdscript/gdscript.cpp - GDScriptLanguage::get_reserved_words()
  68. # Declarations.
  69. "class",
  70. "class_name",
  71. "const",
  72. "enum",
  73. "extends",
  74. "func",
  75. "namespace", # Reserved for potential future use.
  76. "signal",
  77. "static",
  78. "trait", # Reserved for potential future use.
  79. "var",
  80. # Other keywords.
  81. "await",
  82. "breakpoint",
  83. "self",
  84. "super",
  85. "yield", # Reserved for potential future use.
  86. # Not really keywords, but used in property syntax.
  87. # also colored like functions, not keywords
  88. #"set",
  89. #"get",
  90. ),
  91. suffix=r"\b",
  92. ),
  93. Keyword,
  94. ),
  95. (
  96. words(
  97. (
  98. # modules/gdscript/gdscript.cpp - GDScriptLanguage::get_reserved_words()
  99. # Control flow.
  100. "break",
  101. "continue",
  102. "elif",
  103. "else",
  104. "for",
  105. "if",
  106. "match",
  107. "pass",
  108. "return",
  109. "when",
  110. "while",
  111. "yield",
  112. ),
  113. suffix=r"\b",
  114. ),
  115. # Custom control flow class used to give control flow keywords a different color,
  116. # like in the Godot editor.
  117. Keyword.ControlFlow,
  118. ),
  119. ],
  120. "builtin": [
  121. (
  122. words(
  123. ("true", "false", "PI", "TAU", "NAN", "INF", "null"),
  124. prefix=r"(?<!\.)",
  125. suffix=r"\b",
  126. ),
  127. Literal,
  128. ),
  129. # NOTE: from github.com/godotengine/godot-docs
  130. (
  131. words(
  132. (
  133. # doc/classes/@GlobalScope.xml
  134. "abs",
  135. "absf",
  136. "absi",
  137. "acos",
  138. "acosh",
  139. "angle_difference",
  140. "asin",
  141. "asinh",
  142. "atan",
  143. "atan2",
  144. "atanh",
  145. "bezier_derivative",
  146. "bezier_interpolate",
  147. "bytes_to_var",
  148. "bytes_to_var_with_objects",
  149. "ceil",
  150. "ceilf",
  151. "ceili",
  152. "clamp",
  153. "clampf",
  154. "clampi",
  155. "cos",
  156. "cosh",
  157. "cubic_interpolate",
  158. "cubic_interpolate_angle",
  159. "cubic_interpolate_angle_in_time",
  160. "cubic_interpolate_in_time",
  161. "db_to_linear",
  162. "deg_to_rad",
  163. "ease",
  164. "error_string",
  165. "exp",
  166. "floor",
  167. "floorf",
  168. "floori",
  169. "fmod",
  170. "fposmod",
  171. "hash",
  172. "instance_from_id",
  173. "inverse_lerp",
  174. "is_equal_approx",
  175. "is_finite",
  176. "is_inf",
  177. "is_instance_id_valid",
  178. "is_instance_valid",
  179. "is_nan",
  180. "is_same",
  181. "is_zero_approx",
  182. "lerp",
  183. "lerp_angle",
  184. "lerpf",
  185. "linear_to_db",
  186. "log",
  187. "max",
  188. "maxf",
  189. "maxi",
  190. "min",
  191. "minf",
  192. "mini",
  193. "move_toward",
  194. "nearest_po2",
  195. "pingpong",
  196. "posmod",
  197. "pow",
  198. "print",
  199. "print_rich",
  200. "print_verbose",
  201. "printerr",
  202. "printraw",
  203. "prints",
  204. "printt",
  205. "push_error",
  206. "push_warning",
  207. "rad_to_deg",
  208. "rand_from_seed",
  209. "randf",
  210. "randf_range",
  211. "randfn",
  212. "randi",
  213. "randi_range",
  214. "randomize",
  215. "remap",
  216. "rid_allocate_id",
  217. "rid_from_int64",
  218. "rotate_toward",
  219. "round",
  220. "roundf",
  221. "roundi",
  222. "seed",
  223. "sign",
  224. "signf",
  225. "signi",
  226. "sin",
  227. "sinh",
  228. "smoothstep",
  229. "snapped",
  230. "snappedf",
  231. "snappedi",
  232. "sqrt",
  233. "step_decimals",
  234. "str",
  235. "str_to_var",
  236. "tan",
  237. "tanh",
  238. "type_convert",
  239. "type_string",
  240. "typeof",
  241. "var_to_bytes",
  242. "var_to_bytes_with_objects",
  243. "var_to_str",
  244. "weakref",
  245. "wrap",
  246. "wrapf",
  247. "wrapi",
  248. # modules/gdscript/doc_classes/@GDScript.xml
  249. "Color8",
  250. "assert",
  251. "char",
  252. "convert",
  253. "dict_to_inst",
  254. "get_stack",
  255. "inst_to_dict",
  256. "is_instance_of",
  257. "len",
  258. "load",
  259. "ord",
  260. "preload",
  261. "print_debug",
  262. "print_stack",
  263. "range",
  264. "type_exists",
  265. ),
  266. prefix=r"(?<!\.)",
  267. suffix=r"\b",
  268. ),
  269. Name.Builtin.Function,
  270. ),
  271. (r"((?<!\.)(self)" r")\b", Name.Builtin.Pseudo),
  272. # NOTE: from github.com/godotengine/godot-docs
  273. (
  274. words(
  275. (
  276. # core/variant/variant.cpp - Variant::get_type_name()
  277. # `Nil` is excluded because it is not allowed in GDScript.
  278. "bool",
  279. "int",
  280. "float",
  281. "String",
  282. "Vector2",
  283. "Vector2i",
  284. "Rect2",
  285. "Rect2i",
  286. "Transform2D",
  287. "Vector3",
  288. "Vector3i",
  289. "Vector4",
  290. "Vector4i",
  291. "Plane",
  292. "AABB",
  293. "Quaternion",
  294. "Basis",
  295. "Transform3D",
  296. "Projection",
  297. "Color",
  298. "RID",
  299. "Object",
  300. "Callable",
  301. "Signal",
  302. "StringName",
  303. "NodePath",
  304. "Dictionary",
  305. "Array",
  306. "PackedByteArray",
  307. "PackedInt32Array",
  308. "PackedInt64Array",
  309. "PackedFloat32Array",
  310. "PackedFloat64Array",
  311. "PackedStringArray",
  312. "PackedVector2Array",
  313. "PackedVector3Array",
  314. "PackedColorArray",
  315. "PackedVector4Array",
  316. # The following are also considered types in GDScript.
  317. "Variant",
  318. "void",
  319. ),
  320. prefix=r"(?<!\.)",
  321. suffix=r"\b",
  322. ),
  323. Name.Builtin.Type,
  324. ),
  325. # copied from https://docs.godotengine.org/en/stable/classes/index.html
  326. (
  327. words(
  328. (
  329. # Nodes
  330. "Node",
  331. "AcceptDialog",
  332. "AnimatableBody2D",
  333. "AnimatableBody3D",
  334. "AnimatedSprite2D",
  335. "AnimatedSprite3D",
  336. "AnimationMixer",
  337. "AnimationPlayer",
  338. "AnimationTree",
  339. "Area2D",
  340. "Area3D",
  341. "AspectRatioContainer",
  342. "AudioListener2D",
  343. "AudioListener3D",
  344. "AudioStreamPlayer",
  345. "AudioStreamPlayer2D",
  346. "AudioStreamPlayer3D",
  347. "BackBufferCopy",
  348. "BaseButton",
  349. "Bone2D",
  350. "BoneAttachment3D",
  351. "BoxContainer",
  352. "Button",
  353. "Camera2D",
  354. "Camera3D",
  355. "CanvasGroup",
  356. "CanvasItem",
  357. "CanvasLayer",
  358. "CanvasModulate",
  359. "CenterContainer",
  360. "CharacterBody2D",
  361. "CharacterBody3D",
  362. "CheckBox",
  363. "CheckButton",
  364. "CodeEdit",
  365. "CollisionObject2D",
  366. "CollisionObject3D",
  367. "CollisionPolygon2D",
  368. "CollisionPolygon3D",
  369. "CollisionShape2D",
  370. "CollisionShape3D",
  371. "ColorPicker",
  372. "ColorPickerButton",
  373. "ColorRect",
  374. "ConeTwistJoint3D",
  375. "ConfirmationDialog",
  376. "Container",
  377. "Control",
  378. "CPUParticles2D",
  379. "CPUParticles3D",
  380. "CSGBox3D",
  381. "CSGCombiner3D",
  382. "CSGCylinder3D",
  383. "CSGMesh3D",
  384. "CSGPolygon3D",
  385. "CSGPrimitive3D",
  386. "CSGShape3D",
  387. "CSGSphere3D",
  388. "CSGTorus3D",
  389. "DampedSpringJoint2D",
  390. "Decal",
  391. "DirectionalLight2D",
  392. "DirectionalLight3D",
  393. "EditorCommandPalette",
  394. "EditorFileDialog",
  395. "EditorFileSystem",
  396. "EditorInspector",
  397. "EditorPlugin",
  398. "EditorProperty",
  399. "EditorResourcePicker",
  400. "EditorResourcePreview",
  401. "EditorScriptPicker",
  402. "EditorSpinSlider",
  403. "EditorToaster",
  404. "FileDialog",
  405. "FileSystemDock",
  406. "FlowContainer",
  407. "FogVolume",
  408. "Generic6DOFJoint3D",
  409. "GeometryInstance3D",
  410. "GPUParticles2D",
  411. "GPUParticles3D",
  412. "GPUParticlesAttractor3D",
  413. "GPUParticlesAttractorBox3D",
  414. "GPUParticlesAttractorSphere3D",
  415. "GPUParticlesAttractorVectorField3D",
  416. "GPUParticlesCollision3D",
  417. "GPUParticlesCollisionBox3D",
  418. "GPUParticlesCollisionHeightField3D",
  419. "GPUParticlesCollisionSDF3D",
  420. "GPUParticlesCollisionSphere3D",
  421. "GraphEdit",
  422. "GraphElement",
  423. "GraphFrame",
  424. "GraphNode",
  425. "GridContainer",
  426. "GridMap",
  427. "GridMapEditorPlugin",
  428. "GrooveJoint2D",
  429. "HBoxContainer",
  430. "HFlowContainer",
  431. "HingeJoint3D",
  432. "HScrollBar",
  433. "HSeparator",
  434. "HSlider",
  435. "HSplitContainer",
  436. "HTTPRequest",
  437. "ImporterMeshInstance3D",
  438. "InstancePlaceholder",
  439. "ItemList",
  440. "Joint2D",
  441. "Joint3D",
  442. "Label",
  443. "Label3D",
  444. "Light2D",
  445. "Light3D",
  446. "LightmapGI",
  447. "LightmapProbe",
  448. "LightOccluder2D",
  449. "Line2D",
  450. "LineEdit",
  451. "LinkButton",
  452. "LookAtModifier3D",
  453. "MarginContainer",
  454. "Marker2D",
  455. "Marker3D",
  456. "MenuBar",
  457. "MenuButton",
  458. "MeshInstance2D",
  459. "MeshInstance3D",
  460. "MissingNode",
  461. "MultiMeshInstance2D",
  462. "MultiMeshInstance3D",
  463. "MultiplayerSpawner",
  464. "MultiplayerSynchronizer",
  465. "NavigationAgent2D",
  466. "NavigationAgent3D",
  467. "NavigationLink2D",
  468. "NavigationLink3D",
  469. "NavigationObstacle2D",
  470. "NavigationObstacle3D",
  471. "NavigationRegion2D",
  472. "NavigationRegion3D",
  473. "NinePatchRect",
  474. "Node2D",
  475. "Node3D",
  476. "OccluderInstance3D",
  477. "OmniLight3D",
  478. "OpenXRBindingModifierEditor",
  479. "OpenXRCompositionLayer",
  480. "OpenXRCompositionLayerCylinder",
  481. "OpenXRCompositionLayerEquirect",
  482. "OpenXRCompositionLayerQuad",
  483. "OpenXRHand",
  484. "OpenXRInteractionProfileEditor",
  485. "OpenXRInteractionProfileEditorBase",
  486. "OpenXRVisibilityMask",
  487. "OptionButton",
  488. "Panel",
  489. "PanelContainer",
  490. "Parallax2D",
  491. "ParallaxBackground",
  492. "ParallaxLayer",
  493. "Path2D",
  494. "Path3D",
  495. "PathFollow2D",
  496. "PathFollow3D",
  497. "PhysicalBone2D",
  498. "PhysicalBone3D",
  499. "PhysicalBoneSimulator3D",
  500. "PhysicsBody2D",
  501. "PhysicsBody3D",
  502. "PinJoint2D",
  503. "PinJoint3D",
  504. "PointLight2D",
  505. "Polygon2D",
  506. "Popup",
  507. "PopupMenu",
  508. "PopupPanel",
  509. "ProgressBar",
  510. "Range",
  511. "RayCast2D",
  512. "RayCast3D",
  513. "ReferenceRect",
  514. "ReflectionProbe",
  515. "RemoteTransform2D",
  516. "RemoteTransform3D",
  517. "ResourcePreloader",
  518. "RetargetModifier3D",
  519. "RichTextLabel",
  520. "RigidBody2D",
  521. "RigidBody3D",
  522. "RootMotionView",
  523. "ScriptCreateDialog",
  524. "ScriptEditor",
  525. "ScriptEditorBase",
  526. "ScrollBar",
  527. "ScrollContainer",
  528. "Separator",
  529. "ShaderGlobalsOverride",
  530. "ShapeCast2D",
  531. "ShapeCast3D",
  532. "Skeleton2D",
  533. "Skeleton3D",
  534. "SkeletonIK3D",
  535. "SkeletonModifier3D",
  536. "Slider",
  537. "SliderJoint3D",
  538. "SoftBody3D",
  539. "SpinBox",
  540. "SplitContainer",
  541. "SpotLight3D",
  542. "SpringArm3D",
  543. "SpringBoneCollision3D",
  544. "SpringBoneCollisionCapsule3D",
  545. "SpringBoneCollisionPlane3D",
  546. "SpringBoneCollisionSphere3D",
  547. "SpringBoneSimulator3D",
  548. "Sprite2D",
  549. "Sprite3D",
  550. "SpriteBase3D",
  551. "StaticBody2D",
  552. "StaticBody3D",
  553. "StatusIndicator",
  554. "SubViewport",
  555. "SubViewportContainer",
  556. "TabBar",
  557. "TabContainer",
  558. "TextEdit",
  559. "TextureButton",
  560. "TextureProgressBar",
  561. "TextureRect",
  562. "TileMap",
  563. "TileMapLayer",
  564. "Timer",
  565. "TouchScreenButton",
  566. "Tree",
  567. "VBoxContainer",
  568. "VehicleBody3D",
  569. "VehicleWheel3D",
  570. "VFlowContainer",
  571. "VideoStreamPlayer",
  572. "Viewport",
  573. "VisibleOnScreenEnabler2D",
  574. "VisibleOnScreenEnabler3D",
  575. "VisibleOnScreenNotifier2D",
  576. "VisibleOnScreenNotifier3D",
  577. "VisualInstance3D",
  578. "VoxelGI",
  579. "VScrollBar",
  580. "VSeparator",
  581. "VSlider",
  582. "VSplitContainer",
  583. "Window",
  584. "WorldEnvironment",
  585. "XRAnchor3D",
  586. "XRBodyModifier3D",
  587. "XRCamera3D",
  588. "XRController3D",
  589. "XRFaceModifier3D",
  590. "XRHandModifier3D",
  591. "XRNode3D",
  592. "XROrigin3D",
  593. # Resources
  594. "Resource",
  595. "AnimatedTexture",
  596. "Animation",
  597. "AnimationLibrary",
  598. "AnimationNode",
  599. "AnimationNodeAdd2",
  600. "AnimationNodeAdd3",
  601. "AnimationNodeAnimation",
  602. "AnimationNodeBlend2",
  603. "AnimationNodeBlend3",
  604. "AnimationNodeBlendSpace1D",
  605. "AnimationNodeBlendSpace2D",
  606. "AnimationNodeBlendTree",
  607. "AnimationNodeExtension",
  608. "AnimationNodeOneShot",
  609. "AnimationNodeOutput",
  610. "AnimationNodeStateMachine",
  611. "AnimationNodeStateMachinePlayback",
  612. "AnimationNodeStateMachineTransition",
  613. "AnimationNodeSub2",
  614. "AnimationNodeSync",
  615. "AnimationNodeTimeScale",
  616. "AnimationNodeTimeSeek",
  617. "AnimationNodeTransition",
  618. "AnimationRootNode",
  619. "ArrayMesh",
  620. "ArrayOccluder3D",
  621. "AtlasTexture",
  622. "AudioBusLayout",
  623. "AudioEffect",
  624. "AudioEffectAmplify",
  625. "AudioEffectBandLimitFilter",
  626. "AudioEffectBandPassFilter",
  627. "AudioEffectCapture",
  628. "AudioEffectChorus",
  629. "AudioEffectCompressor",
  630. "AudioEffectDelay",
  631. "AudioEffectDistortion",
  632. "AudioEffectEQ",
  633. "AudioEffectEQ10",
  634. "AudioEffectEQ21",
  635. "AudioEffectEQ6",
  636. "AudioEffectFilter",
  637. "AudioEffectHardLimiter",
  638. "AudioEffectHighPassFilter",
  639. "AudioEffectHighShelfFilter",
  640. "AudioEffectLimiter",
  641. "AudioEffectLowPassFilter",
  642. "AudioEffectLowShelfFilter",
  643. "AudioEffectNotchFilter",
  644. "AudioEffectPanner",
  645. "AudioEffectPhaser",
  646. "AudioEffectPitchShift",
  647. "AudioEffectRecord",
  648. "AudioEffectReverb",
  649. "AudioEffectSpectrumAnalyzer",
  650. "AudioEffectStereoEnhance",
  651. "AudioStream",
  652. "AudioStreamGenerator",
  653. "AudioStreamInteractive",
  654. "AudioStreamMicrophone",
  655. "AudioStreamMP3",
  656. "AudioStreamOggVorbis",
  657. "AudioStreamPlaylist",
  658. "AudioStreamPolyphonic",
  659. "AudioStreamRandomizer",
  660. "AudioStreamSynchronized",
  661. "AudioStreamWAV",
  662. "BaseMaterial3D",
  663. "BitMap",
  664. "BoneMap",
  665. "BoxMesh",
  666. "BoxOccluder3D",
  667. "BoxShape3D",
  668. "ButtonGroup",
  669. "CameraAttributes",
  670. "CameraAttributesPhysical",
  671. "CameraAttributesPractical",
  672. "CameraTexture",
  673. "CanvasItemMaterial",
  674. "CanvasTexture",
  675. "CapsuleMesh",
  676. "CapsuleShape2D",
  677. "CapsuleShape3D",
  678. "CircleShape2D",
  679. "CodeHighlighter",
  680. "ColorPalette",
  681. "Compositor",
  682. "CompositorEffect",
  683. "CompressedCubemap",
  684. "CompressedCubemapArray",
  685. "CompressedTexture2D",
  686. "CompressedTexture2DArray",
  687. "CompressedTexture3D",
  688. "CompressedTextureLayered",
  689. "ConcavePolygonShape2D",
  690. "ConcavePolygonShape3D",
  691. "ConvexPolygonShape2D",
  692. "ConvexPolygonShape3D",
  693. "CryptoKey",
  694. "CSharpScript",
  695. "Cubemap",
  696. "CubemapArray",
  697. "Curve",
  698. "Curve2D",
  699. "Curve3D",
  700. "CurveTexture",
  701. "CurveXYZTexture",
  702. "CylinderMesh",
  703. "CylinderShape3D",
  704. "EditorNode3DGizmoPlugin",
  705. "EditorSettings",
  706. "EditorSyntaxHighlighter",
  707. "Environment",
  708. "ExternalTexture",
  709. "FastNoiseLite",
  710. "FBXDocument",
  711. "FBXState",
  712. "FogMaterial",
  713. "Font",
  714. "FontFile",
  715. "FontVariation",
  716. "GDExtension",
  717. "GDScript",
  718. "GDScriptSyntaxHighlighter",
  719. "GLTFAccessor",
  720. "GLTFAnimation",
  721. "GLTFBufferView",
  722. "GLTFCamera",
  723. "GLTFDocument",
  724. "GLTFDocumentExtension",
  725. "GLTFDocumentExtensionConvertImporterMesh",
  726. "GLTFLight",
  727. "GLTFMesh",
  728. "GLTFNode",
  729. "GLTFPhysicsBody",
  730. "GLTFPhysicsShape",
  731. "GLTFSkeleton",
  732. "GLTFSkin",
  733. "GLTFSpecGloss",
  734. "GLTFState",
  735. "GLTFTexture",
  736. "GLTFTextureSampler",
  737. "Gradient",
  738. "GradientTexture1D",
  739. "GradientTexture2D",
  740. "HeightMapShape3D",
  741. "Image",
  742. "ImageTexture",
  743. "ImageTexture3D",
  744. "ImageTextureLayered",
  745. "ImmediateMesh",
  746. "ImporterMesh",
  747. "InputEvent",
  748. "InputEventAction",
  749. "InputEventFromWindow",
  750. "InputEventGesture",
  751. "InputEventJoypadButton",
  752. "InputEventJoypadMotion",
  753. "InputEventKey",
  754. "InputEventMagnifyGesture",
  755. "InputEventMIDI",
  756. "InputEventMouse",
  757. "InputEventMouseButton",
  758. "InputEventMouseMotion",
  759. "InputEventPanGesture",
  760. "InputEventScreenDrag",
  761. "InputEventScreenTouch",
  762. "InputEventShortcut",
  763. "InputEventWithModifiers",
  764. "JSON",
  765. "LabelSettings",
  766. "LightmapGIData",
  767. "Material",
  768. "Mesh",
  769. "MeshLibrary",
  770. "MeshTexture",
  771. "MissingResource",
  772. "MultiMesh",
  773. "NavigationMesh",
  774. "NavigationMeshSourceGeometryData2D",
  775. "NavigationMeshSourceGeometryData3D",
  776. "NavigationPolygon",
  777. "Noise",
  778. "NoiseTexture2D",
  779. "NoiseTexture3D",
  780. "Occluder3D",
  781. "OccluderPolygon2D",
  782. "OggPacketSequence",
  783. "OpenXRAction",
  784. "OpenXRActionBindingModifier",
  785. "OpenXRActionMap",
  786. "OpenXRActionSet",
  787. "OpenXRAnalogThresholdModifier",
  788. "OpenXRBindingModifier",
  789. "OpenXRDpadBindingModifier",
  790. "OpenXRHapticBase",
  791. "OpenXRHapticVibration",
  792. "OpenXRInteractionProfile",
  793. "OpenXRIPBinding",
  794. "OpenXRIPBindingModifier",
  795. "OptimizedTranslation",
  796. "ORMMaterial3D",
  797. "PackedDataContainer",
  798. "PackedScene",
  799. "PanoramaSkyMaterial",
  800. "ParticleProcessMaterial",
  801. "PhysicalSkyMaterial",
  802. "PhysicsMaterial",
  803. "PlaceholderCubemap",
  804. "PlaceholderCubemapArray",
  805. "PlaceholderMaterial",
  806. "PlaceholderMesh",
  807. "PlaceholderTexture2D",
  808. "PlaceholderTexture2DArray",
  809. "PlaceholderTexture3D",
  810. "PlaceholderTextureLayered",
  811. "PlaneMesh",
  812. "PointMesh",
  813. "PolygonOccluder3D",
  814. "PolygonPathFinder",
  815. "PortableCompressedTexture2D",
  816. "PrimitiveMesh",
  817. "PrismMesh",
  818. "ProceduralSkyMaterial",
  819. "QuadMesh",
  820. "QuadOccluder3D",
  821. "RDShaderFile",
  822. "RDShaderSPIRV",
  823. "RectangleShape2D",
  824. "RibbonTrailMesh",
  825. "RichTextEffect",
  826. "SceneReplicationConfig",
  827. "Script",
  828. "ScriptExtension",
  829. "SegmentShape2D",
  830. "SeparationRayShape2D",
  831. "SeparationRayShape3D",
  832. "Shader",
  833. "ShaderInclude",
  834. "ShaderMaterial",
  835. "Shape2D",
  836. "Shape3D",
  837. "Shortcut",
  838. "SkeletonModification2D",
  839. "SkeletonModification2DCCDIK",
  840. "SkeletonModification2DFABRIK",
  841. "SkeletonModification2DJiggle",
  842. "SkeletonModification2DLookAt",
  843. "SkeletonModification2DPhysicalBones",
  844. "SkeletonModification2DStackHolder",
  845. "SkeletonModification2DTwoBoneIK",
  846. "SkeletonModificationStack2D",
  847. "SkeletonProfile",
  848. "SkeletonProfileHumanoid",
  849. "Skin",
  850. "Sky",
  851. "SphereMesh",
  852. "SphereOccluder3D",
  853. "SphereShape3D",
  854. "SpriteFrames",
  855. "StandardMaterial3D",
  856. "StyleBox",
  857. "StyleBoxEmpty",
  858. "StyleBoxFlat",
  859. "StyleBoxLine",
  860. "StyleBoxTexture",
  861. "SyntaxHighlighter",
  862. "SystemFont",
  863. "TextMesh",
  864. "Texture",
  865. "Texture2D",
  866. "Texture2DArray",
  867. "Texture2DArrayRD",
  868. "Texture2DRD",
  869. "Texture3D",
  870. "Texture3DRD",
  871. "TextureCubemapArrayRD",
  872. "TextureCubemapRD",
  873. "TextureLayered",
  874. "TextureLayeredRD",
  875. "Theme",
  876. "TileMapPattern",
  877. "TileSet",
  878. "TileSetAtlasSource",
  879. "TileSetScenesCollectionSource",
  880. "TileSetSource",
  881. "TorusMesh",
  882. "Translation",
  883. "TubeTrailMesh",
  884. "VideoStream",
  885. "VideoStreamPlayback",
  886. "VideoStreamTheora",
  887. "ViewportTexture",
  888. "VisualShader",
  889. "VisualShaderNode",
  890. "VisualShaderNodeBillboard",
  891. "VisualShaderNodeBooleanConstant",
  892. "VisualShaderNodeBooleanParameter",
  893. "VisualShaderNodeClamp",
  894. "VisualShaderNodeColorConstant",
  895. "VisualShaderNodeColorFunc",
  896. "VisualShaderNodeColorOp",
  897. "VisualShaderNodeColorParameter",
  898. "VisualShaderNodeComment",
  899. "VisualShaderNodeCompare",
  900. "VisualShaderNodeConstant",
  901. "VisualShaderNodeCubemap",
  902. "VisualShaderNodeCubemapParameter",
  903. "VisualShaderNodeCurveTexture",
  904. "VisualShaderNodeCurveXYZTexture",
  905. "VisualShaderNodeCustom",
  906. "VisualShaderNodeDerivativeFunc",
  907. "VisualShaderNodeDeterminant",
  908. "VisualShaderNodeDistanceFade",
  909. "VisualShaderNodeDotProduct",
  910. "VisualShaderNodeExpression",
  911. "VisualShaderNodeFaceForward",
  912. "VisualShaderNodeFloatConstant",
  913. "VisualShaderNodeFloatFunc",
  914. "VisualShaderNodeFloatOp",
  915. "VisualShaderNodeFloatParameter",
  916. "VisualShaderNodeFrame",
  917. "VisualShaderNodeFresnel",
  918. "VisualShaderNodeGlobalExpression",
  919. "VisualShaderNodeGroupBase",
  920. "VisualShaderNodeIf",
  921. "VisualShaderNodeInput",
  922. "VisualShaderNodeIntConstant",
  923. "VisualShaderNodeIntFunc",
  924. "VisualShaderNodeIntOp",
  925. "VisualShaderNodeIntParameter",
  926. "VisualShaderNodeIs",
  927. "VisualShaderNodeLinearSceneDepth",
  928. "VisualShaderNodeMix",
  929. "VisualShaderNodeMultiplyAdd",
  930. "VisualShaderNodeOuterProduct",
  931. "VisualShaderNodeOutput",
  932. "VisualShaderNodeParameter",
  933. "VisualShaderNodeParameterRef",
  934. "VisualShaderNodeParticleAccelerator",
  935. "VisualShaderNodeParticleBoxEmitter",
  936. "VisualShaderNodeParticleConeVelocity",
  937. "VisualShaderNodeParticleEmit",
  938. "VisualShaderNodeParticleEmitter",
  939. "VisualShaderNodeParticleMeshEmitter",
  940. "VisualShaderNodeParticleMultiplyByAxisAngle",
  941. "VisualShaderNodeParticleOutput",
  942. "VisualShaderNodeParticleRandomness",
  943. "VisualShaderNodeParticleRingEmitter",
  944. "VisualShaderNodeParticleSphereEmitter",
  945. "VisualShaderNodeProximityFade",
  946. "VisualShaderNodeRandomRange",
  947. "VisualShaderNodeRemap",
  948. "VisualShaderNodeReroute",
  949. "VisualShaderNodeResizableBase",
  950. "VisualShaderNodeRotationByAxis",
  951. "VisualShaderNodeSample3D",
  952. "VisualShaderNodeScreenNormalWorldSpace",
  953. "VisualShaderNodeScreenUVToSDF",
  954. "VisualShaderNodeSDFRaymarch",
  955. "VisualShaderNodeSDFToScreenUV",
  956. "VisualShaderNodeSmoothStep",
  957. "VisualShaderNodeStep",
  958. "VisualShaderNodeSwitch",
  959. "VisualShaderNodeTexture",
  960. "VisualShaderNodeTexture2DArray",
  961. "VisualShaderNodeTexture2DArrayParameter",
  962. "VisualShaderNodeTexture2DParameter",
  963. "VisualShaderNodeTexture3D",
  964. "VisualShaderNodeTexture3DParameter",
  965. "VisualShaderNodeTextureParameter",
  966. "VisualShaderNodeTextureParameterTriplanar",
  967. "VisualShaderNodeTextureSDF",
  968. "VisualShaderNodeTextureSDFNormal",
  969. "VisualShaderNodeTransformCompose",
  970. "VisualShaderNodeTransformConstant",
  971. "VisualShaderNodeTransformDecompose",
  972. "VisualShaderNodeTransformFunc",
  973. "VisualShaderNodeTransformOp",
  974. "VisualShaderNodeTransformParameter",
  975. "VisualShaderNodeTransformVecMult",
  976. "VisualShaderNodeUIntConstant",
  977. "VisualShaderNodeUIntFunc",
  978. "VisualShaderNodeUIntOp",
  979. "VisualShaderNodeUIntParameter",
  980. "VisualShaderNodeUVFunc",
  981. "VisualShaderNodeUVPolarCoord",
  982. "VisualShaderNodeVarying",
  983. "VisualShaderNodeVaryingGetter",
  984. "VisualShaderNodeVaryingSetter",
  985. "VisualShaderNodeVec2Constant",
  986. "VisualShaderNodeVec2Parameter",
  987. "VisualShaderNodeVec3Constant",
  988. "VisualShaderNodeVec3Parameter",
  989. "VisualShaderNodeVec4Constant",
  990. "VisualShaderNodeVec4Parameter",
  991. "VisualShaderNodeVectorBase",
  992. "VisualShaderNodeVectorCompose",
  993. "VisualShaderNodeVectorDecompose",
  994. "VisualShaderNodeVectorDistance",
  995. "VisualShaderNodeVectorFunc",
  996. "VisualShaderNodeVectorLen",
  997. "VisualShaderNodeVectorOp",
  998. "VisualShaderNodeVectorRefract",
  999. "VisualShaderNodeWorldPositionFromDepth",
  1000. "VoxelGIData",
  1001. "World2D",
  1002. "World3D",
  1003. "WorldBoundaryShape2D",
  1004. "WorldBoundaryShape3D",
  1005. "X509Certificate",
  1006. # Other objects
  1007. "Object",
  1008. "AESContext",
  1009. "AStar2D",
  1010. "AStar3D",
  1011. "AStarGrid2D",
  1012. "AudioEffectInstance",
  1013. "AudioEffectSpectrumAnalyzerInstance",
  1014. "AudioSample",
  1015. "AudioSamplePlayback",
  1016. "AudioServer",
  1017. "AudioStreamGeneratorPlayback",
  1018. "AudioStreamPlayback",
  1019. "AudioStreamPlaybackInteractive",
  1020. "AudioStreamPlaybackOggVorbis",
  1021. "AudioStreamPlaybackPlaylist",
  1022. "AudioStreamPlaybackPolyphonic",
  1023. "AudioStreamPlaybackResampled",
  1024. "AudioStreamPlaybackSynchronized",
  1025. "CallbackTweener",
  1026. "CameraFeed",
  1027. "CameraServer",
  1028. "CharFXTransform",
  1029. "ClassDB",
  1030. "ConfigFile",
  1031. "Crypto",
  1032. "DirAccess",
  1033. "DisplayServer",
  1034. "DTLSServer",
  1035. "EditorContextMenuPlugin",
  1036. "EditorDebuggerPlugin",
  1037. "EditorDebuggerSession",
  1038. "EditorExportPlatform",
  1039. "EditorExportPlatformAndroid",
  1040. "EditorExportPlatformExtension",
  1041. "EditorExportPlatformIOS",
  1042. "EditorExportPlatformLinuxBSD",
  1043. "EditorExportPlatformMacOS",
  1044. "EditorExportPlatformPC",
  1045. "EditorExportPlatformWeb",
  1046. "EditorExportPlatformWindows",
  1047. "EditorExportPlugin",
  1048. "EditorExportPreset",
  1049. "EditorFeatureProfile",
  1050. "EditorFileSystemDirectory",
  1051. "EditorFileSystemImportFormatSupportQuery",
  1052. "EditorImportPlugin",
  1053. "EditorInspectorPlugin",
  1054. "EditorInterface",
  1055. "EditorNode3DGizmo",
  1056. "EditorPaths",
  1057. "EditorResourceConversionPlugin",
  1058. "EditorResourcePreviewGenerator",
  1059. "EditorResourceTooltipPlugin",
  1060. "EditorSceneFormatImporter",
  1061. "EditorSceneFormatImporterBlend",
  1062. "EditorSceneFormatImporterFBX2GLTF",
  1063. "EditorSceneFormatImporterGLTF",
  1064. "EditorSceneFormatImporterUFBX",
  1065. "EditorScenePostImport",
  1066. "EditorScenePostImportPlugin",
  1067. "EditorScript",
  1068. "EditorSelection",
  1069. "EditorTranslationParserPlugin",
  1070. "EditorUndoRedoManager",
  1071. "EditorVCSInterface",
  1072. "EncodedObjectAsID",
  1073. "ENetConnection",
  1074. "ENetMultiplayerPeer",
  1075. "ENetPacketPeer",
  1076. "Engine",
  1077. "EngineDebugger",
  1078. "EngineProfiler",
  1079. "Expression",
  1080. "FileAccess",
  1081. "FramebufferCacheRD",
  1082. "GDExtensionManager",
  1083. "Geometry2D",
  1084. "Geometry3D",
  1085. "GLTFObjectModelProperty",
  1086. "HashingContext",
  1087. "HMACContext",
  1088. "HTTPClient",
  1089. "ImageFormatLoader",
  1090. "ImageFormatLoaderExtension",
  1091. "Input",
  1092. "InputMap",
  1093. "IntervalTweener",
  1094. "IP",
  1095. "JavaClass",
  1096. "JavaClassWrapper",
  1097. "JavaObject",
  1098. "JavaScriptBridge",
  1099. "JavaScriptObject",
  1100. "JNISingleton",
  1101. "JSONRPC",
  1102. "KinematicCollision2D",
  1103. "KinematicCollision3D",
  1104. "Lightmapper",
  1105. "LightmapperRD",
  1106. "MainLoop",
  1107. "Marshalls",
  1108. "MeshConvexDecompositionSettings",
  1109. "MeshDataTool",
  1110. "MethodTweener",
  1111. "MobileVRInterface",
  1112. "MovieWriter",
  1113. "MultiplayerAPI",
  1114. "MultiplayerAPIExtension",
  1115. "MultiplayerPeer",
  1116. "MultiplayerPeerExtension",
  1117. "Mutex",
  1118. "NativeMenu",
  1119. "NavigationMeshGenerator",
  1120. "NavigationPathQueryParameters2D",
  1121. "NavigationPathQueryParameters3D",
  1122. "NavigationPathQueryResult2D",
  1123. "NavigationPathQueryResult3D",
  1124. "NavigationServer2D",
  1125. "NavigationServer3D",
  1126. "Node",
  1127. "Node3DGizmo",
  1128. "OfflineMultiplayerPeer",
  1129. "OggPacketSequencePlayback",
  1130. "OpenXRAPIExtension",
  1131. "OpenXRExtensionWrapperExtension",
  1132. "OpenXRInteractionProfileMetadata",
  1133. "OpenXRInterface",
  1134. "OS",
  1135. "PackedDataContainerRef",
  1136. "PacketPeer",
  1137. "PacketPeerDTLS",
  1138. "PacketPeerExtension",
  1139. "PacketPeerStream",
  1140. "PacketPeerUDP",
  1141. "PCKPacker",
  1142. "Performance",
  1143. "PhysicsDirectBodyState2D",
  1144. "PhysicsDirectBodyState2DExtension",
  1145. "PhysicsDirectBodyState3D",
  1146. "PhysicsDirectBodyState3DExtension",
  1147. "PhysicsDirectSpaceState2D",
  1148. "PhysicsDirectSpaceState2DExtension",
  1149. "PhysicsDirectSpaceState3D",
  1150. "PhysicsDirectSpaceState3DExtension",
  1151. "PhysicsPointQueryParameters2D",
  1152. "PhysicsPointQueryParameters3D",
  1153. "PhysicsRayQueryParameters2D",
  1154. "PhysicsRayQueryParameters3D",
  1155. "PhysicsServer2D",
  1156. "PhysicsServer2DExtension",
  1157. "PhysicsServer2DManager",
  1158. "PhysicsServer3D",
  1159. "PhysicsServer3DExtension",
  1160. "PhysicsServer3DManager",
  1161. "PhysicsServer3DRenderingServerHandler",
  1162. "PhysicsShapeQueryParameters2D",
  1163. "PhysicsShapeQueryParameters3D",
  1164. "PhysicsTestMotionParameters2D",
  1165. "PhysicsTestMotionParameters3D",
  1166. "PhysicsTestMotionResult2D",
  1167. "PhysicsTestMotionResult3D",
  1168. "ProjectSettings",
  1169. "PropertyTweener",
  1170. "RandomNumberGenerator",
  1171. "RDAttachmentFormat",
  1172. "RDFramebufferPass",
  1173. "RDPipelineColorBlendState",
  1174. "RDPipelineColorBlendStateAttachment",
  1175. "RDPipelineDepthStencilState",
  1176. "RDPipelineMultisampleState",
  1177. "RDPipelineRasterizationState",
  1178. "RDPipelineSpecializationConstant",
  1179. "RDSamplerState",
  1180. "RDShaderSource",
  1181. "RDTextureFormat",
  1182. "RDTextureView",
  1183. "RDUniform",
  1184. "RDVertexAttribute",
  1185. "RefCounted",
  1186. "RegEx",
  1187. "RegExMatch",
  1188. "RenderData",
  1189. "RenderDataExtension",
  1190. "RenderDataRD",
  1191. "RenderingDevice",
  1192. "RenderingServer",
  1193. "RenderSceneBuffers",
  1194. "RenderSceneBuffersConfiguration",
  1195. "RenderSceneBuffersExtension",
  1196. "RenderSceneBuffersRD",
  1197. "RenderSceneData",
  1198. "RenderSceneDataExtension",
  1199. "RenderSceneDataRD",
  1200. "Resource",
  1201. "ResourceFormatLoader",
  1202. "ResourceFormatSaver",
  1203. "ResourceImporter",
  1204. "ResourceImporterBitMap",
  1205. "ResourceImporterBMFont",
  1206. "ResourceImporterCSVTranslation",
  1207. "ResourceImporterDynamicFont",
  1208. "ResourceImporterImage",
  1209. "ResourceImporterImageFont",
  1210. "ResourceImporterLayeredTexture",
  1211. "ResourceImporterMP3",
  1212. "ResourceImporterOBJ",
  1213. "ResourceImporterOggVorbis",
  1214. "ResourceImporterScene",
  1215. "ResourceImporterShaderFile",
  1216. "ResourceImporterTexture",
  1217. "ResourceImporterTextureAtlas",
  1218. "ResourceImporterWAV",
  1219. "ResourceLoader",
  1220. "ResourceSaver",
  1221. "ResourceUID",
  1222. "SceneMultiplayer",
  1223. "SceneState",
  1224. "SceneTree",
  1225. "SceneTreeTimer",
  1226. "ScriptLanguage",
  1227. "ScriptLanguageExtension",
  1228. "Semaphore",
  1229. "ShaderIncludeDB",
  1230. "SkinReference",
  1231. "StreamPeer",
  1232. "StreamPeerBuffer",
  1233. "StreamPeerExtension",
  1234. "StreamPeerGZIP",
  1235. "StreamPeerTCP",
  1236. "StreamPeerTLS",
  1237. "SubtweenTweener",
  1238. "SurfaceTool",
  1239. "TCPServer",
  1240. "TextLine",
  1241. "TextParagraph",
  1242. "TextServer",
  1243. "TextServerAdvanced",
  1244. "TextServerDummy",
  1245. "TextServerExtension",
  1246. "TextServerFallback",
  1247. "TextServerManager",
  1248. "ThemeDB",
  1249. "Thread",
  1250. "TileData",
  1251. "Time",
  1252. "TLSOptions",
  1253. "TranslationDomain",
  1254. "TranslationServer",
  1255. "TreeItem",
  1256. "TriangleMesh",
  1257. "Tween",
  1258. "Tweener",
  1259. "UDPServer",
  1260. "UndoRedo",
  1261. "UniformSetCacheRD",
  1262. "UPNP",
  1263. "UPNPDevice",
  1264. "WeakRef",
  1265. "WebRTCDataChannel",
  1266. "WebRTCDataChannelExtension",
  1267. "WebRTCMultiplayerPeer",
  1268. "WebRTCPeerConnection",
  1269. "WebRTCPeerConnectionExtension",
  1270. "WebSocketMultiplayerPeer",
  1271. "WebSocketPeer",
  1272. "WebXRInterface",
  1273. "WorkerThreadPool",
  1274. "XMLParser",
  1275. "XRBodyTracker",
  1276. "XRControllerTracker",
  1277. "XRFaceTracker",
  1278. "XRHandTracker",
  1279. "XRInterface",
  1280. "XRInterfaceExtension",
  1281. "XRPose",
  1282. "XRPositionalTracker",
  1283. "XRServer",
  1284. "XRTracker",
  1285. "XRVRS",
  1286. "ZIPPacker",
  1287. "ZIPReader",
  1288. # Editor-only
  1289. "EditorCommandPalette",
  1290. "EditorContextMenuPlugin",
  1291. "EditorDebuggerPlugin",
  1292. "EditorDebuggerSession",
  1293. "EditorExportPlatform",
  1294. "EditorExportPlatformAndroid",
  1295. "EditorExportPlatformExtension",
  1296. "EditorExportPlatformIOS",
  1297. "EditorExportPlatformLinuxBSD",
  1298. "EditorExportPlatformMacOS",
  1299. "EditorExportPlatformPC",
  1300. "EditorExportPlatformWeb",
  1301. "EditorExportPlatformWindows",
  1302. "EditorExportPlugin",
  1303. "EditorExportPreset",
  1304. "EditorFeatureProfile",
  1305. "EditorFileDialog",
  1306. "EditorFileSystem",
  1307. "EditorFileSystemDirectory",
  1308. "EditorFileSystemImportFormatSupportQuery",
  1309. "EditorImportPlugin",
  1310. "EditorInspector",
  1311. "EditorInspectorPlugin",
  1312. "EditorInterface",
  1313. "EditorNode3DGizmo",
  1314. "EditorNode3DGizmoPlugin",
  1315. "EditorPaths",
  1316. "EditorPlugin",
  1317. "EditorProperty",
  1318. "EditorResourceConversionPlugin",
  1319. "EditorResourcePicker",
  1320. "EditorResourcePreview",
  1321. "EditorResourcePreviewGenerator",
  1322. "EditorResourceTooltipPlugin",
  1323. "EditorSceneFormatImporter",
  1324. "EditorSceneFormatImporterBlend",
  1325. "EditorSceneFormatImporterFBX2GLTF",
  1326. "EditorSceneFormatImporterGLTF",
  1327. "EditorSceneFormatImporterUFBX",
  1328. "EditorScenePostImport",
  1329. "EditorScenePostImportPlugin",
  1330. "EditorScript",
  1331. "EditorScriptPicker",
  1332. "EditorSelection",
  1333. "EditorSettings",
  1334. "EditorSpinSlider",
  1335. "EditorSyntaxHighlighter",
  1336. "EditorToaster",
  1337. "EditorTranslationParserPlugin",
  1338. "EditorUndoRedoManager",
  1339. "EditorVCSInterface",
  1340. "FileSystemDock",
  1341. "ScriptCreateDialog",
  1342. "ScriptEditor",
  1343. "ScriptEditorBase",
  1344. ),
  1345. prefix=r"(?<!\.)",
  1346. suffix=r"\b",
  1347. ),
  1348. Name.Builtin,
  1349. ),
  1350. # NOTE: from github.com/godotengine/godot-docs
  1351. (
  1352. words(
  1353. (
  1354. # modules/gdscript/doc_classes/@GDScript.xml
  1355. "@abstract",
  1356. "@export",
  1357. "@export_category",
  1358. "@export_color_no_alpha",
  1359. "@export_custom",
  1360. "@export_dir",
  1361. "@export_enum",
  1362. "@export_exp_easing",
  1363. "@export_file",
  1364. "@export_file_path",
  1365. "@export_flags",
  1366. "@export_flags_2d_navigation",
  1367. "@export_flags_2d_physics",
  1368. "@export_flags_2d_render",
  1369. "@export_flags_3d_navigation",
  1370. "@export_flags_3d_physics",
  1371. "@export_flags_3d_render",
  1372. "@export_flags_avoidance",
  1373. "@export_global_dir",
  1374. "@export_global_file",
  1375. "@export_group",
  1376. "@export_multiline",
  1377. "@export_node_path",
  1378. "@export_placeholder",
  1379. "@export_range",
  1380. "@export_storage",
  1381. "@export_subgroup",
  1382. "@export_tool_button",
  1383. "@icon",
  1384. "@onready",
  1385. "@rpc",
  1386. "@static_unload",
  1387. "@tool",
  1388. "@warning_ignore",
  1389. "@warning_ignore_restore",
  1390. "@warning_ignore_start",
  1391. ),
  1392. prefix=r"(?<!\.)",
  1393. suffix=r"\b",
  1394. ),
  1395. Name.Decorator,
  1396. ),
  1397. ],
  1398. "operator": [
  1399. (
  1400. r"!=|==|<<|>>|&&|\+=|-=|\*=|/=|%=|&=|\|=|\|\||[-~+/*%=<>&^.!|$]",
  1401. Operator,
  1402. ),
  1403. (r"(in|is|and|as|or|not)\b", Operator.Word),
  1404. ],
  1405. "number": [
  1406. (r"([\d_]+\.[\d_]*|[\d_]*\.[\d_]+)([eE][+-]?[\d_]+)?", Number.Float),
  1407. (r"[\d_]+[eE][+-]?[\d_]+", Number.Float),
  1408. (r"0[xX][a-fA-F\d_]+", Number.Hex),
  1409. (r"(-)?0[bB]([01]|(?<=[01])_)+", Number.Bin),
  1410. (r"[\d_]+", Number.Integer),
  1411. ],
  1412. "name": [(r"[a-zA-Z_]\w*", Name)],
  1413. "typehint": [
  1414. (r"[a-zA-Z_]\w*", Name.Class, "#pop"),
  1415. ],
  1416. "string_escape": [
  1417. (
  1418. r'\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|'
  1419. r"U[a-fA-F0-9]{6}|x[a-fA-F0-9]{2}|[0-7]{1,3})",
  1420. String.Escape,
  1421. )
  1422. ],
  1423. "string_single": inner_string_rules(String.Single),
  1424. "string_double": inner_string_rules(String.Double),
  1425. "string_other": inner_string_rules(String.Other),
  1426. "string_stringname": inner_string_rules(String.StringName),
  1427. "string_nodepath": inner_string_rules(String.NodePath),
  1428. "double_quotes": [
  1429. (r'"', String.Double, "#pop"),
  1430. (r'\\\\|\\"|\\\n', String.Escape), # included here for raw strings
  1431. include("string_double"),
  1432. ],
  1433. "single_quotes": [
  1434. (r"'", String.Single, "#pop"),
  1435. (r"\\\\|\\'|\\\n", String.Escape), # included here for raw strings
  1436. include("string_single"),
  1437. ],
  1438. "triple_double_quotes": [
  1439. (r'"""', String.Double, "#pop"),
  1440. include("string_double"),
  1441. include("whitespace"),
  1442. ],
  1443. "triple_single_quotes": [
  1444. (r"'''", String.Single, "#pop"),
  1445. include("string_single"),
  1446. include("whitespace"),
  1447. ],
  1448. "node_reference": [
  1449. (r'[\$%]"', String.Other, include("node_reference_double")),
  1450. (r"[\$%]'", String.Other, include("node_reference_single")),
  1451. (r"[\$%][A-Za-z_][\w/]*/?", String.Other),
  1452. ],
  1453. "node_reference_double": [
  1454. (r'"', String.Other, "#pop"),
  1455. include("string_other"),
  1456. ],
  1457. "node_reference_single": [
  1458. (r"'", String.Other, "#pop"),
  1459. include("string_other"),
  1460. ],
  1461. "stringname": [
  1462. (r'[&]"', String.StringName, include("stringname_double")),
  1463. (r"[&]'", String.StringName, include("stringname_single")),
  1464. ],
  1465. "stringname_double": [
  1466. (r'"', String.StringName, "#pop"),
  1467. include("string_stringname"),
  1468. ],
  1469. "stringname_single": [
  1470. (r"'", String.StringName, "#pop"),
  1471. include("string_stringname"),
  1472. ],
  1473. "nodepath": [
  1474. (r'[\^]"', String.NodePath, include("nodepath_double")),
  1475. (r"[\^]'", String.NodePath, include("nodepath_single")),
  1476. ],
  1477. "nodepath_double": [
  1478. (r'"', String.NodePath, "#pop"),
  1479. include("string_nodepath"),
  1480. ],
  1481. "nodepath_single": [
  1482. (r"'", String.NodePath, "#pop"),
  1483. include("string_nodepath"),
  1484. ],
  1485. "function_name": [(r"[a-zA-Z_]\w*", Name.Function.Declaration, "#pop")],
  1486. "enum_name": [(r"[a-zA-Z_]\w*", Name, "#pop")],
  1487. "function": [
  1488. (r"\b([a-zA-Z_]\w*)\s*(?=\()", Name.Function),
  1489. (
  1490. # colored like functions, even without braces
  1491. words(("set", "get",), suffix=r"\b", ),
  1492. Name.Function,
  1493. ),
  1494. ],
  1495. #######################################################################
  1496. # LEXER ENTRY POINT
  1497. #######################################################################
  1498. "root": [
  1499. include("whitespace"),
  1500. include("comment"),
  1501. include("punctuation"),
  1502. include("builtin"),
  1503. # strings
  1504. include("stringname"),
  1505. include("nodepath"),
  1506. include("node_reference"),
  1507. (
  1508. '(r)(""")',
  1509. bygroups(String.Affix, String.Double),
  1510. "triple_double_quotes",
  1511. ),
  1512. (
  1513. "(r)(''')",
  1514. bygroups(String.Affix, String.Single),
  1515. "triple_single_quotes",
  1516. ),
  1517. (
  1518. '(r)(")',
  1519. bygroups(String.Affix, String.Double),
  1520. "double_quotes",
  1521. ),
  1522. (
  1523. "(r)(')",
  1524. bygroups(String.Affix, String.Single),
  1525. "single_quotes",
  1526. ),
  1527. (
  1528. '(r?)(""")',
  1529. bygroups(String.Affix, String.Double),
  1530. combined("string_escape", "triple_double_quotes"),
  1531. ),
  1532. (
  1533. "(r?)(''')",
  1534. bygroups(String.Affix, String.Single),
  1535. combined("string_escape", "triple_single_quotes"),
  1536. ),
  1537. (
  1538. '(r?)(")',
  1539. bygroups(String.Affix, String.Double),
  1540. combined("string_escape", "double_quotes"),
  1541. ),
  1542. (
  1543. "(r?)(')",
  1544. bygroups(String.Affix, String.Single),
  1545. combined("string_escape", "single_quotes"),
  1546. ),
  1547. # consider Name after a . as instance/members variables
  1548. (r"(?<!\.)(\.)([a-zA-Z_]\w*)\b(?!\s*\()", bygroups(Operator, Name.Variable.Instance)),
  1549. include("operator"),
  1550. # Lookahead to not match the start of function_name to dodge errors on nameless lambdas
  1551. (r"(func)(\s+)(?=[a-zA-Z_])", bygroups(Keyword, Whitespace), "function_name"),
  1552. (r"(enum)(\s+)(?=[a-zA-Z_])", bygroups(Keyword, Whitespace), "enum_name"),
  1553. include("keyword"),
  1554. include("function"),
  1555. # NOTE:
  1556. # This matches all PascalCase as a class. If this raises issues
  1557. # please report it.
  1558. # see: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html#naming-conventions
  1559. #(r"\s*([A-Z][a-zA-Z0-9_]*)", Name.Class),
  1560. # Only PascalCase, but exclude SCREAMING_SNAKE for constants
  1561. (r"\b([A-Z][a-z0-9]+(?:[A-Z][a-z0-9]+)*)\b", Name.Class),
  1562. include("name"),
  1563. include("number"),
  1564. ],
  1565. }
  1566. def setup(sphinx):
  1567. sphinx.add_lexer("gdscript", GDScriptLexer)
  1568. return {
  1569. "parallel_read_safe": True,
  1570. "parallel_write_safe": True,
  1571. }