Rohansi/Mond — pull request #9 by Syke94 (2014-09-30 10:43:20+00:00)
Title: Adds metamethod support.

Metamethods are designed to be magic methods, fallbacks that are only invoked if there is no other alternative, they do ***not*** override default behaviour.

Metamethods need only be defined on an object like any other function in order to work, and they are only valid on objects. They can optionally be defined on either the prototype or object instance, allowing inheriting classes to override metamethods on their base class' prototype.

The following metamethods are available to Mond userland code:

* `__bool`
* `__add`
* `__sub`
* `__mul`
* `__div`
* `__mod`
* `__pow`
* `__lshift`
* `__rshift`
* `__and`
* `__or`
* `__xor`
* `__neg`
* `__not`
* `__gt` **\***
* `__gte` **\***
* `__lt` **\***
* `__lte` **\***
* `__serialize`
* `__get`
* `__set`
* `__eq`
* `__in`
* `__string`

**\***: `__gt`, `__gte`, `__lt`, and `__lte` are each defined separately to allow greater flexibility, one doesn't need to define `__gt` if all they want is `__lt`. Also prevents non-intuitive error messages.

* Adds a workaround for C#'s type restriction on shift operator overloads to expose these to Mond.
* Adds new example to demonstrate metamethods.