class CommentExpander

Port of DocComment.scala from nsc

Constructors

CommentExpander ( )

Members

[+] private val cookedDocComments : HashMap [ Symbol, String ]
[+] private val defs : Map [ Symbol, Map [ String, String ] ]

Maps symbols to the variable -> replacement maps that are defined in their doc comments

Maps symbols to the variable -> replacement maps that are defined in their doc comments

[+] private def allInheritedOverriddenSymbols ( sym: Symbol ) ( implicit ctx: Context ) : List [ Symbol ]

A version which doesn't consider self types, as a temporary measure: an infinite loop has broken out between superComment and cookedDocComment since r23...

A version which doesn't consider self types, as a temporary measure: an infinite loop has broken out between superComment and cookedDocComment since r23926.

[+] def cookedDocComment ( sym: Symbol , docStr: String ) ( implicit ctx: Context ) : String

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 ha...

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.

[+] def cookedDocComment$default$2 : String

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 ha...

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.

[+] def defineVariables ( sym: Symbol ) ( implicit ctx: Context ) : Unit
[+] private def defines ( raw: String ) : List [ String ]
[+] def docCommentPos ( sym: Symbol ) ( implicit ctx: Context ) : Position

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 d...

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.

[+] def expand ( sym: Symbol , site: Symbol ) ( implicit ctx: Context ) : String
[+] def expandInheritdoc ( parent: String , child: String , sym: Symbol ) : String

Expand inheritdoc tags - for the main comment we transform the inheritdoc into the super variable, and the variable expansion can expand it further - for...

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: 1. It takes longer to run compared to merge 2. The inheritdoc annotation should not be used very often, as building the comment from pieces severely impacts performance

[+] protected def expandVariables ( initialStr: String , sym: Symbol , site: Symbol ) ( implicit ctx: Context ) : String
[+] def expandedDocComment ( sym: Symbol , site: Symbol , docStr: String ) ( implicit ctx: Context ) : String

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.

[+] def expandedDocComment$default$3 : String

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.

[+] private def isMovable ( str: String , sec: ( Int, Int ) ) : Boolean
[+] def lookupVariable ( vble: String , site: Symbol ) ( implicit ctx: Context ) : Option [ String ]

Lookup definition of variable.

Lookup definition of variable.

[+] def merge ( src: String , dst: String , sym: Symbol , copyFirstPara: Boolean ) : String
[+] def merge$default$4 : Boolean
[+] private def replaceInheritDocToInheritdoc ( docStr: String ) : String
[+] protected def superComment ( sym: Symbol ) ( implicit ctx: Context ) : Option [ String ]

The cooked doc comment of an overridden symbol

The cooked doc comment of an overridden symbol

[+] private def template ( raw: String ) : String