URL:
<http://gna.org/bugs/?21343>
Summary: Nested #define's
Project: Battle for Wesnoth
Submitted by: laerne
Submitted on: Fri 13 Dec 2013 12:43:54 PM GMT
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: WML
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.10.6
Operating System: Any
_______________________________________________________
Details:
This code :
#define F Y Z
#define G A B
{H Y A B}
#enddef
{K G {Z}}
#undef G
#enddef
fails with "Macro/file 'Z' is missing at a/_main.cfg:10", the macro parameters
seems to have been undefined with the first #enddef
At least one of the following behavior should happen :
* Define should be nestable.
* inside a #define, lines beginning by #define are comments.
I'm not hiding that I truly prefer the former solution, because it allows
simulate lambda function for callback macros (As show in the first example
where K is a macro taking the name of a macro).
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 13 Dec 2013 12:43:54 PM GMT Name: _main.cfg Size: 148B By:
laerne
The full minimal example
<http://gna.org/bugs/download.php?file_id=19465>
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?21343>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs