c.tmbundle icon indicating copy to clipboard operation
c.tmbundle copied to clipboard

Functions in #define never end

Open simleb opened this issue 12 years ago • 6 comments

This simple line doesn't work properly:

#define foo bar()

The scope of what follows on the next line is still meta.preprocessor.macro.c and meta.function.c.

simleb avatar Feb 21 '13 18:02 simleb

Five years later... :-)

I personally worked around this by replacing

{ include = '$base'; }

with

{ include = '#block_innards'; }

for name = 'meta.preprocessor.macro.c'.

Thinking of submitting a PR....

neoxic avatar Apr 15 '18 04:04 neoxic

This also fixes broken syntax highlighting in a multiline #define.

Was: img1

Now: img2

neoxic avatar Apr 15 '18 04:04 neoxic

@neoxic stop thinking, submit 😏

Josar avatar Apr 26 '18 15:04 Josar

That's bossy... I'd better, well, submit...😌

neoxic avatar Apr 27 '18 23:04 neoxic

Though it doesn't fix this btw:

#ifdef __cplusplus
extern "C" {
#endif

Never mind, it's broken on GitHub too.

neoxic avatar Apr 27 '18 23:04 neoxic

Github uses this formatter so it has to be broken.

Josar avatar Apr 28 '18 03:04 Josar