scriptcs/scriptcs — pull request #694 by ztone (2014-05-18 16:01:30+00:00)
Title: Mono engine to support loose function calling other loose functions

This PR extends the current mono engine so it's can support loose functions call other loose functions, regardless where they are defined. With this PR the mono engine should be one step closer to be at pair with the Roslyn engine.

Known issues with the Mono engine still are:
* Block statements need to be declared after classes and functions. Spiked 2 separate solutions to fix this. One involved tricking NRefactory (was a bit hacky), the other was done by pre-lexing the code, but neither is a straightforward solution. The lexing solution seems more viable.
* Seems like Mono.Csharp does not like nested classes. Haven't looked into this yet. Looks like it's a problem with Mono.Csharp but I have to do a spike to be sure.

Anyway, this PR will support this code for mono now
```c#
public int FooBar(int a, int b)
{
return Foo(a,Bar(a,b));
}

public int Bar(int a, int b)
{
return a * b;
}

public int Foo(int a, int b)
{
return a + b;
}

FooBar(42,42);
```