Equations
- StrataDDM.infoSourceRange (Lean.SourceInfo.original leading pos trailing endPos) = some { start := pos, stop := endPos }
- StrataDDM.infoSourceRange (Lean.SourceInfo.synthetic pos endPos canonical) = some { start := pos, stop := endPos }
- StrataDDM.infoSourceRange Lean.SourceInfo.none = none
Instances For
Equations
- One or more equations did not get rendered due to their size.
- StrataDDM.sourceLocPos (Lean.Syntax.atom info val) = Option.map (fun (x : StrataDDM.SourceRange) => x.start) (StrataDDM.infoSourceRange info)
- StrataDDM.sourceLocPos (Lean.Syntax.ident info rawVal val preresolved) = Option.map (fun (x : StrataDDM.SourceRange) => x.start) (StrataDDM.infoSourceRange info)
- StrataDDM.sourceLocPos Lean.Syntax.missing = none
Instances For
End position of a syntax tree, skipping trailing zero-width children.
For a node with no range of its own, the end is that of its last child that covers
source text, found by scanning right-to-left and skipping zero-width children. A
trailing element with no concrete syntax — an absent trailing optional, or an
empty-template op (op else0 () => ;) — parses to a zero-width node past the real
content (on the preceding token's consumed trailing whitespace), so it must be
skipped, not taken as the end. The common case is an O(1) own-info check: these nodes
carry their own zero-width range (stamped by the parser). A rangeless nested op is the
exception — it needs a descent to tell whether its subtree is zero-width (see
lastSpanningEnd's none case).
The skip lives here, in the descending function, so a parent reaching a nested
child's end gets the corrected position at every level, e.g. if … else new C →
else → new → its absent trailing type-args. mkSourceRange? is then just
⟨sourceLocPos, sourceLocEnd⟩. The i == 0 case keeps the first child's end even
if empty, so a wholly-empty node still yields a position. The skip is one-sided —
sourceLocPos needs no leading skip (see its comment).
Equations
- One or more equations did not get rendered due to their size.
- StrataDDM.sourceLocEnd (Lean.Syntax.atom info val) = Option.map (fun (x : StrataDDM.SourceRange) => x.stop) (StrataDDM.infoSourceRange info)
- StrataDDM.sourceLocEnd (Lean.Syntax.ident info rawVal val preresolved) = Option.map (fun (x : StrataDDM.SourceRange) => x.stop) (StrataDDM.infoSourceRange info)
- StrataDDM.sourceLocEnd Lean.Syntax.missing = none
Instances For
Source range of a syntax tree: its start position paired with its end.
Both bounds come from sourceLocPos / sourceLocEnd, so the trailing
zero-width skip that sourceLocEnd performs is honored here for free — this is
just the two positional queries combined.
Equations
- StrataDDM.mkSourceRange? stx = match StrataDDM.sourceLocPos stx, StrataDDM.sourceLocEnd stx with | some start, some stop => some { start := start, stop := stop } | x, x_1 => none
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- getInputContext : m Parser.InputContext
- getDialects : m DialectMap
- getOpenDialects : m (Std.HashSet DialectName)
- getGlobalContext : m GlobalContext
- getErrorCount : m Nat
- logErrorMessage : Lean.Message → m Unit
Instances
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- StrataDDM.Elab.logError loc msg isSilent = do let inputCtx ← StrataDDM.Elab.ElabClass.getInputContext StrataDDM.Elab.logErrorMessage (StrataDDM.Elab.mkErrorMessage inputCtx loc msg isSilent)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- inputContext : Parser.InputContext
- stopPos : String.Pos.Raw
- loader : LoadedDialects
- missingImport : Bool
Flag indicating imports are missing (silences some errors).
- typecheck : Bool
When false, type inference and unification are skipped during elaboration.
Instances For
Equations
- StrataDDM.Elab.DeclContext.empty = { inputContext := default, stopPos := 0, loader := StrataDDM.Elab.LoadedDialects.empty, missingImport := false }
Instances For
Equations
- StrataDDM.Elab.ValueWithName α name = { d : α // StrataDDM.Elab.NamedValue.name d = name }
Instances For
Map metadata attribute names to any declarations with that name that are in the current scope.
- map : Std.DHashMap String fun (name : String) => Array (DialectName × ValueWithName α name)
Instances For
Equations
Instances For
Equations
Map metadata attribute names to any declarations with that name that are in the current scope.
- map : Std.DHashMap String fun (name : String) => Array (DialectName × { d : MetadataDecl // d.name = name })
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- m.addDialect dialect = StrataDDM.Collection.fold (fun (x1 : StrataDDM.Elab.MetadataDeclMap) (x2 : StrataDDM.MetadataDecl) => x1.add dialect.name x2) m dialect.metadata
Instances For
Instances For
- syncat (d : SynCatDecl) : TypeOrCatDecl
- type (d : TypeDecl) : TypeOrCatDecl
Instances For
Equations
Equations
Instances For
Equations
Instances For
Map metadata attribute names to any declarations with that name that are in the current scope.
- map : Std.DHashMap String fun (name : String) => Array (DialectName × { d : TypeOrCatDecl // d.name = name })
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- m.addSynCat dialect d = m.add dialect (StrataDDM.Elab.TypeOrCatDecl.syncat d)
Instances For
Equations
- m.addType dialect d = m.add dialect (StrataDDM.Elab.TypeOrCatDecl.type d)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
- fixedParsers : Parser.ParsingContext
- openDialects : Array DialectName
- openDialectSet : Std.HashSet DialectName
- typeOrCatDeclMap : TypeOrCatDeclMap
Map for looking up types and categories by name.
- metadataDeclMap : MetadataDeclMap
Map for looking up metadata by name.
- parserMap : PrattParsingTableMap
- tokenTable : Lean.Parser.TokenTable
- globalContext : GlobalContext
- pos : String.Pos.Raw
- errors : Array Lean.Message
Instances For
Equations
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.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Opens the dialect definition dialect in the parser so it is visible to parser, but not part of environment. This is used for dialect definitions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Opens the dialect (not must not already be open)
Opens the dialect (not must not already be open)
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.
Instances For
Equations
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.