fix tab completion (still clunky)

fixes hraban/lush#62
forgot to move helper functions to Parser.js

fixes hraban/lush#61