ID:2303152
 
BYOND Version:511.1385; 512.1389
Operating System:Linux
Web Browser:Chrome 61.0.3163.100
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
Using curly braces in macro arguments causes a compile error related to strings.

Numbered Steps to Reproduce Problem:
Compile code below.

Code Snippet (if applicable) to Reproduce Problem:
#define IDENTITY(x) x

/world/New()
IDENTITY( if(1) { world.log << "foo" } ) // error: unterminated text doc (expecting "})

// This is OK
IDENTITY( if(1) world.log << "foo" )

#define BEGIN {
#define END }
// This is OK
IDENTITY( if(1) BEGIN world.log << "foo" END )


Expected Results:
Compile success

Actual Results:
Compile failure with `error: unterminated text doc (expecting "})`

Does the problem occur:
Every time? Or how often? Every time
In other games? N/A
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur?
When you don't use curly braces in macro arguments

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Unknown

Workarounds: Define BEGIN and END as { and } and use those instead.

Bump. Still an issue in both 512.1488 and 513.1500, still very annoying every time I try to pass code snippets to macros.
This turns out to be more complicated than id:72383 because the macro args weren't designed to take whole snippets of code like this. I'm still looking into it to see if it's something I can fix without a lot of grief.