lean4-htt/tests/lean/docparse/block_0012.expected.out
David Thrane Christiansen 3e2124bb48
feat: docstrings with Verso syntax (#10307)
This PR upstreams the Verso parser and adds preliminary support for
Verso in docstrings. This will allow the compiler to check examples and
cross-references in documentation.

After a `stage0` update, a follow-up PR will add the appropriate
attributes that allow the feature to be used. The parser tests from
Verso also remain to be upstreamed, and user-facing documentation will
be added once the feature has been used on more internals.
2025-09-10 07:03:57 +00:00

84 lines
No EOL
2.4 KiB
Text

Success! Final stack:
(Lean.Doc.Syntax.ul
"ul{"
[(Lean.Doc.Syntax.li
"*"
[(Lean.Doc.Syntax.para
"para{"
[(Lean.Doc.Syntax.code
"`"
(str "\"structure\"")
"`")
(Lean.Doc.Syntax.text (str "\" and \""))
(Lean.Doc.Syntax.code
"`"
(str "\"inductive\"")
"`")
(Lean.Doc.Syntax.text
(str "\" commands\""))]
"}")
(Lean.Doc.Syntax.ul
"ul{"
[(Lean.Doc.Syntax.li
"*"
[(Lean.Doc.Syntax.para
"para{"
[(Lean.Doc.Syntax.link
"["
[(Lean.Doc.Syntax.text
(str "\"#5842\""))]
"]"
(Lean.Doc.Syntax.url
"("
(str
"\"https://github.com/leanprover/lean4/pull/5842\"")
")"))
(Lean.Doc.Syntax.text
(str "\" and \""))
(Lean.Doc.Syntax.link
"["
[(Lean.Doc.Syntax.text
(str "\"#5783\""))]
"]"
(Lean.Doc.Syntax.url
"("
(str
"\"https://github.com/leanprover/lean4/pull/5783\"")
")"))
(Lean.Doc.Syntax.text
(str
"\" implement a feature where the \""))
(Lean.Doc.Syntax.code
"`"
(str "\"structure\"")
"`")
(Lean.Doc.Syntax.text
(str
"\" command can now define recursive inductive types:\""))]
"}")
(Lean.Doc.Syntax.codeblock
"```"
[`lean []]
"\n"
(str
"\"structure Tree where\\n n : Nat\\n children : Fin n → Tree\\n\\ndef Tree.size : Tree → Nat\\n | {n, children} => Id.run do\\n let mut s := 0\\n for h : i in [0 : n] do\\n s := s + (children ⟨i, h.2⟩).size\\n pure s\\n\"")
"```")])
(Lean.Doc.Syntax.li
"*"
[(Lean.Doc.Syntax.para
"para{"
[(Lean.Doc.Syntax.link
"["
[(Lean.Doc.Syntax.text
(str "\"#5814\""))]
"]"
(Lean.Doc.Syntax.url
"("
(str
"\"https://github.com/leanprover/lean4/pull/5814\"")
")"))
(Lean.Doc.Syntax.text (str "\" \""))]
"}")])]
"}")])]
"}")
All input consumed.