Skip to content

Commit 0c4b79a

Browse files
Apply suggestions from code review
Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru>
1 parent cfb30c7 commit 0c4b79a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

modules/gdscript/gdscript_parser.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ void GDScriptParser::parse_program() {
684684
}
685685
advance();
686686
if (has_early_abstract) {
687-
push_error(R"(Expected "class_name" or "class" after "abstract".)");
687+
push_error(R"(Expected "class_name", "extends", or "class" after "abstract".)");
688688
} else {
689689
has_early_abstract = true;
690690
}
@@ -6315,7 +6315,7 @@ void GDScriptParser::TreePrinter::print_tree(const GDScriptParser &p_parser) {
63156315
push_line("@tool");
63166316
}
63176317
if (class_tree->is_abstract) {
6318-
push_line("@abstract");
6318+
push_line("abstract");
63196319
}
63206320
if (!class_tree->icon_path.is_empty()) {
63216321
push_text(R"(@icon (")");

modules/gdscript/tests/scripts/analyzer/features/extend_abstract_class.gd

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ class B extends A:
88
class C extends CanvasItem:
99
pass
1010

11-
abstract
12-
class X:
11+
abstract class X:
1312
pass
1413

1514
class Y extends X:

0 commit comments

Comments
 (0)