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.
180 lines
No EOL
6.4 KiB
Text
180 lines
No EOL
6.4 KiB
Text
10 failures:
|
|
@38 (⟨4, 14⟩): expected ']'
|
|
"\n\n* [busted\n link\n\n* [busted\n _italics\n link\n\n\n* [busted destination](hey\n\n* : expected ']'
|
|
"\n\n* [busted\n _italics\n link\n\n\n* [busted destination](hey\n\n* : '_'
|
|
"\n\n\n* [busted destination](hey\n\n* : expected ']'
|
|
"\n\n\n* [busted destination](hey\n\n* : expected ')'
|
|
"\n\n* : expected ']'
|
|
"\n\n* : expected ')'
|
|
"\n\n* a *bold choice\n\n* very _italic *and bold, onto many\n lines is OK* but don't forget...\n\na paragraph with [a bad link syntax](http://example.com\nis OK. The rest *works*.\n"
|
|
@196 (⟨20, 16⟩): '*'
|
|
"\n\n* very _italic *and bold, onto many\n lines is OK* but don't forget...\n\na paragraph with [a bad link syntax](http://example.com\nis OK. The rest *works*.\n"
|
|
@269 (⟨23, 35⟩): '_'
|
|
"\n\na paragraph with [a bad link syntax](http://example.com\nis OK. The rest *works*.\n"
|
|
@326 (⟨25, 55⟩): expected ')'
|
|
"\nis OK. The rest *works*.\n"
|
|
|
|
Final stack:
|
|
[(Lean.Doc.Syntax.para
|
|
"para{"
|
|
[(Lean.Doc.Syntax.linebreak
|
|
"line!"
|
|
(str "\"\\n\""))
|
|
(Lean.Doc.Syntax.text
|
|
(str "\"Error recovery tests:\""))]
|
|
"}")
|
|
(Lean.Doc.Syntax.ul
|
|
"ul{"
|
|
[(Lean.Doc.Syntax.li
|
|
"*"
|
|
[(Lean.Doc.Syntax.para
|
|
"para{"
|
|
[(Lean.Doc.Syntax.link
|
|
"["
|
|
[(Lean.Doc.Syntax.text
|
|
(str "\"busted link\""))]
|
|
<missing>)]
|
|
"}")])
|
|
(Lean.Doc.Syntax.li
|
|
"*"
|
|
[(Lean.Doc.Syntax.para
|
|
"para{"
|
|
[(Lean.Doc.Syntax.link
|
|
"["
|
|
[(Lean.Doc.Syntax.text
|
|
(str "\"busted\""))
|
|
(Lean.Doc.Syntax.linebreak
|
|
"line!"
|
|
(str "\"\\n\""))
|
|
(Lean.Doc.Syntax.text
|
|
(str "\" link\""))]
|
|
<missing>)]
|
|
"}")])
|
|
(Lean.Doc.Syntax.li
|
|
"*"
|
|
[(Lean.Doc.Syntax.para
|
|
"para{"
|
|
[(Lean.Doc.Syntax.link
|
|
"["
|
|
[(Lean.Doc.Syntax.text
|
|
(str "\"busted\""))
|
|
(Lean.Doc.Syntax.linebreak
|
|
"line!"
|
|
(str "\"\\n\""))
|
|
(Lean.Doc.Syntax.text (str "\" \""))
|
|
(Lean.Doc.Syntax.emph
|
|
"_"
|
|
[(Lean.Doc.Syntax.text
|
|
(str "\"italics\""))
|
|
(Lean.Doc.Syntax.linebreak
|
|
"line!"
|
|
(str "\"\\n\""))
|
|
(Lean.Doc.Syntax.text
|
|
(str "\" link\""))]
|
|
<missing>)]
|
|
<missing>)]
|
|
"}")])
|
|
(Lean.Doc.Syntax.li
|
|
"*"
|
|
[(Lean.Doc.Syntax.para
|
|
"para{"
|
|
[(Lean.Doc.Syntax.link
|
|
"["
|
|
[(Lean.Doc.Syntax.text
|
|
(str "\"busted destination\""))]
|
|
"]"
|
|
(Lean.Doc.Syntax.url
|
|
"("
|
|
(str "\"hey\"")
|
|
<missing>))]
|
|
"}")])
|
|
(Lean.Doc.Syntax.li
|
|
"*"
|
|
[(Lean.Doc.Syntax.para
|
|
"para{"
|
|
[(Lean.Doc.Syntax.image
|
|
"!["
|
|
(str "\"busted image alt text\"")
|
|
<missing>)]
|
|
"}")])
|
|
(Lean.Doc.Syntax.li
|
|
"*"
|
|
[(Lean.Doc.Syntax.para
|
|
"para{"
|
|
[(Lean.Doc.Syntax.image
|
|
"!["
|
|
(str "\"busted image link\"")
|
|
"]"
|
|
(Lean.Doc.Syntax.url
|
|
"("
|
|
(str "\"image.png\"")
|
|
<missing>))]
|
|
"}")])
|
|
(Lean.Doc.Syntax.li
|
|
"*"
|
|
[(Lean.Doc.Syntax.para
|
|
"para{"
|
|
[(Lean.Doc.Syntax.text (str "\"a \""))
|
|
(Lean.Doc.Syntax.bold
|
|
"*"
|
|
[(Lean.Doc.Syntax.text
|
|
(str "\"bold choice\""))]
|
|
<missing>)]
|
|
"}")])
|
|
(Lean.Doc.Syntax.li
|
|
"*"
|
|
[(Lean.Doc.Syntax.para
|
|
"para{"
|
|
[(Lean.Doc.Syntax.text (str "\"very \""))
|
|
(Lean.Doc.Syntax.emph
|
|
"_"
|
|
[(Lean.Doc.Syntax.text
|
|
(str "\"italic \""))
|
|
(Lean.Doc.Syntax.bold
|
|
"*"
|
|
[(Lean.Doc.Syntax.text
|
|
(str "\"and bold, onto many\""))
|
|
(Lean.Doc.Syntax.linebreak
|
|
"line!"
|
|
(str "\"\\n\""))
|
|
(Lean.Doc.Syntax.text
|
|
(str "\" lines is OK\""))]
|
|
"*")
|
|
(Lean.Doc.Syntax.text
|
|
(str "\" but don't forget...\""))]
|
|
<missing>)]
|
|
"}")])]
|
|
"}")
|
|
(Lean.Doc.Syntax.para
|
|
"para{"
|
|
[(Lean.Doc.Syntax.text
|
|
(str "\"a paragraph with \""))
|
|
(Lean.Doc.Syntax.link
|
|
"["
|
|
[(Lean.Doc.Syntax.text
|
|
(str "\"a bad link syntax\""))]
|
|
"]"
|
|
(Lean.Doc.Syntax.url
|
|
"("
|
|
(str "\"http://example.com\"")
|
|
<missing>))
|
|
(Lean.Doc.Syntax.linebreak
|
|
"line!"
|
|
(str "\"\\n\""))
|
|
(Lean.Doc.Syntax.text
|
|
(str "\"is OK. The rest \""))
|
|
(Lean.Doc.Syntax.bold
|
|
"*"
|
|
[(Lean.Doc.Syntax.text (str "\"works\""))]
|
|
"*")
|
|
(Lean.Doc.Syntax.text (str "\".\""))
|
|
(Lean.Doc.Syntax.linebreak
|
|
"line!"
|
|
(str "\"\\n\""))]
|
|
"}")] |