NB 26
Win 11-64
clangd   16.0.2

I'm developing in C++ using NB as an editing platform. What I am seeing is that clangd/NB? recognizes '}' in comments. This interferes with the display of blocks of code (click on '(' or ')' and the containing block is displayed with a vertical bar on the left). Instead, the vertical bar terminates on the '}' contained in a comment.

As an example, the block of code highlighted with "namespace x {" terminates on the line containing "}; // byte[][] EXE", while the line containing "pDesc EXE" terminates on the comment line containing "//state" . The "}; // namespace" is not recognized.

What I would expect is that the "namespace x {" would be matched with "}; // namespace", and "pDesc EXE" would be matched with the line containing "}; // byte[][] EXE", and the comment line, "//state" ignored.

This issue also occurs with quoted strings, as in "... } ...", where the semicolon is matched from within the string. I suspect the issue is present in quoted characters  '}', also.

Is this something specific to NB or is it a clangd issue?

thanks
art

namespace x {

   static const pDesc EXE[][12] = {
//                                     STATES
//state    start    :    {  int   }    (    {   str   }  cell }    <
//token      s00  s01  s02  s03  s04  s05  s06  s07  s08  s09 s10  s11
/*EOF*   */ {end, eof, eof, eof, eof, eof, eof, eof, eof, eof, eof, eof}
/*bool   */,{er1, er2, er2, er2, er2, er2, e06, er8, er2, e06, er2, er2}
/*integer*/,{er1, er2, er2, e04, er2, er2, e06, e11, er2, e06, er2, er2}
/*double */,{er1, er2, er2, er2, er2, er2, e06, er8, er2, e06, er2, er2}
/*string */,{e01, er2, er2, er2, er2, er2, e06, e10, er2, e06, er2, er2}
/*chr    */,{e01, er2, er2, er2, er2, er2, e06, er8, er2, e06, er2, er2}
/*lprn   */,{e02, nul, nul, er1, er5, nul, e05, er1, er1, e05, er1, nul}
/*rprn   */,{er1, er3, er3, er3, er3, e07, e07, er1, er1, e07, er1, er1}
/*lcrl   */,{e02, nul, nul, er7, er3, er1, nul, er7, er1, nul, er1, er1}
/*rcrl   */,{er1, er3, er3, er9, nul, er1, er1, er9, nul, er1, nul, er1}
/*lang   */,{er1, er4, er4, er4, er4, er4, e08, er4, er1, er1, er1, e12}
/*rang   */,{er1, er3, er3, er3, er3, er3, er1, er3, er1, e07, er1, er3}
/*colon  */,{er1, nul, er1, er1, er1, er1, er1, er1, er1, er1, er1, er1}
        }; // byte[][] EXE
}; // namespace



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

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

Reply via email to