TOML Parser Utilities #
Generic parser utilities used by Lake's TOML parser.
@[instance_reducible]
Instances For
@[inline]
ParserFn combinator that runs f with the current position.
Instances For
Match an arbitrary parser or do nothing.
Instances For
@[inline]
A sequence of n repetitions of a parser function.
Instances For
def Lake.Toml.mkUnexpectedCharError (s : Lean.Parser.ParserState) (c : Char) (expected : List String := []) (pushMissing : Bool := true) :
Instances For
@[inline]
Instances For
Instances For
Consume a single digit (i.e., Char.isDigit).
Instances For
Consume a two digits (i.e., Char.isDigit).
Instances For
Push a new atom onto the syntax stack.
Instances For
Match an arbitrary ParserFn and return the consumed String in a Syntax.atom.
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
def Lake.Toml.pushLit (kind : Lean.SyntaxNodeKind) (startPos : String.Pos.Raw) (trailingFn : Lean.Parser.ParserFn := skipFn) :
Push (Syntax.node kind <new-atom>) onto the syntax stack.
Instances For
def Lake.Toml.litFn (kind : Lean.SyntaxNodeKind) (p : Lean.Parser.ParserFn) (trailingFn : Lean.Parser.ParserFn := skipFn) :
Instances For
def Lake.Toml.lit (kind : Lean.SyntaxNodeKind) (p : Lean.Parser.ParserFn) (trailingFn : Lean.Parser.ParserFn := skipFn) :
Instances For
Instances For
def Lake.Toml.litWithAntiquot (name : String) (kind : Lean.SyntaxNodeKind) (p : Lean.Parser.ParserFn) (trailingFn : Lean.Parser.ParserFn := skipFn) (anonymous : Bool := false) :
Instances For
Instances For
Instances For
@[reducible, inline]
Parser → Parser hidden by an abbrev.
Prevents the formatter/parenthesizer generator from transforming it.
Instances For
def Lake.Toml.recNodeWithAntiquot (name : String) (kind : Lean.SyntaxNodeKind) (f : ParserMapFn) (anonymous : Bool := false) :
Instances For
@[inline]
Instances For
@[inline]