Copilot commented on code in PR #2211: URL: https://github.com/apache/groovy/pull/2211#discussion_r2072671610
########## src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java: ########## @@ -1581,7 +1581,7 @@ public Void visitMemberDeclaration(final MemberDeclarationContext ctx) { } else if (asBoolean(ctx.classDeclaration())) { ctx.classDeclaration().putNodeMetaData(TYPE_DECLARATION_MODIFIERS, this.visitModifiersOpt(ctx.modifiersOpt())); ctx.classDeclaration().putNodeMetaData(CLASS_DECLARATION_CLASS_NODE, classNode); Review Comment: [nitpick] Consider adding an inline comment or updating the documentation to clarify why configureAST is now required in the inner class context and how it differs from the previous visitClassDeclaration call. ```suggestion ctx.classDeclaration().putNodeMetaData(CLASS_DECLARATION_CLASS_NODE, classNode); // The configureAST method is used here to set the position metadata for the class declaration node. // This differs from the previous visitClassDeclaration call, which only visited the class declaration // without configuring its position in the AST. This ensures that the node is properly positioned // within the parent context. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@groovy.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org