Update parser.go

Moved helper method below it's caller