ID:2623036
 
Resolved
Raw strings did not get parsed correctly when included in macro arguments.
BYOND Version:513
Operating System:Linux
Web Browser:Firefox 81.0
Applies to:Dream Maker
Status: Resolved (513.1535)

This issue has been resolved.
Descriptive Problem Summary:
Raw string syntax @"hi" does not work correctly in a macro argument.

Code Snippet (if applicable) to Reproduce Problem:
#define HI @"hi"
#define NOTHING(X) X

/client/New()
..()
// all good
src << HI
src << @"hi" // should work, doesn't src << NOTHING(@"hi")
// shouldn't work, does
src << NOTHING(@hi@)


The weird indentation is synthesized by the forum's syntax highlighting and is not part of the code.

Expected Results:
NOTHING(@"hi") works and NOTHING(@hi@) does not.

Actual Results:
NOTHING(@"hi") gives "unterminated text" error and NOTHING(@hi@) works instead.

Does the problem occur:
Every time? Or how often? Every time.
In other games? Yes, in a test project.
In other user accounts?
On other computers? Yes, someone in the #coderbus Discord ran into this.

When does the problem NOT occur?
When raw string is used outside of macro argument context.

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.)

Unknown, but 512.1443 had a related changelog.

Using a raw string in #define statement did not substitute the original code correctly when the macro was used. (Lummox JR)
Lummox JR resolved issue with message:
Raw strings did not get parsed correctly when included in macro arguments.