Skip to content

Commit

Permalink
fixed some format mistakes
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 92f4242
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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
10 changes: 4 additions & 6 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) {
Expand All @@ -4208,8 +4207,7 @@ bool GDScriptParser::access_private_annotation(AnnotationNode *p_annotation, Nod
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) {
Expand Down

0 comments on commit 92f4242

Please sign in to comment.