Update parser.js

Why parse function throws error? I think it can only report errors through callback function.