Warning, /frameworks/syntax-highlighting/autotests/folding/highlight.cpp.fold is written in an unsupported language. File is not indexed.
0001 #pragma once
0002
0003 #include <cassert>
0004 #include <assert.h>
0005 #include "assert.h"
0006 #include "assert.hpp" // abc
0007 #include "path/assert.hpp"
0008 #include "assert.h"a
0009 #include "assert.h" a
0010 #include <cassert>a
0011 #include <cassert> a
0012 #include FOO() error
0013 #include_next <cassert> a
0014 #include_next <cassert> <beginfold id='1'>/*</beginfold id='1'> a
0015 <endfold id='1'>*/</endfold id='1'> b
0016 #include PATH_IN_MACRO
0017 #include PATH_IN_MACRO()
0018 #include PATH_IN_MACRO(a, b)
0019
0020 #define SOME_VAR 1
0021 #<beginfold id='2'></beginfold id='2'>ifdef SOME_VAR
0022
0023 #define MULTILINE_MACRO one \
0024 two \
0025 three
0026
0027 # define MULTILINE_MACRO_TEXT \
0028 <beginfold id='1'>/*</beginfold id='1'> NOTE The contents of macro is too green :D <endfold id='1'>*/</endfold id='1'> \
0029 char const s[] = "a\\b" \
0030 "c\nd" \
0031 std::uint##x##_t \
0032 std::vector<beginfold id='1'>/*</beginfold id='1'><endfold id='1'>*/</endfold id='1'><T> \
0033 std::chrono::<beginfold id='1'>/*</beginfold id='1'>milli<endfold id='1'>*/</endfold id='1'>seconds
0034
0035
0036 # define VARIADIC(a, ...) \
0037 f(a##a) \
0038 f(__VA_ARGS__) \
0039 f(#__VA_ARGS__) \
0040 f(__VA_ARGS__) \
0041 f(0 __VA_OPT__(,) __VA_ARGS__) \
0042 x __VA_OPT__(= { __VA_ARGS__ })
0043
0044 # define MACRO() BAD \ ESCAPED
0045
0046 # error dds
0047 # warning dds
0048 # line 2 "file.cpp"
0049 # define A(x, y) x##y x#y
0050 // OK(L, a) -> L"a"
0051 # define OK(x, y) x###y
0052 # define BAD(x, y) x####y
0053 # define A <beginfold id='1'>/*</beginfold id='1'> multi line
0054 with comment <endfold id='1'>*/</endfold id='1'> expr
0055 # define A <beginfold id='1'>/*</beginfold id='1'> multi line
0056 with comment <endfold id='1'>*/</endfold id='1'>
0057 23
0058 #<endfold id='2'></endfold id='2'><beginfold id='2'>else</beginfold id='2'> // x
0059 #42 // gcc extension = #line 42
0060
0061 // error
0062 #wrong
0063 # wrong
0064 #<endfold id='2'>endif</endfold id='2'> x
0065 #<beginfold id='2'></beginfold id='2'>if DS()
0066 #<endfold id='2'></endfold id='2'><beginfold id='2'>else</beginfold id='2'> x
0067 #<endfold id='2'></endfold id='2'><beginfold id='2'>else</beginfold id='2'> <beginfold id='1'>/*</beginfold id='1'> <endfold id='1'>*/</endfold id='1'>x
0068 #<endfold id='2'></endfold id='2'><beginfold id='2'>else</beginfold id='2'> <beginfold id='1'>/*</beginfold id='1'> x
0069 y <endfold id='1'>*/</endfold id='1'> z
0070 #<endfold id='2'>endif</endfold id='2'>
0071
0072 // check that _XXX defines work, bug 397766
0073 #<beginfold id='2'></beginfold id='2'>ifndef _HEADER_GUARD
0074 #define _HEADER_GUARD 1
0075 #<endfold id='2'>endif</endfold id='2'>
0076 #<beginfold id='2'></beginfold id='2'>ifdef _HEADER_GUARD
0077 #<beginfold id='2'></beginfold id='2'>if (_HEADER_GUARD >= 1)
0078 #<endfold id='2'>endif</endfold id='2'>
0079 #<endfold id='2'>endif</endfold id='2'>
0080
0081 static int g_global;
0082
0083 template<class T, typename U, template<class> class = std::is_pointer>
0084 struct class1
0085 : private std::vector<T>, public U
0086 <beginfold id='3'>{</beginfold id='3'>
0087 class1()
0088 try
0089 : _member1(xxx)
0090 <beginfold id='3'>{</beginfold id='3'><endfold id='3'>}</endfold id='3'>
0091 catch(...)
0092 <beginfold id='3'>{</beginfold id='3'><endfold id='3'>}</endfold id='3'>
0093
0094 class1(class1&&) = default;
0095
0096 ~class1()
0097 <beginfold id='3'>{</beginfold id='3'><endfold id='3'>}</endfold id='3'>
0098
0099 void foo() <beginfold id='3'>{</beginfold id='3'> return; <endfold id='3'>}</endfold id='3'>
0100 void foo() const <beginfold id='3'>{</beginfold id='3'> return; <endfold id='3'>}</endfold id='3'>
0101 void foo() noexcept <beginfold id='3'>{</beginfold id='3'> return; <endfold id='3'>}</endfold id='3'>
0102 void foo() const noexcept <beginfold id='3'>{</beginfold id='3'> return; <endfold id='3'>}</endfold id='3'>
0103 virtual void foo() const noexcept <beginfold id='3'>{</beginfold id='3'> return; <endfold id='3'>}</endfold id='3'>
0104 static void foo() <beginfold id='3'>{</beginfold id='3'> return; <endfold id='3'>}</endfold id='3'>
0105 constexpr static void foo() const
0106 noexcept(noexcept(std::is_pointer<U>::value)) override
0107 <beginfold id='3'>{</beginfold id='3'>
0108 xxx::template ttt<U>::type <beginfold id='3'>{</beginfold id='3'><endfold id='3'>}</endfold id='3'>;
0109 xxx.template get<U>();
0110 xxx.std::rdbuf();
0111 auto x = C<'a'> + y;
0112 <endfold id='3'>}</endfold id='3'>
0113
0114 int operator->*(T (C::*m)(int));
0115 operator value_t ();
0116
0117 private:
0118 protected:
0119 public:
0120 value_type _member1; // NOTE internal ?
0121 value_type __internal;
0122 value_type internal__;
0123 value_type _M_internal;
0124 value_t member2_;
0125 value_type m_member3;
0126
0127 static int s_static;
0128 static constexpr int s_static;
0129 static inline int s_static;
0130 static inline constexpr int s_static;
0131 <endfold id='3'>}</endfold id='3'>;
0132
0133 constexpr struct : xyz
0134 <beginfold id='3'>{</beginfold id='3'>
0135 using xyz::xyz;
0136 using xyz::operator=;
0137
0138 int a : 1;
0139 int b : 7;
0140 <endfold id='3'>}</endfold id='3'> x <beginfold id='3'>{</beginfold id='3'><endfold id='3'>}</endfold id='3'>;
0141
0142 template<class T>
0143 using is_pointer = std::is_pointer<T>::type;
0144
0145 template<class T>
0146 constexpr auto is_pointer_v = std::is_pointer<T>::value;
0147
0148 uint64_t namespaces()
0149 <beginfold id='3'>{</beginfold id='3'>
0150 std::vector<T>;
0151 boost::vector<T>;
0152 detail::vector<T>;
0153 details::vector<T>;
0154 aux::vector<T>;
0155 internals::vector<T>;
0156 other::vector<T>;
0157 <endfold id='3'>}</endfold id='3'>
0158
0159 task<> tcp_echo_server() <beginfold id='3'>{</beginfold id='3'>
0160 char data[1024];
0161 for (;;) <beginfold id='3'>{</beginfold id='3'>
0162 size_t n = co_await socket.async_read_some(buffer(data));
0163 co_await async_write(socket, buffer(data, n));
0164 <endfold id='3'>}</endfold id='3'>
0165 <endfold id='3'>}</endfold id='3'>
0166
0167 #<beginfold id='2'></beginfold id='2'>if 1
0168 double foo(const A);
0169 <endfold id='2'></endfold id='2'><beginfold id='2'>#else</beginfold id='2'> // else
0170 double foo(const A);
0171 <endfold id='2'>#endif</endfold id='2'> // end
0172
0173 #<beginfold id='2'></beginfold id='2'>if 0
0174 double foo(const A);
0175 <endfold id='2'></endfold id='2'><beginfold id='2'>#else</beginfold id='2'> // else
0176 double foo(const A);
0177 <endfold id='2'>#endif</endfold id='2'> // end
0178
0179 #<beginfold id='2'></beginfold id='2'>if 1
0180 double foo(const A);
0181 <endfold id='2'></endfold id='2'><beginfold id='2'>#elif</beginfold id='2'> 1
0182 double foo(const A);
0183 #elif 0
0184 double foo(const A);
0185 <endfold id='2'>#endif</endfold id='2'> // end
0186
0187 #<beginfold id='2'></beginfold id='2'>if 0
0188 double foo(const A);
0189 <endfold id='2'></endfold id='2'><beginfold id='2'>#elif 1</beginfold id='2'>
0190 double foo(const A);
0191 <endfold id='2'></endfold id='2'><beginfold id='2'>#elif</beginfold id='2'> 0
0192 double foo(const A);
0193 <endfold id='2'>#endif</endfold id='2'> // end
0194
0195 #<beginfold id='2'></beginfold id='2'>if 0
0196 double foo(const A);
0197 <endfold id='2'></endfold id='2'><beginfold id='2'>#elif</beginfold id='2'> a
0198 double foo(const A);
0199 #<endfold id='2'></endfold id='2'><beginfold id='2'></beginfold id='2'>elif 0
0200 double foo(const A);
0201 <endfold id='2'></endfold id='2'><beginfold id='2'>#elif</beginfold id='2'> a
0202 double foo(const A);
0203 #<endfold id='2'></endfold id='2'><beginfold id='2'>else</beginfold id='2'> // else
0204 double foo(const A);
0205 #<endfold id='2'>endif</endfold id='2'> // end
0206
0207 #<beginfold id='2'></beginfold id='2'>if 0 // blah blah
0208 double foo(const A);
0209 <endfold id='2'></endfold id='2'><beginfold id='2'>#elif 1 </beginfold id='2'>// blah blah
0210 double foo(const A);
0211 <endfold id='2'></endfold id='2'><beginfold id='2'>#else</beginfold id='2'> // else
0212 double foo(const A);
0213 <endfold id='2'>#endif</endfold id='2'> // end
0214
0215 #<beginfold id='2'></beginfold id='2'>if 0 || a
0216 double foo(const A);
0217 #<endfold id='2'></endfold id='2'><beginfold id='2'>else</beginfold id='2'> // else
0218 double foo(const A);
0219 #<endfold id='2'>endif</endfold id='2'> // end
0220
0221 #<beginfold id='2'></beginfold id='2'>if 1 || a
0222 double foo(const A);
0223 <endfold id='2'></endfold id='2'><beginfold id='2'>#else</beginfold id='2'> // else
0224 double foo(const A);
0225 <endfold id='2'>#endif</endfold id='2'> // end
0226
0227 #<beginfold id='2'></beginfold id='2'>if 0 && a
0228 double foo(const A);
0229 #<endfold id='2'></endfold id='2'><beginfold id='2'>else</beginfold id='2'> // else
0230 double foo(const A);
0231 #<endfold id='2'>endif</endfold id='2'> // end
0232
0233 #<beginfold id='2'></beginfold id='2'>if 1 && a
0234 double foo(const A);
0235 #<endfold id='2'></endfold id='2'><beginfold id='2'>else</beginfold id='2'> // else
0236 double foo(const A);
0237 #<endfold id='2'>endif</endfold id='2'> // end
0238
0239 #<beginfold id='2'></beginfold id='2'>if a
0240 double foo(const A);
0241 #<endfold id='2'></endfold id='2'><beginfold id='2'></beginfold id='2'>elif 0
0242 double foo(const A);
0243 <endfold id='2'>#endif</endfold id='2'> // end
0244
0245 #<beginfold id='2'></beginfold id='2'>if a
0246 double foo(const A);
0247 #<endfold id='2'></endfold id='2'><beginfold id='2'></beginfold id='2'>elif 1
0248 double foo(const A);
0249 <endfold id='2'>#endif</endfold id='2'> // end
0250
0251 #<beginfold id='2'></beginfold id='2'>if a
0252 double foo(const A);
0253 #<endfold id='2'></endfold id='2'><beginfold id='2'></beginfold id='2'>elif a
0254 double foo(const A);
0255 #<endfold id='2'>endif</endfold id='2'> // end
0256
0257 int bar(void*p, void * pp)
0258 <beginfold id='3'>{</beginfold id='3'>
0259 # <beginfold id='2'></beginfold id='2'>if 0
0260 double foo();
0261 <endfold id='2'></endfold id='2'><beginfold id='2'># else</beginfold id='2'> // else
0262 double foo();
0263 <endfold id='2'># endif</endfold id='2'> // end
0264 <endfold id='3'>}</endfold id='3'>
0265
0266 #<beginfold id='2'></beginfold id='2'>if abc 0
0267 double foo();
0268 #<endfold id='2'>endif</endfold id='2'> // end
0269
0270 #<beginfold id='2'></beginfold id='2'>if xxx
0271 double foo();
0272 #<endfold id='2'></endfold id='2'><beginfold id='2'>else</beginfold id='2'>
0273 double foo();
0274 #<endfold id='2'>endif</endfold id='2'> // end
0275
0276 #<beginfold id='2'></beginfold id='2'>if xxx
0277 double foo();
0278 #<endfold id='2'></endfold id='2'><beginfold id='2'></beginfold id='2'>elif xxx // elseif
0279 double foo();
0280 #<endfold id='2'></endfold id='2'><beginfold id='2'></beginfold id='2'>elif xxx // elseif
0281 double foo();
0282 #<endfold id='2'>endif</endfold id='2'> // end
0283
0284 // error
0285 #
0286 #d
0287 # d
0288 #<beginfold id='2'></beginfold id='2'>if
0289 #<endfold id='2'></endfold id='2'><beginfold id='2'></beginfold id='2'>elif
0290 #<endfold id='2'>endif</endfold id='2'>
0291 #<beginfold id='2'></beginfold id='2'>ifndef
0292 #<endfold id='2'>endif</endfold id='2'>
0293 #<beginfold id='2'></beginfold id='2'>ifdef 0
0294 #<endfold id='2'>endif</endfold id='2'> // end
0295
0296 static uint64_t intWithSuffix = 42ull;
0297 static long intWithSuffixAndPrefix = 0b0101L;
0298 static int octNum = 07232;
0299 static int invalidOctNum = 09231;
0300 static uint64_t hexNum = 0xDEADBEEF42;
0301 static uint64_t invalidHexNum = 0xGLDFKG;
0302 static char binNum = 0b0101010;
0303
0304 static int64_t intWithSuffix = -42LL;
0305 static long intWithSuffixAndPrefix = -0b0101L;
0306 static int octNum = -07232;
0307 static int invalidOctNum = -09231;
0308 static int64_t hexNum = -0xDEADBEEF42;
0309 static int64_t invalidHexNum = -0xGLDFKG;
0310 static char binNum = -0b0101010;
0311
0312 static uint64_t intWithSuffixWithSep = 4'2ull;
0313 static long intWithSuffixAndPrefixWithSep = 0b0'10'1L;
0314 static int octNumWithSep = 07'232;
0315 static int invalidOctNumWithSep = 09'23'1;
0316 static uint64_t hexNumWithSep = 0xD'EAD'BE'EF'42;
0317 static uint64_t invalidHexNumWithSep = 0xGLD'FKG;
0318 static char binNumWithSep = 0b0'1010'10;
0319
0320 static uint64_t invalidSep = 42'ull;
0321 static uint64_t invalidSep = 42';
0322
0323 static double d1 = 42.;
0324 static double d2 = .42;
0325 static double d2a = -0.49;
0326 static double d2b = -0.09;
0327 static double d3 = 42.3e1;
0328 static double d4 = .2e-12;
0329 static double d5 = 32.e+12;
0330 static double invalidD1 = 32.e+a12;
0331 static float floatQualifier = 23.123f;
0332 // Hexadecimal floating point (c++17)
0333 static double d6 = 0x1ffp10;
0334 static double d7 = 0X0p-1;
0335 static double d8 = 0x1.p0;
0336 static double d9 = 0xf.p-1L;
0337 static double d10 = 0x0.123p-1;
0338 static double d11 = 0xa.bp10l;
0339 static double invalidD2 = 0x0.123p-a;
0340 static float floatQualifier = 0xf.p-1f;
0341
0342 60min; // c++17
0343 60.min;
0344 60.3min;
0345 0x1ffp10min;
0346 2us
0347 2d; // c++20
0348 23._f
0349 23._fd
0350 2.3_f
0351 2.3_fd
0352 2._f
0353 2._fd
0354 2e4_f
0355 2e4_fd
0356
0357 // error
0358 23.fd
0359 2e_fd
0360 2e
0361 1.y
0362 1.0_E+2.0
0363 1.0_E +2.0 // ok
0364 1_p+2
0365 1_p +2 // ok
0366 4s.count()
0367 4s. count()
0368 4s .count() // ok
0369
0370 static bool yes = true;
0371 static bool no = false;
0372
0373 // *char*
0374 static const char c1 = 'c';
0375 static const char c1a = u8'c'; // utf-8 char (c++17)
0376 static const char16_t c1b = u'c';
0377 static const char32_t c1c = U'c';
0378 static const wchar_t c1d = L'c';
0379 static const char c2 = '\n';
0380 static const char c2a = '\120'; // octal
0381 static const char c2b = '\x1f'; // hex
0382 static const char c2c = '\'';
0383 static const char c2d = '\\';
0384 static const wchar_t c2e = L'\x1ff'; // hex
0385 static const wchar_t c2e = U'\x1fffffff'; // hex
0386 // error
0387 '\x123';
0388 '\u1234';
0389 '\U12345678';
0390 U'\u12345';
0391 u'\u123';
0392 U'\U1234567';
0393 U'\U123456789';
0394 U'\x123456789';
0395
0396 // string
0397 static const char* c3 = "string";
0398 static const char* c4 = "\"string\n\t\012\x12\"";
0399 static const char* c5 = "multiline \
0400 string";
0401 static const char* c6 = "multifragment" "other""string";
0402 static const char* c6a = u8"string";
0403 static const char16_t* c6b = u"string";
0404 static const char32_t* c6c = U"string";
0405 static const wchar_t* c6d = L"string";
0406 static const char* rawString1 = R<beginfold id='4'>"(</beginfold id='4'>string<endfold id='4'>)"</endfold id='4'>;
0407 static const char* rawString1a = u8R<beginfold id='4'>"(</beginfold id='4'>string<endfold id='4'>)"</endfold id='4'>;
0408 static const char16_t* rawString1b = uR<beginfold id='4'>"(</beginfold id='4'>string<endfold id='4'>)"</endfold id='4'>;
0409 static const char32_t* rawString1c = UR<beginfold id='4'>"(</beginfold id='4'>string<endfold id='4'>)"</endfold id='4'>;
0410 static const wchar_t* rawString1d = LR<beginfold id='4'>"(</beginfold id='4'>string\nstring<endfold id='4'>)"</endfold id='4'>;
0411 static const char* rawString2 = R<beginfold id='4'>"ab(</beginfold id='4'>string\nstring%s)ab "<endfold id='4'>)ab"</endfold id='4'>;
0412 static const char* rawString3 = R<beginfold id='4'>"ab(</beginfold id='4'>string
0413 string%<endfold id='4'>)ab"</endfold id='4'>;
0414 " %d %df fd" U"ds %d" R<beginfold id='4'>"(</beginfold id='4'>a%d<endfold id='4'>)"</endfold id='4'>;
0415 "\x{12343} \x{1} \o{12121} \u{1221a} \N{LATIN CAPITAL LETTER A WITH MACRON}"
0416 "\x123xsk";
0417 u"\x123xsk";
0418 // error
0419 u8"\x123xsk";
0420 "\x{123x43} \o{121821} \u{12x21as} \N{LATIN CAPITAL letter A WITH MACRON}"
0421
0422 // printf format
0423 "a%10sa%-10sa%*sa%-10.*sa%-*.*sa"
0424 "a%ca%*ca%%a%ia%da%.6ia%.0ia%+ia%ia%xa%#xa"
0425 "a%.0fa%.32fa%05.2fa%.2fa%5.2fa%Ea%aa"
0426 // std::format
0427 "a{{:6}}a{}a{:6}a{:*<6}a{:6d}a"
0428 "a{0:}a{0:+}a{0:-}a{0: }a"
0429 "a{:+06d}a{:#06x}a{:<06}a"
0430 "a{:{}}a{0:{1}.{2}f}a"
0431 ;
0432
0433 // UDL (c++11)
0434
0435 operator""_a(const char*);
0436 operator ""_a(const char*);
0437 operator "" _a(const char*);
0438 // invalid suffix
0439 operator "" a(const char*);
0440 operator ""a(const char*);
0441 operator""a(const char*);
0442
0443 "string"_s; // user
0444 "string"s; // standard
0445 "string"_s-b; // -b is not part of the string
0446
0447 // Macro
0448
0449 MY_XXX;
0450 BOOST_XXX;
0451 __STDC_VERSION__;
0452 __TIME__;
0453 __cplusplus;
0454
0455 // Attributes
0456
0457 [[noreturn]] void foo();
0458 [[deprecated]] void foo();
0459 [[deprecated("because")]] void foo();
0460 void foo([[carries_dependency]] int);
0461
0462 [[opt(1), debug]]
0463 [[using CC: opt(1), debug]] // c++17
0464 [[using CC: CC::opt(1)]] // c++17
0465
0466 [[gnu::assume_aligned(3'2l,2)]] void* f();
0467 [[using gnu: assume_aligned(3)]]
0468 [[clang::assume_aligned(3)]]
0469
0470 void f([[maybe_unused]] int val)
0471 <beginfold id='3'>{</beginfold id='3'>
0472 [[maybe_unused]] int x;
0473 switch (x = foo(); x) <beginfold id='3'>{</beginfold id='3'>
0474 case 1:
0475 [[fallthrough]];
0476 case XXX:
0477 case Class::foo():
0478 [[fallthrough]];
0479 default:
0480 ;
0481 <endfold id='3'>}</endfold id='3'>
0482
0483 // c++17: fold expression
0484 (args + ... + (1 * 2));
0485 (v.push_back(args), ...);
0486
0487 [[omp::parallel]] for (auto&& x : v)
0488 x;
0489 for (auto&& [first,second] : mymap) <beginfold id='3'>{</beginfold id='3'>
0490 <endfold id='3'>}</endfold id='3'>
0491
0492 auto [x, y] = foo();
0493
0494 [x = 1, =y]()<beginfold id='3'>{</beginfold id='3'><endfold id='3'>}</endfold id='3'>;
0495
0496 decltype((auto)) x = foo();
0497 <endfold id='3'>}</endfold id='3'>
0498
0499 auto f() -> decltype(foo());
0500
0501 __attribute__((pure)) void f();
0502
0503 label:
0504 goto label;
0505
0506
0507 <beginfold id='5'>//BEGIN</beginfold id='5'> region
0508 // TODO comment FIXME comment ### comment BUG comment
0509 <endfold id='5'>//END</endfold id='5'> region
0510
0511 // \brief blah blah
0512 /// \brief blah blah
0513
0514 <beginfold id='6'>/**</beginfold id='6'>
0515 * Doxygen
0516 * @param p1 text
0517 * \brief <b>bold text</b>
0518 * <beginfold id='7'>\dot</beginfold id='7'>
0519 * a -> b
0520 * <endfold id='7'>\enddot</endfold id='7'>
0521 *
0522 * <beginfold id='7'>\verbatim</beginfold id='7'>
0523 * <dummy>
0524 * <endfold id='7'>\endverbatim</endfold id='7'>
0525 * <html>text</html>
0526 <endfold id='6'>*/</endfold id='6'>
0527
0528 #<endfold id='2'>endif</endfold id='2'>
0529
0530 // Some GNU macros, cross-referenced from gcc.xml to isocpp.xml
0531 __GCC_ATOMIC_CHAR16_T_LOCK_FREE
0532 __GNUC__
0533 __linux__
0534
0535 // Digraphs (see bug #411508)
0536 %:include <stdio.h>
0537 int main()
0538 <beginfold id='3'><%</beginfold id='3'>
0539 []()<beginfold id='3'>{</beginfold id='3'><endfold id='3'>%></endfold id='3'>();
0540 <endfold id='3'>}</endfold id='3'>
0541 <:<:fallthrough]]
0542
0543 <beginfold id='6'>/**</beginfold id='6'>
0544 * multi-line comment
0545 <endfold id='6'>*/</endfold id='6'>
0546
0547 <beginfold id='1'>/*</beginfold id='1'> comment <endfold id='1'>*/</endfold id='1'>
0548 <beginfold id='3'>{</beginfold id='3'> <beginfold id='3'>{</beginfold id='3'> <endfold id='3'>}</endfold id='3'> <beginfold id='3'>{</beginfold id='3'>
0549 <beginfold id='5'>//BEGIN</beginfold id='5'>
0550 <endfold id='3'>}</endfold id='3'>
0551 <endfold id='5'>//END</endfold id='5'>
0552 <endfold id='3'>}</endfold id='3'>
0553
0554 #<beginfold id='2'></beginfold id='2'>if 0
0555 <endfold id='2'></endfold id='2'><beginfold id='2'>#elif 1</beginfold id='2'>
0556 <endfold id='2'></endfold id='2'><beginfold id='2'>#else</beginfold id='2'>
0557 <endfold id='2'>#endif</endfold id='2'>
0558
0559 #<beginfold id='2'></beginfold id='2'>if 1
0560 int x; // variable shall not be grey
0561 <endfold id='2'>#endif</endfold id='2'>
0562 #<beginfold id='2'></beginfold id='2'>if defined (A)
0563 int y; // variable shall not be grey
0564 #<endfold id='2'></endfold id='2'><beginfold id='2'></beginfold id='2'>elif defined (B)
0565 int z; // variable shall not be grey
0566 #<endfold id='2'>endif</endfold id='2'>
0567
0568 <beginfold id='6'>/*!</beginfold id='6'>
0569 * formula <beginfold id='7'>@f$</beginfold id='7'>a+b<endfold id='7'>@f$</endfold id='7'> inside a block comment
0570 <endfold id='6'>*/</endfold id='6'>
0571
0572 //! formula <beginfold id='7'>@f$</beginfold id='7'>a+b<endfold id='7'>@f$</endfold id='7'> inside a inline comment
0573 // formula @f$a+b@f$ inside a normal comment
0574
0575 /// \b sa