Documentation

Lean.Elab.Syntax

Expand optional «precedence» where «precedence» := leading_parser " : " >> precedenceParser

Equations
Instances For
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        (Try to) add a term info for the category catName at ref.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          (Try to) add a term info for the alias with info info at ref.

          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
                Equations
                • One or more equations did not get rendered due to their size.
                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
                  • 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

                        Like adaptExpander, for commands that define rules for a syntax kind, such as macro_rules: exp also returns that kind, if known. If it is deprecated, the expansion does not report deprecated constants and syntax: as with the body of a deprecated declaration, the references go away along with the rules.

                        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

                            Elaborates the given syntax command and returns the new node kind.

                            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.
                                  Instances For
                                    def Lean.Elab.Command.checkRuleAltKind (cmdName : String) (k : SyntaxNodeKind) (alt : TSyntax `Lean.Parser.Term.matchAlt) :
                                    CommandElabM (TSyntax `Lean.Parser.Term.matchAlt)

                                    Checks that the quotation pattern of alt matches syntax of kind k, selecting the interpretation of kind k if the pattern is ambiguous. cmdName is used in error messages.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    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.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For