- head : SyntaxTreeInfo
- headToken : SyntaxTreeInfo
- tail : SyntaxTreeInfo
- tailToken : SyntaxTreeInfo
Instances For
docstring TODO
- children : Array SyntaxTreeInfo
- headTail? : Option ChildrenHeadTail
- outIdx : Nat
Instances For
docstring TODO
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
docstring TODO
- stx : Lean.Syntax
- idx : Nat
- childrenInfo? : Option ChildrenInfo
- parentInfo? : Option ParentInfo
Instances For
docstring TODO
- leaf (info : SyntaxTreeInfo) : FlattenSyntaxTreeInfoElement
- into (info : SyntaxTreeInfo) : FlattenSyntaxTreeInfoElement
- out (info : SyntaxTreeInfo) : FlattenSyntaxTreeInfoElement
Instances For
@[reducible, inline]
docstring TODO
Equations
Instances For
docstring TODO
Equations
Instances For
docstring TODO
Equations
- treeInfo.children? = Option.map (fun (x : Mathlib.Linter.Indentation.ChildrenInfo) => x.children) treeInfo.childrenInfo?
Instances For
Equations
- treeInfo.isToken = treeInfo.childrenInfo?.isNone
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- treeInfo.headTokenIdx? = Option.map (fun (x : Mathlib.Linter.Indentation.SyntaxTreeInfo) => x.idx) treeInfo.headToken?
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- treeInfo.tailTokenIdx? = Option.map (fun (x : Mathlib.Linter.Indentation.SyntaxTreeInfo) => x.idx) treeInfo.tailToken?
Instances For
Equations
- (Mathlib.Linter.Indentation.FlattenSyntaxTreeInfoElement.out i).nextTokenIdx? = i.nextTokenIdx?
- (Mathlib.Linter.Indentation.FlattenSyntaxTreeInfoElement.leaf i).nextTokenIdx? = i.nextTokenIdx?
- (Mathlib.Linter.Indentation.FlattenSyntaxTreeInfoElement.into i).nextTokenIdx? = (i.headTokenIdx? <|> i.nextTokenIdx?)
Instances For
- subarray : Subarray FlattenSyntaxTreeInfoElement
Instances
Equations
- Mathlib.Linter.Indentation.forInTokens subarray = { subarray := subarray }
Instances For
Equations
- array.forInTokens = { subarray := Array.toSubarray array }
Instances For
instance
Mathlib.Linter.Indentation.instForInForInTokensFlattenSyntaxTreeInfoElement
{m : Type u_1 → Type u_2}
:
Equations
- One or more equations did not get rendered due to their size.
@[specialize #[]]
partial def
Mathlib.Linter.Indentation.instForInForInTokensFlattenSyntaxTreeInfoElement.loop
{m : Type u_1 → Type u_2}
{β : Type u_1}
[Monad m]
(f : FlattenSyntaxTreeInfoElement → β → m (ForInStep β))
(stop : Nat)
(array : Array FlattenSyntaxTreeInfoElement)
(i : Nat)
(state : β)
:
m β
Equations
Instances For
def
Mathlib.Linter.Indentation.ChildrenHeadTail.getHeadIdxInChildren
(headTail : ChildrenHeadTail)
:
Equations
- headTail.getHeadIdxInChildren = headTail.head.parentInfo?.get!.idxInChildren
Instances For
def
Mathlib.Linter.Indentation.ChildrenHeadTail.getTailIdxInChildren
(headTail : ChildrenHeadTail)
:
Equations
- headTail.getTailIdxInChildren = headTail.tail.parentInfo?.get!.idxInChildren
Instances For
Equations
- treeInfo.hasToken = (treeInfo.isToken || treeInfo.childrenInfo?.elim false fun (x : Mathlib.Linter.Indentation.ChildrenInfo) => x.headTail?.isSome)
Instances For
docstring TODO
Equations
- One or more equations did not get rendered due to their size.
Instances For
docstring TODO
Equations
- treeInfo.getPos? = Option.map (fun (x : Lean.SourceInfo) => x.getPos?.get!) treeInfo.getInfo?
Instances For
docstring TODO
Equations
- treeInfo.getTailPos? = Option.map (fun (x : Lean.SourceInfo) => x.getTailPos?.get!) treeInfo.getInfo?
Instances For
Equations
- treeInfo.getSrc? = Option.map (fun (x : Mathlib.Linter.Indentation.SyntaxTreeInfo) => x.stx.getInfo?.get!.getTrailing?.get!.str) treeInfo.headToken?
Instances For
Equations
- treeInfo.getSubstring? = Option.map (fun (x : String.Pos) => { str := treeInfo.getSrc?.get!, startPos := x, stopPos := treeInfo.getTailPos?.get! }) treeInfo.getPos?
Instances For
def
Mathlib.Linter.Indentation.SyntaxTreeInfo.headTailOfChildren
(children : Array SyntaxTreeInfo)
:
docstringTODO
Equations
- One or more equations did not get rendered due to their size.
Instances For
partial def
Mathlib.Linter.Indentation.SyntaxTreeInfo.ofSyntaxAux
(stx : Lean.Syntax)
(parentInfo : Option ParentInfo := none)
:
docstring TODO
partial def
Mathlib.Linter.Indentation.SyntaxTreeInfo.updateNextTokenIdx
(treeInfo : SyntaxTreeInfo)
:
docstring TODO
docstring TODO
Equations
- One or more equations did not get rendered due to their size.
Instances For
docstring TODO
Equations
- One or more equations did not get rendered due to their size.
Instances For
docstring TODO
Equations
- Mathlib.Linter.Indentation.indentationBeforePos str pos = ({ str := str, startPos := str.findLineStart pos, stopPos := pos }.takeWhile fun (x : Char) => x == ' ').bsize
Instances For
Equations
- treeInfo.getIndentation? = treeInfo.getPos?.bind fun (x : String.Pos) => Mathlib.Linter.Indentation.indentationOfPos treeInfo.getSrc?.get! x
Instances For
def
Mathlib.Linter.Indentation.categoriesContain
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
(stx : Lean.Syntax)
:
m Bool
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Mathlib.Linter.Indentation.SyntaxTreeInfo.needUpdatingIndentation
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
(treeInfo : SyntaxTreeInfo)
:
m Bool
Equations
- treeInfo.needUpdatingIndentation = Mathlib.Linter.Indentation.categoriesContain treeInfo.stx
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
partial def
Mathlib.Linter.Indentation.instToMessageDataSyntaxTreeInfo.go
(i : SyntaxTreeInfo)
(n : Nat)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- msg : Lean.MessageData
- stx : Lean.Syntax
Instances For
@[reducible, inline]
Equations
Instances For
Instances For
Equations
Instances For
def
Mathlib.Linter.Indentation.throwIndentationError
(info : SyntaxTreeInfo)
(msg : Lean.MessageData)
(range : Option String.Range :=
Option.map (fun (p : String.Pos) => { start := info.getSrc?.get!.findLineStart p, stop := p }) info.getPos?)
:
docstring TODO
Equations
- One or more equations did not get rendered due to their size.
- Mathlib.Linter.Indentation.throwIndentationError info msg range = throwThe Mathlib.Linter.Indentation.IndentationError { msg := msg, stx := info.stx }
Instances For
docstring TODO
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
Instances For
- nodeLinters : Lean.NameMap IndentationLinter
- identLinters : Lean.NameMap IndentationLinter
- atomLinters : Std.HashMap String IndentationLinter
- linters : Array (Nat × IndentationLinter)
Instances For
Equations
Instances For
def
Mathlib.Linter.Indentation.Array.merge
{α : Type u_1}
(lt : α → α → Bool)
(xs ys : Array α)
:
Array α
O(|xs| + |ys|). Merge arrays xs and ys. If the arrays are sorted according to lt, then the
result is sorted as well. If two (or more) elements are equal according to lt, they are preserved.
From module Batteries.Data.Array.Merge.
Equations
- Mathlib.Linter.Indentation.Array.merge lt xs ys = Mathlib.Linter.Indentation.Array.merge.go lt xs ys (Array.mkEmpty (xs.size + ys.size)) 0 0
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Mathlib.Linter.Indentation.addIndentationLinters
(linter : IndentationLinters)
(ref : IO.Ref IndentationLinters := indentationLinterRef)
:
Equations
- Mathlib.Linter.Indentation.addIndentationLinters linter ref = ST.Ref.modify ref fun (x : Mathlib.Linter.Indentation.IndentationLinters) => x.add linter
Instances For
def
Mathlib.Linter.Indentation.runLinterOn
(ref : IO.Ref IndentationLinters := indentationLinterRef)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
abbrev
Mathlib.Linter.Indentation.ensure
(treeInfo : SyntaxTreeInfo)
(limit : Limit)
(linter : IndentationLinter := runLinterOn)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Mathlib.Linter.Indentation.markSourceCode
(src : Substring)
(info? : Option Lean.SourceInfo)
(msg : Lean.MessageData)
(afterError : Nat := 3)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
docstring TODO
Equations
- One or more equations did not get rendered due to their size.