Skip to content

Add nested multiline comment support

Quinten Cabo requested to merge Quinten/sac2c:nested-multiline-comments into develop

This MR adds support to the lexer for multiline nested comments.

/* /* Nested comment */ */

Why not?

This would have been useful when I was debbuging the Xoodoo code I was writing because I wanted to comment out parts of the file but those files already had doc strings. This feature makes it easy to quickly comment out a functions that have doc strings or multi line comments in them.

/*
/* Description of foo */
int foo() { return 0; }

/* Description of bar */
int bar() { return 0;}
*/ 

int main() { return 0; }

Merge request reports