Created
June 30, 2014 09:05
-
-
Save fracek/96d6571ae26d01e74b58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define macro gen-bindings | |
{ gen-bindings(?:name; ?flags) } | |
=> { ?flags } | |
flags: | |
{ } | |
=> { } | |
{ ?flag, ... } | |
=> { ?flag; ... } | |
flag: | |
{ } | |
=> { } | |
{ ?identifier:name => ?dylan-identifier:name ?ignore-this } | |
=> { if (?dylan-identifier) | |
?name ## "$" ?identifier ## "-setter"(?dylan-identifier, opts); | |
format-out("XXX %=\n", ?dylan-identifier); | |
end if } | |
{ ?identifier:name ?ignore-this } | |
=> { if (?identifier) | |
?name ## "$" ?identifier ## "-setter"(?identifier, opts); | |
format-out("YYY %=\n", ?identifier); | |
end if } | |
ignore-this: | |
{ = ?val:* } | |
=> { } | |
{ } | |
=> { } | |
end macro; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment