Hello, I accept your patch. It will be included in the next release. Thank you!
Regards, Shigio On Fri, Apr 14, 2023 at 4:24 PM Sam <samuel.plessis.fraiss...@gmail.com> wrote: > > global seems not to support c++ namespace syntax like this : > > namespace name1::name2::name3 { /*...*/ } > > here is a patch that allow global to parse this : > > ---------------------------------------------------------------------------------------------------------------- > diff -ur global-6.6.9/libparser/Cpp.c global-6.6.9-patched/libparser/Cpp.c > --- global-6.6.9/libparser/Cpp.c 2022-12-11 23:38:21.000000000 +0800 > +++ global-6.6.9-patched/libparser/Cpp.c 2023-04-14 14:06:49.421958357 > +0800 > @@ -169,13 +169,20 @@ > /* > * namespace name = ...; > * namespace [name] { ... } > + * namespace name[::name]* { ... } > */ > + cpp_namespace_loop: > if ((c = nexttoken(interested, cpp_reserved_word)) == > SYMBOL) { > + cpp_namespace_token_loop: > PUT(PARSER_DEF, token, lineno, sp); > if ((c = nexttoken(interested, > cpp_reserved_word)) == '=') { > crflag = 1; > break; > } > + if (c == CPP_WCOLON) > + goto cpp_namespace_loop; > + if (c == SYMBOL) > + goto cpp_namespace_token_loop; > } > /* > * Namespace block doesn't have any influence on > level. > ---------------------------------------------------------------------------------------------------------------- > > > -- Shigio YAMAGUCHI <shi...@gnu.org> PGP fingerprint: 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB