非关联中缀运算符使用 Lean.Parser.Command.mixfix : commandinfix 定义:
command ::= ... |docComment? attributes?A `docComment` parses a "documentation comment" like `/-- foo -/`. This is not treated like a regular comment (that is, as whitespace); it is parsed and forms part of the syntax tree structure. At parse time, `docComment` checks the value of the `doc.verso` option. If it is true, the contents are parsed as Verso markup. If not, the contents are treated as plain text or Markdown. Use `plainDocComment` to always treat the contents as plain text. A plain text doc comment node contains a `/--` atom and then the remainder of the comment, `foo -/` in this example. Use `TSyntax.getDocString` to extract the body text from a doc string syntax node. A Verso comment node contains the `/--` atom, the document's syntax tree, and a closing `-/` atom.attrKind`attrKind` matches `("scoped" <|> "local")?`, used before an attribute like `@[local simp]`.infix:prec ((name := ident))? ((priority := prio))? str => term`infix:prec "op" => f` is equivalent to `notation:prec x:prec1 "op" y:prec1 => f x y`, where `prec1 := prec + 1`.
左关联中缀运算符使用 Lean.Parser.Command.mixfix : commandinfixl 定义:
command ::= ... |docComment? attributes?A `docComment` parses a "documentation comment" like `/-- foo -/`. This is not treated like a regular comment (that is, as whitespace); it is parsed and forms part of the syntax tree structure. At parse time, `docComment` checks the value of the `doc.verso` option. If it is true, the contents are parsed as Verso markup. If not, the contents are treated as plain text or Markdown. Use `plainDocComment` to always treat the contents as plain text. A plain text doc comment node contains a `/--` atom and then the remainder of the comment, `foo -/` in this example. Use `TSyntax.getDocString` to extract the body text from a doc string syntax node. A Verso comment node contains the `/--` atom, the document's syntax tree, and a closing `-/` atom.attrKind`attrKind` matches `("scoped" <|> "local")?`, used before an attribute like `@[local simp]`.infixl:prec ((name := ident))? ((priority := prio))? str => term`infixl:prec "op" => f` is equivalent to `notation:prec x:prec "op" y:prec1 => f x y`, where `prec1 := prec + 1`.
右关联中缀运算符使用 Lean.Parser.Command.mixfix : commandinfixr 定义:
command ::= ... |docComment? attributes?A `docComment` parses a "documentation comment" like `/-- foo -/`. This is not treated like a regular comment (that is, as whitespace); it is parsed and forms part of the syntax tree structure. At parse time, `docComment` checks the value of the `doc.verso` option. If it is true, the contents are parsed as Verso markup. If not, the contents are treated as plain text or Markdown. Use `plainDocComment` to always treat the contents as plain text. A plain text doc comment node contains a `/--` atom and then the remainder of the comment, `foo -/` in this example. Use `TSyntax.getDocString` to extract the body text from a doc string syntax node. A Verso comment node contains the `/--` atom, the document's syntax tree, and a closing `-/` atom.attrKind`attrKind` matches `("scoped" <|> "local")?`, used before an attribute like `@[local simp]`.infixr:prec ((name := ident))? ((priority := prio))? str => term`infixr:prec "op" => f` is equivalent to `notation:prec x:prec1 "op" y:prec => f x y`, where `prec1 := prec + 1`.
前缀运算符使用 Lean.Parser.Command.mixfix : commandprefix 定义:
command ::= ... |docComment? attributes?A `docComment` parses a "documentation comment" like `/-- foo -/`. This is not treated like a regular comment (that is, as whitespace); it is parsed and forms part of the syntax tree structure. At parse time, `docComment` checks the value of the `doc.verso` option. If it is true, the contents are parsed as Verso markup. If not, the contents are treated as plain text or Markdown. Use `plainDocComment` to always treat the contents as plain text. A plain text doc comment node contains a `/--` atom and then the remainder of the comment, `foo -/` in this example. Use `TSyntax.getDocString` to extract the body text from a doc string syntax node. A Verso comment node contains the `/--` atom, the document's syntax tree, and a closing `-/` atom.attrKind`attrKind` matches `("scoped" <|> "local")?`, used before an attribute like `@[local simp]`.prefix:prec ((name := ident))? ((priority := prio))? str => term`prefix:prec "op" => f` is equivalent to `notation:prec "op" x:prec => f x`.
后缀运算符使用 Lean.Parser.Command.mixfix : commandpostfix 定义:
command ::= ... |docComment? attributes?A `docComment` parses a "documentation comment" like `/-- foo -/`. This is not treated like a regular comment (that is, as whitespace); it is parsed and forms part of the syntax tree structure. At parse time, `docComment` checks the value of the `doc.verso` option. If it is true, the contents are parsed as Verso markup. If not, the contents are treated as plain text or Markdown. Use `plainDocComment` to always treat the contents as plain text. A plain text doc comment node contains a `/--` atom and then the remainder of the comment, `foo -/` in this example. Use `TSyntax.getDocString` to extract the body text from a doc string syntax node. A Verso comment node contains the `/--` atom, the document's syntax tree, and a closing `-/` atom.attrKind`attrKind` matches `("scoped" <|> "local")?`, used before an attribute like `@[local simp]`.postfix:prec ((name := ident))? ((priority := prio))? str => term`postfix:prec "op" => f` is equivalent to `notation:prec x:prec "op" => f x`.