修饰符按如下顺序出现,且均为可选:
-
文档注释;
-
属性列表;
-
noncomputable关键字,将定义排除在编译之外; -
unsafe关键字; -
递归修饰符
partial或nonrec,分别禁用终止性证明或完全禁止递归。
declModifiers ::=`declModifiers` 是声明修饰符的集合,包括: * 文档注释 `/-- ... -/` * 属性列表 `@[attr1, attr2]` * 可见性说明符 `private` 或 `public` * `protected` * `noncomputable` * `unsafe` * `partial` 或 `nonrec` 所有修饰符都是可选的,并且必须按上述顺序出现。 `nestedDeclModifiers` 与 `declModifiers` 相同,但属性与声明打印在同一行;它用于嵌套在其他语法中的声明,例如结构体字段。docComment? attributes? visibility? noncomputable? unsafe? (partial | nonrec)?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.