Warning, /frameworks/syntax-highlighting/autotests/folding/test.c.fold is written in an unsupported language. File is not indexed.
0001 #include <stdio.h>
0002 #include "stdint.h"
0003
0004 #define SOME_VAR 1
0005 #<beginfold id='1'></beginfold id='1'>ifdef SOME_VAR
0006
0007 #define MULTILINE_MACRO one \
0008 two \
0009 three
0010
0011 static uint64_t intWithSuffix = 42ull + ~1233L;
0012 static int octNum = 07232;
0013 static int invalidOctNum = 09231;
0014 static uint64_t hexNum = 0xDEADBEEF42;
0015 static uint64_t invalidHexNum = 0xGLDFKG;
0016 static char binNum = 0b0101010;
0017
0018 static double d1 = 42. + 0x1.5p+2;
0019 static double d2 = .42;
0020 static double d3 = 42.3e1;
0021 static double d4 = .2e-12;
0022 static double d5 = 32.e+12;
0023 static float floatQualifier = 23.123f;
0024
0025 static const char c1 = 'c';
0026 static const char c2 = '\n';
0027 static const char c2a = '\120'; // octal
0028 static const char c2o = '\0'; // octal, special case
0029 static const char c2b = '\x1f'; // hex
0030 static const char c2c = '\'';
0031 static const char c2d = '\\';
0032 static const char* c3 = "string";
0033 static const char* c4 = "\"string\n\t\012\x12\"";
0034 static const char* c5 = "multiline \
0035 string";
0036
0037 <beginfold id='2'>//BEGIN</beginfold id='2'> region
0038 // TODO comment FIXME comment ### comment
0039 <endfold id='2'>//END</endfold id='2'> region
0040
0041 #wrong
0042
0043 <beginfold id='3'>/**</beginfold id='3'>
0044 * Doxygen
0045 * @param p1 text
0046 * \brief <b>bold text</b>
0047 * <beginfold id='4'>\dot</beginfold id='4'>
0048 * a -> b
0049 * <endfold id='4'>\enddot</endfold id='4'>
0050 *
0051 * <beginfold id='4'>\verbatim</beginfold id='4'>
0052 * <dummy>
0053 * <endfold id='4'>\endverbatim</endfold id='4'>
0054 * <html>text</html>
0055 <endfold id='3'>*/</endfold id='3'>
0056
0057 #<endfold id='1'>endif</endfold id='1'>
0058
0059 <beginfold id='5'>/*</beginfold id='5'>
0060 * Empty lines after a line continuation character (see bug #405903)
0061 <endfold id='5'>*/</endfold id='5'>
0062 #define one \
0063 two \
0064
0065 int i = 0; // this should not be highlighted as a macro
0066 char* str = "string \
0067
0068
0069 int i = 0; // this should not be highlighted as a string
0070
0071 <beginfold id='5'>/*</beginfold id='5'>
0072 * Digraphs (see bug #411508)
0073 <endfold id='5'>*/</endfold id='5'>
0074 %:include <stdio.h>
0075 int a()
0076 <beginfold id='6'><%</beginfold id='6'>
0077 []()<beginfold id='6'>{</beginfold id='6'><endfold id='6'>%></endfold id='6'>();
0078 <endfold id='6'>}</endfold id='6'>
0079
0080 #define 1
0081 #define 2
0082 #define 3
0083 #define 4
0084 #define 5
0085 #define tab
0086
0087 #<beginfold id='1'></beginfold id='1'>if 1
0088 int x; // variable shall not be grey
0089 #<endfold id='1'>endif</endfold id='1'>
0090 #<beginfold id='1'></beginfold id='1'>if defined (A)
0091 int y; // variable shall not be grey
0092 #<endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>elif defined (B)
0093 int z; // variable shall not be grey
0094 #<endfold id='1'>endif</endfold id='1'>
0095
0096 // C23 format
0097 "%w8ux %w8dx %DDfx";