bamboo/boo — pull request #76 by drslump (2013-11-02 02:08:15+00:00)
Title: Safe access operator

I've been using this on BooJs for almost a year and it works pretty well, so I ported it to c# (please forgive my fluency in that language). It's just syntax sugar after the parsing step.

It's modelled after the one in CoffeeScript, serving two purposes: safe access and existential. If the question mark is at the end of the expression it resolves to a boolean value, otherwise it just falls back to null.

The only issue is that Boo doesn't allow to null value types (ie: `int`), so the compiler will complains about it. I guess it's ok to assume that it can't be used for value types.

Some examples of how to use it and the transformations.
```boo
foo?
(foo is not null)

foo?.bar?
((foo.bar if foo is not null else null) is not null)

foo?.bar
(foo.bar if foo != null else null)

foo?.bar?.baz
(foo.bar.baz if (foo.bar if foo is not null else null) is not null else null)

foo?.bar?[2]
(foo.bar[2] if (foo.bar if foo is not null else null) is not null else null)

foo?.bar?()
(foo.bar() if (foo.bar if foo is not null else null) is not null else null)
```