ID:2387786
 
Resolved
Using raw strings or comments in macro arguments did not compile correctly.
BYOND Version:512.1442
Operating System:Windows 7 Home Basic 64-bit
Web Browser:Firefox 61.0
Applies to:Dream Maker
Status: Resolved (512.1443)

This issue has been resolved.
Descriptive Problem Summary:
Using ' inside // and /* */ comments embedded in macro calls causes compilation errors. Comments avoiding using ' do not. This was discovered by using "aren't" in a comment in such a situation.

Numbered Steps to Reproduce Problem:
Compile the following code.

Code Snippet (if applicable) to Reproduce Problem:
#define LIST_OPERATION(X) doThing(X)

/atom/foo
var/list/someList

/atom/foo/New()
someList = LIST_OPERATION(list(
"A", // test
"B", // test '
"C", /* test */
"D", /* test ' */
))

proc/doThing(var/list/Y)
for(var/Z in Y)
Z++


Expected Results:
Code to compile.

Actual Results:
error: unterminated text (expecting ')
error: missing ' in macro call
For each line this occurs.

Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?
Every time on version 512.1442.

When does the problem NOT occur?
Never on version 512.1442.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Unsure.

Workarounds:
Avoid using ' in any comment embedded inside macro calls. Using doThing() directly also works.
Actually made a muck up in testing this. I had some code in which it did compile properly before introducing the ' but after messing around a bit more I broke it.
Updated the supplied code to actually showcase the error. My bad.
Lummox JR resolved issue with message:
Using raw strings or comments in macro arguments did not compile correctly.