A
Alan Mackenzie
Here is a fragment from an old test case in Emacs's C++ Mode:
1 class CLS {
2 int i; float f; char *s;
3 }
4 cls_1 /* ; */ (1,
5 1.0,
6 "foo"
7 ),
8 cls_2 (2, -1.0, "bar");
.. Noting that the bracketing characters on lines 4, 7 and 8 are
parentheses (not braces), is this coherent C++? If so, what sort of
identifiers are "cls_1" and "cls_2"?
At the moment, Emacs's C++ mode is highlighting cls_1 and cls_2 as
functions. If the fragment is coherent C++, this might be the wrong
thing to do. On the other hand, If the fragment is nonsense, it doesn't
really matter.
Please, somebody, help me out with this puzzling bit of code. Thanks in
advance!
1 class CLS {
2 int i; float f; char *s;
3 }
4 cls_1 /* ; */ (1,
5 1.0,
6 "foo"
7 ),
8 cls_2 (2, -1.0, "bar");
.. Noting that the bracketing characters on lines 4, 7 and 8 are
parentheses (not braces), is this coherent C++? If so, what sort of
identifiers are "cls_1" and "cls_2"?
At the moment, Emacs's C++ mode is highlighting cls_1 and cls_2 as
functions. If the fragment is coherent C++, this might be the wrong
thing to do. On the other hand, If the fragment is nonsense, it doesn't
really matter.
Please, somebody, help me out with this puzzling bit of code. Thanks in
advance!