Skip to content

Commit 3adacdf

Browse files
Gilles Dubochetadriaanm
Gilles Dubochet
authored andcommitted
Fixed a number of faulty Scaladoc comments in l...
Fixed a number of faulty Scaladoc comments in library and compiler sources. No review.
1 parent fcbe39a commit 3adacdf

File tree

7 files changed

+32
-33
lines changed

7 files changed

+32
-33
lines changed

src/library/scala/xml/Node.scala

+5-4
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,10 @@ abstract class Node extends NodeSeq {
213213
* Martin to Burak: to do: if you make this method abstract, the compiler will now
214214
* complain if there's no implementation in a subclass. Is this what we want? Note that
215215
* this would break doc/DocGenator and doc/ModelToXML, with an error message like:
216-
doc\DocGenerator.scala:1219: error: object creation impossible, since there is a deferred declaration of method text in class Node of type => String which is not implemented in a subclass
217-
new SpecialNode {
218-
^
219-
*/
216+
* {{{
217+
* doc\DocGenerator.scala:1219: error: object creation impossible, since there is a deferred declaration of method text in class Node of type => String which is not implemented in a subclass
218+
* new SpecialNode {
219+
* ^
220+
* }}} */
220221
override def text: String = super.text
221222
}

src/library/scala/xml/PrettyPrinter.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import Utility.sbToString
2323
* @version 1.0
2424
*
2525
* @param width the width to fit the output into
26-
* @step indentation
26+
* @param step indentation
2727
*/
2828
class PrettyPrinter(width: Int, step: Int) {
2929

src/library/scala/xml/Utility.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ object Utility extends AnyRef with parsing.TokenTests
8484

8585
object Escapes {
8686
/** For reasons unclear escape and unescape are a long ways from
87-
being logical inverses. */
87+
* being logical inverses. */
8888
val pairs = Map(
8989
"lt" -> '<',
9090
"gt" -> '>',

src/library/scala/xml/dtd/ElementValidator.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class ElementValidator() extends Function1[Node,Boolean] {
9595
}
9696

9797
/** check children, return true if conform to content model
98-
* @pre contentModel != null
98+
* @note contentModel != null
9999
*/
100100
def check(nodes: Seq[Node]): Boolean = contentModel match {
101101
case ANY => true
@@ -120,7 +120,7 @@ class ElementValidator() extends Function1[Node,Boolean] {
120120
}
121121

122122
/** applies various validations - accumulates error messages in exc
123-
* @todo: fail on first error, ignore other errors (rearranging conditions)
123+
* @todo fail on first error, ignore other errors (rearranging conditions)
124124
*/
125125
def apply(n: Node): Boolean =
126126
//- ? check children

src/library/scala/xml/include/XIncludeException.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class XIncludeException(message: String) extends Exception(message) {
4343
* This method allows you to store the original exception.
4444
*
4545
* @param nestedException the underlying exception which
46-
caused the XIncludeException to be thrown
46+
* caused the XIncludeException to be thrown
4747
*/
4848
def setRootCause(nestedException: Throwable ) {
4949
this.rootCause = nestedException

src/library/scala/xml/parsing/ConstructingParser.scala

+21-22
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,27 @@ object ConstructingParser {
2525
}
2626

2727
/** An xml parser. parses XML and invokes callback methods of a MarkupHandler.
28-
* Don't forget to call next.ch on a freshly instantiated parser in order to
29-
* initialize it. If you get the parser from the object method, initialization
30-
* is already done for you.
31-
*
32-
*<pre>
33-
object parseFromURL {
34-
def main(args:Array[String]): Unit = {
35-
val url = args(0);
36-
val src = scala.io.Source.fromURL(url);
37-
val cpa = scala.xml.parsing.ConstructingParser.fromSource(src, false); // fromSource initializes automatically
38-
val doc = cpa.document();
39-
40-
// let's see what it is
41-
val ppr = new scala.xml.PrettyPrinter(80,5);
42-
val ele = doc.docElem;
43-
Console.println("finished parsing");
44-
val out = ppr.format(ele);
45-
Console.println(out);
46-
}
47-
}
48-
</pre>
49-
*/
28+
* Don't forget to call next.ch on a freshly instantiated parser in order to
29+
* initialize it. If you get the parser from the object method, initialization
30+
* is already done for you.
31+
*
32+
* {{{
33+
* object parseFromURL {
34+
* def main(args:Array[String]): Unit = {
35+
* val url = args(0);
36+
* val src = scala.io.Source.fromURL(url);
37+
* val cpa = scala.xml.parsing.ConstructingParser.fromSource(src, false); // fromSource initializes automatically
38+
* val doc = cpa.document();
39+
*
40+
* // let's see what it is
41+
* val ppr = new scala.xml.PrettyPrinter(80,5);
42+
* val ele = doc.docElem;
43+
* Console.println("finished parsing");
44+
* val out = ppr.format(ele);
45+
* Console.println(out);
46+
* }
47+
* }
48+
* }}} */
5049
class ConstructingParser(val input: Source, val preserveWS: Boolean)
5150
extends ConstructingHandler
5251
with ExternalSources

src/library/scala/xml/parsing/MarkupParser.scala

+1-2
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,7 @@ trait MarkupParser extends MarkupParserCommon with TokenTests
719719
nextch
720720
}
721721

722-
/** "rec-xml/#ExtSubset" pe references may not occur within markup
723-
declarations
722+
/** "rec-xml/#ExtSubset" pe references may not occur within markup declarations
724723
*/
725724
def intSubset() {
726725
//Console.println("(DEBUG) intSubset()")

0 commit comments

Comments
 (0)