pylangparser: extend parse API