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


##########
ide/languages.hcl/src/org/netbeans/modules/languages/hcl/HCLSemanticAnalyzer.java:
##########
@@ -115,9 +121,11 @@ public DefaultHighlighter(SourceRef refs) {
         }
         
         @Override
-        protected boolean visitBlock(HCLBlock block) {
-            if (block.getParent() instanceof HCLDocument) {
-                List<HCLIdentifier> decl = block.getDeclaration();
+        protected void highlight(HCLTreeWalker.Step step) {
+
+            HCLElement<HCLElement> e = step.node();
+            if (e instanceof HCLBlock block && step.depth() == 1) {

Review Comment:
   switch with record patterns when the time comes. Till then I've changed them 
to `else if`-s.



-- 
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