Anonymous function parsing

Adding code and tests to improve the detection of anonymous functions.

This fix will also stop a php notice that was being shown when the parser encountered an anonymous function.