- catName : Name
- first : Bool
- leftRec : Bool
- behavior : Parser.LeadingIdentBehavior
See comment at
Parser.ParserCategory.
Instances For
@[reducible, inline]
Equations
Instances For
(Try to) add a term info for the alias with info info at ref.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Given a stx of category syntax, return a (newStx, lhsPrec?),
where newStx is of category term. After elaboration, newStx should have type
TrailingParserDescr if lhsPrec?.isSome, and ParserDescr otherwise.
Equations
Instances For
Sequence (aka NullNode)
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Auxiliary function for creating declaration names from parser descriptions. Example: Given
syntax term "+" term : term
syntax "[" sepBy(term, ", ") "]" : term
It generates the names term_+_ and term[_,]
Equations
Instances For
Equations
Instances For
def
Lean.Elab.Command.addMacroScopeIfLocal
{m : Type → Type}
[MonadQuotation m]
[Monad m]
(name : Name)
(attrKind : Syntax)
:
m Name
Add macro scope to name if it does not already have them, and attrKind is local.
Equations
Instances For
Equations
Instances For
def
Lean.Elab.Command.inferMacroRulesAltKind :
TSyntax `Lean.Parser.Term.matchAlt → CommandElabM SyntaxNodeKind
Equations
Instances For
def
Lean.Elab.Command.expandNoKindMacroRulesAux
(alts : Array (TSyntax `Lean.Parser.Term.matchAlt))
(cmdName : String)
(mkCmd : Option Name → Array (TSyntax `Lean.Parser.Term.matchAlt) → CommandElabM Command)
:
Infer syntax kind k from first pattern, put alternatives of same kind into new macro/elab_rules (kind := k) via mkCmd (some k),
leave remaining alternatives (via mkCmd none) to be recursively expanded.