Skip to content

Commit

Permalink
forgot to remove debug in ...
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazy-Rabbit-2001 committed Oct 13, 2024
1 parent 89c1749 commit c61f7f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions modules/gdscript/gdscript_analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@ void GDScriptAnalyzer::resolve_class_member(GDScriptParser::ClassNode *p_class,
member_node = member.function;
action_name = "call";
member_type = "method";
break;
}

if (member_node) {
Expand Down
11 changes: 4 additions & 7 deletions modules/gdscript/gdscript_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ GDScriptParser::GDScriptParser() {

register_annotation(MethodInfo("@onready"), AnnotationInfo::VARIABLE, &GDScriptParser::onready_annotation);
// Access restrictions.
register_annotation(MethodInfo("@private"), AnnotationInfo::CONSTANT | AnnotationInfo::VARIABLE | AnnotationInfo::FUNCTION , &GDScriptParser::access_private_annotation);
register_annotation(MethodInfo("@protected"), AnnotationInfo::CONSTANT | AnnotationInfo::VARIABLE | AnnotationInfo::FUNCTION , &GDScriptParser::access_protected_annotation);
register_annotation(MethodInfo("@private"), AnnotationInfo::CONSTANT | AnnotationInfo::VARIABLE | AnnotationInfo::FUNCTION, &GDScriptParser::access_private_annotation);
register_annotation(MethodInfo("@protected"), AnnotationInfo::CONSTANT | AnnotationInfo::VARIABLE | AnnotationInfo::FUNCTION, &GDScriptParser::access_protected_annotation);

// Export annotations.
register_annotation(MethodInfo("@export"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_NONE, Variant::NIL>);
Expand Down Expand Up @@ -4183,8 +4183,7 @@ bool GDScriptParser::onready_annotation(AnnotationNode *p_annotation, Node *p_ta
}

// Access restrictions.
bool GDScriptParser::access_private_annotation(AnnotationNode *p_annotation, Node *p_target, ClassNode *p_class)
{
bool GDScriptParser::access_private_annotation(AnnotationNode *p_annotation, Node *p_target, ClassNode *p_class) {
AssignableNode *member = static_cast<AssignableNode *>(p_target);

switch (member->access_restriction) {

Check failure on line 4189 in modules/gdscript/gdscript_parser.cpp

View workflow job for this annotation

GitHub Actions / 🐧 Linux / Editor w/ Mono (target=editor)

enumeration value 'ACCESS_RESTRICTION_PUBLIC' not handled in switch [-Werror=switch]
Expand All @@ -4203,13 +4202,11 @@ bool GDScriptParser::access_private_annotation(AnnotationNode *p_annotation, Nod
}

member->access_restriction = Node::AccessRestriction::ACCESS_RESTRICTION_PRIVATE;
print_line(vformat(R"(Set access restriction of memebr %s to %s)", member->identifier->name, member->access_restriction));

return true;
}

bool GDScriptParser::access_protected_annotation(AnnotationNode *p_annotation, Node *p_target, ClassNode *p_class)
{
bool GDScriptParser::access_protected_annotation(AnnotationNode *p_annotation, Node *p_target, ClassNode *p_class) {
AssignableNode *member = static_cast<AssignableNode *>(p_target);

switch (member->access_restriction) {

Check failure on line 4212 in modules/gdscript/gdscript_parser.cpp

View workflow job for this annotation

GitHub Actions / 🐧 Linux / Editor w/ Mono (target=editor)

enumeration value 'ACCESS_RESTRICTION_PUBLIC' not handled in switch [-Werror=switch]
Expand Down

0 comments on commit c61f7f5

Please sign in to comment.