Support for methods inside statements

Fixes #1