lkishalmi commented on code in PR #7286:
URL: https://github.com/apache/netbeans/pull/7286#discussion_r1581901161


##########
ide/languages.hcl/src/org/netbeans/modules/languages/hcl/ast/HCLFunction.java:
##########
@@ -34,8 +34,8 @@ public record HCLFunction(HCLIdentifier name, 
List<HCLExpression> args, boolean
     @Override
     public String asString() {
         StringJoiner sargs = new StringJoiner(",", "(", expand ? "...)" : ")");
-        args.forEach((arg) -> sargs.add(arg.toString()));
-        return name + sargs.toString();
+        args.forEach((arg) -> sargs.add(HCLExpression.asString(arg)));
+        return HCLExpression.asString(name) + sargs.toString();
     }

Review Comment:
   Yes, the AST structures intended to hold partially valid trees, so it needs 
to have a bit "flexibility".
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to