Ruby parser implemented in pure JavaScript