Created
October 28, 2010 17:08
-
-
Save bamboo/651812 to your computer and use it in GitHub Desktop.
macros are a beautiful thing
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
macro traceable_property: | |
case [| traceable_property $name as $type |]: | |
backingField = [| | |
private $("_$name") as $type | |
|] | |
yield backingField | |
yield [| | |
public $name: | |
get: | |
print "$self." + $(name.ToString()) | |
return $backingField | |
set: $backingField = value | |
|] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment