Skip to content

Commit 832e85d

Browse files
authored
Made edits to match GDScript code order
Updated gdscript_documentation_comments.rst
1 parent 3fd7836 commit 832e85d

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tutorials/scripting/gdscript/gdscript_documentation_comments.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ Documenting script members
7373

7474
Members that are applicable for documentation:
7575

76-
- Inner class
77-
- Constant
78-
- Function
7976
- Signal
80-
- Variable
8177
- Enum
8278
- Enum value
79+
- Constant
80+
- Variable
81+
- Function
82+
- Inner class
8383

8484
Documentation of a script member must immediately precede the member or its annotations
8585
if it has any. The description can have more than one line but every line must start with
@@ -106,6 +106,8 @@ For example::
106106

107107
Alternatively, you can use inline documentation comments::
108108

109+
signal my_signal ## My signal.
110+
109111
enum MyEnum { ## My enum.
110112
VALUE_A = 0, ## Value A.
111113
VALUE_B = 1, ## Value B.
@@ -115,11 +117,11 @@ Alternatively, you can use inline documentation comments::
115117

116118
var my_var ## My variable.
117119

118-
signal my_signal ## My signal.
119120

120121
func my_func(): ## My func.
121122
pass
122123

124+
123125
class MyClass: ## My class.
124126
pass
125127

@@ -142,9 +144,6 @@ Complete script example
142144
## @tutorial(Tutorial 2): https://example.com/tutorial_2
143145
## @experimental
144146

145-
## The description of a constant.
146-
const GRAVITY = 9.8
147-
148147
## The description of a signal.
149148
signal my_signal
150149

@@ -160,6 +159,9 @@ Complete script example
160159
RIGHT = 3,
161160
}
162161

162+
## The description of a constant.
163+
const GRAVITY = 9.8
164+
163165
## The description of the variable v1.
164166
var v1
165167

0 commit comments

Comments
 (0)