From 140c6a612e9d9b04966d03fa2b36fbe29d473a38 Mon Sep 17 00:00:00 2001 From: HolonProduction Date: Sun, 13 Oct 2024 19:01:30 +0200 Subject: GDScript: Fix annotation parsing adding new annotation entries --- .../gdscript/tests/scripts/parser/errors/annotation_inapplicable.gd | 3 +++ .../gdscript/tests/scripts/parser/errors/annotation_inapplicable.out | 2 ++ .../gdscript/tests/scripts/parser/errors/annotation_unrecognized.gd | 3 +++ .../gdscript/tests/scripts/parser/errors/annotation_unrecognized.out | 2 ++ 4 files changed, 10 insertions(+) create mode 100644 modules/gdscript/tests/scripts/parser/errors/annotation_inapplicable.gd create mode 100644 modules/gdscript/tests/scripts/parser/errors/annotation_inapplicable.out create mode 100644 modules/gdscript/tests/scripts/parser/errors/annotation_unrecognized.gd create mode 100644 modules/gdscript/tests/scripts/parser/errors/annotation_unrecognized.out (limited to 'modules/gdscript/tests/scripts/parser/errors') diff --git a/modules/gdscript/tests/scripts/parser/errors/annotation_inapplicable.gd b/modules/gdscript/tests/scripts/parser/errors/annotation_inapplicable.gd new file mode 100644 index 0000000000..cfacb6a010 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/errors/annotation_inapplicable.gd @@ -0,0 +1,3 @@ +@export +func test(): + pass diff --git a/modules/gdscript/tests/scripts/parser/errors/annotation_inapplicable.out b/modules/gdscript/tests/scripts/parser/errors/annotation_inapplicable.out new file mode 100644 index 0000000000..ed677cd39a --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/errors/annotation_inapplicable.out @@ -0,0 +1,2 @@ +GDTEST_PARSER_ERROR +Annotation "@export" cannot be applied to a function. diff --git a/modules/gdscript/tests/scripts/parser/errors/annotation_unrecognized.gd b/modules/gdscript/tests/scripts/parser/errors/annotation_unrecognized.gd new file mode 100644 index 0000000000..a6b171a428 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/errors/annotation_unrecognized.gd @@ -0,0 +1,3 @@ +@hello_world +func test(): + pass diff --git a/modules/gdscript/tests/scripts/parser/errors/annotation_unrecognized.out b/modules/gdscript/tests/scripts/parser/errors/annotation_unrecognized.out new file mode 100644 index 0000000000..540e66f15b --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/errors/annotation_unrecognized.out @@ -0,0 +1,2 @@ +GDTEST_PARSER_ERROR +Unrecognized annotation: "@hello_world". -- cgit v1.2.3