olety / cjass

Preserving cjass code from code.google.com/p/cjass
0 stars 0 forks source link

Problem with stringizing operator `s` (in macros) #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have this macro:
{{{
#define msg(s) = {
    printf(`s`)
}
}}}

Problem #1
{{{
msg(    s)

// compiles into
printf("s")

// I expect it to compile into
printf("    s")
}}}

Problem #2
{{{
msg(for)

// causes compile error (cJass considers this to be for loop)
// probably the same problem with all other keywords?
}}}

Original issue reported on code.google.com by evgkoc...@gmail.com on 9 Aug 2011 at 11:36

GoogleCodeExporter commented 9 years ago

Original comment by evgkoc...@gmail.com on 9 Aug 2011 at 12:02