chore(parser): remove locals and replace with ScopeLocals

Closes #365