forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
@deprecated
and @experimental
GDScript annotations pointing t…
…o comments These annotations don't exist at a source level, so the new annotations are only here to point to the documentation comment syntax. This makes it easier to discover the feature as it'll now appear in the help search as well.
- Loading branch information
Showing
5 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
modules/gdscript/tests/scripts/parser/errors/annotation_deprecated.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This annotation should be used within a documentation comment instead: | ||
# ## @deprecated: Reason here. | ||
|
||
@deprecated | ||
var some_variable = "value" |
2 changes: 2 additions & 0 deletions
2
modules/gdscript/tests/scripts/parser/errors/annotation_deprecated.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
GDTEST_PARSER_ERROR | ||
"@deprecated" annotation does not exist at a source level. Use "## @deprecated: Reason here." as a comment instead. |
6 changes: 6 additions & 0 deletions
6
modules/gdscript/tests/scripts/parser/errors/annotation_experimental.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This annotation should be used within a documentation comment instead: | ||
# ## @experimental: Reason here. | ||
|
||
@experimental("This function isn't implemented yet.") | ||
func say_hello(): | ||
pass |
2 changes: 2 additions & 0 deletions
2
modules/gdscript/tests/scripts/parser/errors/annotation_experimental.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
GDTEST_PARSER_ERROR | ||
"@experimental" annotation does not exist at a source level. Use "## @experimental: Reason here." as a comment instead. |