doc: moduleDoc (#3874)

This commit is contained in:
Sebastian Ullrich 2024-04-11 16:21:03 +02:00 committed by GitHub
parent 68e3982eed
commit 37938ecde1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,6 +44,11 @@ match against a quotation in a command kind's elaborator). -/
@[builtin_term_parser low] def quot := leading_parser
"`(" >> withoutPosition (incQuotDepth (many1Unbox commandParser)) >> ")"
/--
`/-! <text> -/` defines a *module docstring* that can be displayed by documentation generation
tools. The string is associated with the corresponding position in the file. It can be used
multiple times in the same file.
-/
@[builtin_command_parser]
def moduleDoc := leading_parser ppDedent <|
"/-!" >> commentBody >> ppLine