Skip to content

Commit

Permalink
Update function name
Browse files Browse the repository at this point in the history
  • Loading branch information
poorna2152 authored and Nuvindu committed Mar 19, 2024
1 parent 425fa60 commit 2b26c40
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,8 @@ public ServiceDeclarationNode transform(ServiceDeclarationNode serviceDeclaratio
formatSeparatedNodeList(serviceDeclarationNode.expressions(), 0, 0, 1, 0);
Token openBrace = formatToken(serviceDeclarationNode.openBraceToken(), 0, 1);
indent(); // increase the indentation of the following statements.
NodeList<Node> members = formatMemberDeclarations(serviceDeclarationNode.members(), n -> isMemberOfScope(n));
NodeList<Node> members =
formatMemberDeclarations(serviceDeclarationNode.members(), n -> isClassOrServiceMultiLineMember(n));
unindent(); // reset the indentation.
Optional<Token> optSemicolon = serviceDeclarationNode.semicolonToken();
Token closeBrace = optSemicolon.isPresent() ?
Expand Down Expand Up @@ -3464,7 +3465,8 @@ public ClassDefinitionNode transform(ClassDefinitionNode classDefinitionNode) {
Token openBrace = formatToken(classDefinitionNode.openBrace(), 0, 1);

indent();
NodeList<Node> members = formatMemberDeclarations(classDefinitionNode.members(), n -> isMemberOfScope(n));
NodeList<Node> members =
formatMemberDeclarations(classDefinitionNode.members(), n -> isClassOrServiceMultiLineMember(n));
unindent();
Optional<Token> optSemicolon = classDefinitionNode.semicolonToken();
Token closeBrace = optSemicolon.isPresent() ?
Expand Down Expand Up @@ -3905,7 +3907,7 @@ private <T extends Node> boolean isMultilineModuleMember(T node) {
}
}

private <T extends Node> boolean isMemberOfScope(T node) {
private boolean isClassOrServiceMultiLineMember(Node node) {
if (node == null) {
return false;
}
Expand Down

0 comments on commit 2b26c40

Please sign in to comment.