Skip to content

parser: Correctly parse modules starting with declaration-and-docstring

Ben Gamari requested to merge wip/T17561 into master

Previously the module header parser would start by parsing a maybedocheader. This would consume the docstring and commit us to parsing a module ... where header. However, a module lacking a module ... where header may also begin with a docstring, but one rather belonging to a declaration. Restructure the parser to ensure that this case is handled correctly.

Fixes #17561 (closed).

Edited by Ben Gamari

Merge request reports