Minor changes to oop macro

This commit is contained in:
flaviut 2014-06-01 13:03:22 -04:00
commit 08dd43fc9d

View file

@ -1,10 +1,10 @@
---
title: OOP Macro
---
<!--- Thanks to fowl for creating this page -->
<!--- Thanks to fowl for creating this page, filwit for fixing some oddities -->
# OOP Macro
This is the code that we currently must write to use OOP in nimrod:
This is the code that we currently must write to use OOP in Nimrod:
```nimrod
type Animal = ref object of TObject
@ -38,6 +38,8 @@ class Cat of Animal:
method vocalize: string = "meow"
```
To get that nice notation, we can use a macro:
```nimrod
import macros