1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
#include <stdio.h>
#include "stdint.h"
#define SOME_VAR 1
#<beginfold id='1'></beginfold id='1'>ifdef SOME_VAR
#define MULTILINE_MACRO one \
two \
three
static uint64_t intWithSuffix = 42ull + ~1233L;
static int octNum = 07232;
static int invalidOctNum = 09231;
static uint64_t hexNum = 0xDEADBEEF42;
static uint64_t invalidHexNum = 0xGLDFKG;
static char binNum = 0b0101010;
static double d1 = 42. + 0x1.5p+2;
static double d2 = .42;
static double d3 = 42.3e1;
static double d4 = .2e-12;
static double d5 = 32.e+12;
static float floatQualifier = 23.123f;
static const char c1 = 'c';
static const char c2 = '\n';
static const char c2a = '\120'; // octal
static const char c2o = '\0'; // octal, special case
static const char c2b = '\x1f'; // hex
static const char c2c = '\'';
static const char c2d = '\\';
static const char* c3 = "string";
static const char* c4 = "\"string\n\t\012\x12\"";
static const char* c5 = "multiline \
string";
<beginfold id='2'>//BEGIN</beginfold id='2'> region
// TODO comment FIXME comment ### comment
<endfold id='2'>//END</endfold id='2'> region
#wrong
<beginfold id='3'>/**</beginfold id='3'>
* Doxygen
* @param p1 text
* \brief <b>bold text</b>
* <beginfold id='4'>\dot</beginfold id='4'>
* a -> b
* <endfold id='4'>\enddot</endfold id='4'>
*
* <beginfold id='4'>\verbatim</beginfold id='4'>
* <dummy>
* <endfold id='4'>\endverbatim</endfold id='4'>
* <html>text</html>
<endfold id='3'>*/</endfold id='3'>
#<endfold id='1'>endif</endfold id='1'>
<beginfold id='5'>/*</beginfold id='5'>
* Empty lines after a line continuation character (see bug #405903)
<endfold id='5'>*/</endfold id='5'>
#define one \
two \
int i = 0; // this should not be highlighted as a macro
char* str = "string \
int i = 0; // this should not be highlighted as a string
<beginfold id='5'>/*</beginfold id='5'>
* Digraphs (see bug #411508)
<endfold id='5'>*/</endfold id='5'>
%:include <stdio.h>
int a()
<beginfold id='6'><%</beginfold id='6'>
[]()<beginfold id='6'>{</beginfold id='6'><endfold id='6'>%></endfold id='6'>();
<endfold id='6'>}</endfold id='6'>
#define 1
#define 2
#define 3
#define 4
#define 5
#define tab
#<beginfold id='1'></beginfold id='1'>if 1
int x; // variable shall not be grey
#<endfold id='1'>endif</endfold id='1'>
#<beginfold id='1'></beginfold id='1'>if defined (A)
int y; // variable shall not be grey
#<endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>elif defined (B)
int z; // variable shall not be grey
#<endfold id='1'>endif</endfold id='1'>
// C23 format
"%w8ux %w8dx %DDfx";
|