chore: upgrade compiler version
parent
211ade7828
commit
89dd2fa46e
|
@ -66,10 +66,10 @@ def declNameToLink (name : Name) : HtmlM String := do
|
|||
pure $ (←moduleNameToLink module) ++ "#" ++ name.toString
|
||||
|
||||
def splitWhitespaces (s : String) : (String × String × String) := Id.run do
|
||||
let front := "".pushn ' ' (s.find (!Char.isWhitespace ·))
|
||||
let front := "".pushn ' ' $ s.offsetOfPos (s.find (!Char.isWhitespace ·))
|
||||
let mut s := s.trimLeft
|
||||
let back := "".pushn ' ' (s.length - s.offsetOfPos (s.find Char.isWhitespace))
|
||||
s:= s.trimRight
|
||||
s := s.trimRight
|
||||
(front, s, back)
|
||||
|
||||
partial def infoFormatToHtml (i : CodeWithInfos) : HtmlM (Array Html) := do
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Output
|
|||
let c := s.get i
|
||||
if p c then
|
||||
let i := s.next i
|
||||
splitAroundAux s p i i (c.toString::s.extract b (i-1)::r)
|
||||
splitAroundAux s p i i (c.toString::s.extract b (i-⟨1⟩)::r)
|
||||
else
|
||||
splitAroundAux s p b (s.next i) r
|
||||
|
||||
|
|
|
@ -81,8 +81,8 @@ def jsxText : Parser :=
|
|||
@[combinatorFormatter DocGen4.Jsx.jsxText] def jsxText.formatter : Formatter := pure ()
|
||||
@[combinatorParenthesizer DocGen4.Jsx.jsxText] def jsxText.parenthesizer : Parenthesizer := pure ()
|
||||
|
||||
syntax jsxAttrName := ident <|> strLit
|
||||
syntax jsxAttrVal := strLit <|> group("{" term "}")
|
||||
syntax jsxAttrName := ident <|> str
|
||||
syntax jsxAttrVal := str <|> group("{" term "}")
|
||||
syntax jsxSimpleAttr := jsxAttrName "=" jsxAttrVal
|
||||
syntax jsxAttrSpread := "[" term "]"
|
||||
syntax jsxAttr := jsxSimpleAttr <|> jsxAttrSpread
|
||||
|
@ -103,12 +103,12 @@ def translateAttrs (attrs : Array Syntax) : MacroM Syntax := do
|
|||
as ← match attr with
|
||||
| `(jsxAttr| $n:jsxAttrName=$v:jsxAttrVal) =>
|
||||
let n ← match n with
|
||||
| `(jsxAttrName| $n:strLit) => pure n
|
||||
| `(jsxAttrName| $n:str) => pure n
|
||||
| `(jsxAttrName| $n:ident) => pure $ quote (toString n.getId)
|
||||
| _ => Macro.throwUnsupported
|
||||
let v ← match v with
|
||||
| `(jsxAttrVal| {$v}) => pure v
|
||||
| `(jsxAttrVal| $v:strLit) => pure v
|
||||
| `(jsxAttrVal| $v:str) => pure v
|
||||
| _ => Macro.throwUnsupported
|
||||
`(($as).push ($n, ($v : String)))
|
||||
| `(jsxAttr| [$t]) => `($as ++ ($t : Array (String × String)))
|
||||
|
|
|
@ -19,7 +19,7 @@ package «doc-gen4» {
|
|||
},
|
||||
{
|
||||
name := `lake
|
||||
src := Source.git "https://github.com/leanprover/lake" "9378575b5575f49a185d50130743a190a9be2f82"
|
||||
src := Source.git "https://github.com/leanprover/lake" "d961d8cfaa1c354c10f3fed55b32de85c205f4ab"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
leanprover/lean4:nightly-2022-03-06
|
||||
leanprover/lean4:nightly-2022-04-04
|
||||
|
|
Loading…
Reference in New Issue