See https://github.com/montagejs/frb/blob/master/parse.js