CommentExpander
Port of DocComment.scala from nsc
Attributes
- Authors:
-
Martin Odersky
Felix Mulder
- Graph
-
- Supertypes
Members list
Type members
Classlikes
Attributes
- Supertypes
Value members
Concrete methods
The raw doc comment of symbol sym
, minus usecase and define sections, augmented by missing sections of an inherited doc comment. If a symbol does not have a doc comment but some overridden version of it does, the doc comment of the overridden version is copied instead.
The raw doc comment of symbol sym
, minus usecase and define sections, augmented by missing sections of an inherited doc comment. If a symbol does not have a doc comment but some overridden version of it does, the doc comment of the overridden version is copied instead.
Attributes
The position of the raw doc comment of symbol sym
, or NoPosition if missing If a symbol does not have a doc comment but some overridden version of it does, the position of the doc comment of the overridden version is returned instead.
The position of the raw doc comment of symbol sym
, or NoPosition if missing If a symbol does not have a doc comment but some overridden version of it does, the position of the doc comment of the overridden version is returned instead.
Attributes
Expand inheritdoc tags
Expand inheritdoc tags
- for the main comment we transform the inheritdoc into the super variable, and the variable expansion can expand it further
- for the param, tparam and throws sections we must replace comments on the spot
This is done separately, for two reasons:
- It takes longer to run compared to merge
- The inheritdoc annotation should not be used very often, as building the comment from pieces severely impacts performance
Value parameters
- child
-
The child (overriding member or usecase) comment
- parent
-
The source (or parent) comment
- sym
-
The child symbol
Attributes
- Returns
-
The child comment with the inheritdoc sections expanded
The cooked doc comment of symbol sym
after variable expansion, or "" if missing.
The cooked doc comment of symbol sym
after variable expansion, or "" if missing.
Value parameters
- site
-
The class for which doc comments are generated
- sym
-
The symbol for which doc comment is returned
Attributes
- Throws
-
ExpansionLimitExceeded
when more than 10 successive expansions of the same string are done, which is interpreted as a recursive variable definition.
Lookup definition of variable.
Lookup definition of variable.
Value parameters
- site
-
The class for which doc comments are generated
- vble
-
The variable for which a definition is searched