Follow-up Comment #2, bug #19074 (project wesnoth):
I think this bug could be expanded to parentheses as well. (Apparently the
preprocessor doesn't store in a stack how many opening deliminators it
encountered, whether '(' or '<<'.) I tried to use a formula as a parameter to
a macro, and got some weird error messages. Doing some digging revealed that a
line like
{MACRO ($({X}-1))}
is expanded as if it had two arguments, the first being "$({X}-1" and the
second being ")". Going with the assumption that the second argument came from
the second closing parenthesis, this looks like the first argument was
terminated by the first closing parenthesis, even though that punctuation
should have been (or would be nice if it was) matched with the opening
parenthesis inside the argument.
On the other hand, this particular example can be made to work as intended (a
single argument) with quotes:
{MACRO "$({X}-1)"}
so still not a high priority. (Unless quotes are not supposed to work this
way? The wiki only mentions parentheses for grouping preprocessor arguments.)
I'm using 1.9.12 at the moment, in case that makes a difference.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?19074>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs