Skip to content

Commit 099a7dc

Browse files
committed
Added code regions
1 parent 917951e commit 099a7dc

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

gdscript/code_regions.gd

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
extends SceneTree
2+
3+
# This will work in the provided Godot Game Engine script editor.
4+
# To make this work on VSCode, use the "godot-tools" extension.
5+
6+
#region
7+
func a():
8+
return "I'm in an region. You can collapse my region in the editor."
9+
#endregion
10+
11+
#region With a Description
12+
func b():
13+
return "I'm in an named region. You can collapse my region in the editor."
14+
#endregion
15+
16+
#region
17+
func c():
18+
#region
19+
return "I'm in a nested region. You can collapse either of my regions in the editor."
20+
#endregion
21+
#endregion
22+
23+
func _init():
24+
print(a())
25+
print(b())
26+
print(c())
27+
quit()

gdscript/test.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ godot --display-driver headless --no-header -s "$PSScriptRoot\clockhands.gd" |
1919
godot --display-driver headless --no-header -s "$PSScriptRoot\clockhands_time.gd" |
2020
Compare-Object (Get-Content "$PSScriptRoot\..\test\clockhands_expected") |
2121
Assert-MatchTests &&
22+
godot --display-driver headless --no-header -s "$PSScriptRoot\code_regions.gd" &&
2223
godot --display-driver headless --no-header -s "$PSScriptRoot\fibonacci.gd" &&
2324
godot --display-driver headless --no-header -s "$PSScriptRoot\file_reader.gd" "$PSScriptRoot\..\test\carrots_expected" |
2425
Compare-Object (Get-Content "$PSScriptRoot\..\test\carrots_expected") |

0 commit comments

Comments
 (0)