Skip to content

Instantly share code, notes, and snippets.

@gbenatti
Created March 17, 2011 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gbenatti/874723 to your computer and use it in GitHub Desktop.
Save gbenatti/874723 to your computer and use it in GitHub Desktop.
deffered boo macro
namespace UnityScript.Macros
import Boo.Lang.Compiler.Ast
macro deferred:
case [| deferred $(ReferenceExpression(Name: name)) = $initializer |]:
p = Property(Name: name)
p.Getter = [|
[Boo.Lang.Useful.Attributes.OnceAttribute]
def get():
return $initializer
|]
yield p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment