parser: improved lib/parser/parser.js