Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.8.2
-
Fix Version/s: 0.9
-
Component/s: None
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
*) new style macros:
*) macros are generators for nodes (any kind)
*) type members are added to the enclosing type or module
*) expressions and statements are added to the enclosing block
example:
macro types:
for typeName in types.Arguments:
type = [|
class $typeName:
pass
|]
yield type
Landed in rev. 3055.
Re-assigned it to me as I was very motivated to do it this morning to be able to use this awesomeness in a project I'm currently working on, I hope you do not mind
To be fully backward-compatible the new syntax does not replace completely the old one but is a additional possibility on top of the old one (which was/is just good enough if the consumer is not interested to generated classes/members/etc...)
For the sake of documenting this JIRA issue I post the testcases here :