Move context into beginning of the Parser class

Fixes compile error when @context contains nested class declaration.