chore: upgrade compiler version
parent
211ade7828
commit
89dd2fa46e
|
@ -66,7 +66,7 @@ def declNameToLink (name : Name) : HtmlM String := do
|
||||||
pure $ (←moduleNameToLink module) ++ "#" ++ name.toString
|
pure $ (←moduleNameToLink module) ++ "#" ++ name.toString
|
||||||
|
|
||||||
def splitWhitespaces (s : String) : (String × String × String) := Id.run do
|
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 mut s := s.trimLeft
|
||||||
let back := "".pushn ' ' (s.length - s.offsetOfPos (s.find Char.isWhitespace))
|
let back := "".pushn ' ' (s.length - s.offsetOfPos (s.find Char.isWhitespace))
|
||||||
s := s.trimRight
|
s := s.trimRight
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace Output
|
||||||
let c := s.get i
|
let c := s.get i
|
||||||
if p c then
|
if p c then
|
||||||
let i := s.next i
|
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
|
else
|
||||||
splitAroundAux s p b (s.next i) r
|
splitAroundAux s p b (s.next i) r
|
||||||
|
|
||||||
|
|
|
@ -81,8 +81,8 @@ def jsxText : Parser :=
|
||||||
@[combinatorFormatter DocGen4.Jsx.jsxText] def jsxText.formatter : Formatter := pure ()
|
@[combinatorFormatter DocGen4.Jsx.jsxText] def jsxText.formatter : Formatter := pure ()
|
||||||
@[combinatorParenthesizer DocGen4.Jsx.jsxText] def jsxText.parenthesizer : Parenthesizer := pure ()
|
@[combinatorParenthesizer DocGen4.Jsx.jsxText] def jsxText.parenthesizer : Parenthesizer := pure ()
|
||||||
|
|
||||||
syntax jsxAttrName := ident <|> strLit
|
syntax jsxAttrName := ident <|> str
|
||||||
syntax jsxAttrVal := strLit <|> group("{" term "}")
|
syntax jsxAttrVal := str <|> group("{" term "}")
|
||||||
syntax jsxSimpleAttr := jsxAttrName "=" jsxAttrVal
|
syntax jsxSimpleAttr := jsxAttrName "=" jsxAttrVal
|
||||||
syntax jsxAttrSpread := "[" term "]"
|
syntax jsxAttrSpread := "[" term "]"
|
||||||
syntax jsxAttr := jsxSimpleAttr <|> jsxAttrSpread
|
syntax jsxAttr := jsxSimpleAttr <|> jsxAttrSpread
|
||||||
|
@ -103,12 +103,12 @@ def translateAttrs (attrs : Array Syntax) : MacroM Syntax := do
|
||||||
as ← match attr with
|
as ← match attr with
|
||||||
| `(jsxAttr| $n:jsxAttrName=$v:jsxAttrVal) =>
|
| `(jsxAttr| $n:jsxAttrName=$v:jsxAttrVal) =>
|
||||||
let n ← match n with
|
let n ← match n with
|
||||||
| `(jsxAttrName| $n:strLit) => pure n
|
| `(jsxAttrName| $n:str) => pure n
|
||||||
| `(jsxAttrName| $n:ident) => pure $ quote (toString n.getId)
|
| `(jsxAttrName| $n:ident) => pure $ quote (toString n.getId)
|
||||||
| _ => Macro.throwUnsupported
|
| _ => Macro.throwUnsupported
|
||||||
let v ← match v with
|
let v ← match v with
|
||||||
| `(jsxAttrVal| {$v}) => pure v
|
| `(jsxAttrVal| {$v}) => pure v
|
||||||
| `(jsxAttrVal| $v:strLit) => pure v
|
| `(jsxAttrVal| $v:str) => pure v
|
||||||
| _ => Macro.throwUnsupported
|
| _ => Macro.throwUnsupported
|
||||||
`(($as).push ($n, ($v : String)))
|
`(($as).push ($n, ($v : String)))
|
||||||
| `(jsxAttr| [$t]) => `($as ++ ($t : Array (String × String)))
|
| `(jsxAttr| [$t]) => `($as ++ ($t : Array (String × String)))
|
||||||
|
|
|
@ -19,7 +19,7 @@ package «doc-gen4» {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name := `lake
|
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