substack/dotc — pull request #3 by kirbysayshi (2013-09-20 20:12:14+00:00)
Title: Grouped exports fail without a separating token

This is such a cool project. @ctavplay and I were doing some explorations, and came across this bug.

Apparently, if there isn't a token separating `#export` statements, then the preprocessing will fail. Definitely a head-scratching, "shouldn't this work?" moment! Attached is a test case demonstrating.

For example, the attached file `foobar.c` will fail, but:

````c
#export foo // this _comment_ will allow everything to work
#export bazzy as bar

int foo (int n) {
return n * 111;
}

int bazzy (int n) {
return n * 10;
}
````

Also explicitly naming things seems to work as well:

````c
#export foo as foo
#export bazzy as bar

int foo (int n) {
return n * 111;
}

int bazzy (int n) {
return n * 10;
}
````