pylangparser: improve grouping of ParserResult's for easier AST iteration