From 9577fff49c2e0ee6b26f813936d3fa23a2dee22a Mon Sep 17 00:00:00 2001 From: michelou Date: Tue, 19 Aug 2008 17:48:04 +0000 Subject: int -> Int, etc. --- src/manual/scala/tools/docutil/EmitHtml.scala | 18 ++++++++++-------- src/manual/scala/tools/docutil/EmitManPage.scala | 13 ++++++++----- 2 files changed, 18 insertions(+), 13 deletions(-) (limited to 'src/manual') diff --git a/src/manual/scala/tools/docutil/EmitHtml.scala b/src/manual/scala/tools/docutil/EmitHtml.scala index e5093c2296..629a8334b3 100644 --- a/src/manual/scala/tools/docutil/EmitHtml.scala +++ b/src/manual/scala/tools/docutil/EmitHtml.scala @@ -1,5 +1,5 @@ /* NSC -- new Scala compiler - * Copyright 2005-2007 LAMP/EPFL + * Copyright 2005-2008 LAMP/EPFL * @author Stephane Micheloud * Adapted from Lex Spoon's sbaz manual */ @@ -19,13 +19,13 @@ object EmitHtml { .replaceAll(">", ">") /* */ - def emitSection(section: Section, depth: int) { + def emitSection(section: Section, depth: Int) { def emitPara(text: AbstractText) { out.println("
") emitText(text) out.println("\n
") } - def emitText(text: AbstractText): Unit = + def emitText(text: AbstractText) { text match { case seq:SeqText => seq.components.foreach(emitText) @@ -90,8 +90,9 @@ object EmitHtml { case _ => error("unknown text node: " + text) } + } - def emitParagraph(para: Paragraph): Unit = + def emitParagraph(para: Paragraph) { para match { case TextParagraph(text) => out.println("

") @@ -135,6 +136,7 @@ object EmitHtml { case _ => error("unknown paragraph node: " + para) } + } val name = section.title.replaceAll("\\p{Space}", "_").toLowerCase() out.println("\n" + @@ -143,7 +145,7 @@ object EmitHtml { section.paragraphs.foreach(emitParagraph) } - private def emit3columns(col1: String, col2: String, col3: String) = { + private def emit3columns(col1: String, col2: String, col3: String) { out.println("

") out.println(col1) out.println("
") @@ -155,21 +157,21 @@ object EmitHtml { out.println("") } - private def emitHeader(col1: String, col2: String, col3: String) = { + private def emitHeader(col1: String, col2: String, col3: String) { out.println("") out.println("
") emit3columns(col1, col2, col3) out.println("
") } - private def emitFooter(col1: String, col2: String, col3: String) = { + private def emitFooter(col1: String, col2: String, col3: String) { out.println("") out.println("
") emit3columns(col1, col2, col3) out.println("
") } - def emitDocument(document: Document) = { + def emitDocument(document: Document) { out.println("") out.println("") out.println("\n") diff --git a/src/manual/scala/tools/docutil/EmitManPage.scala b/src/manual/scala/tools/docutil/EmitManPage.scala index f76d6248de..32bffed949 100644 --- a/src/manual/scala/tools/docutil/EmitManPage.scala +++ b/src/manual/scala/tools/docutil/EmitManPage.scala @@ -1,5 +1,5 @@ /* NSC -- new Scala compiler - * Copyright 2005-2007 LAMP/EPFL + * Copyright 2005-2008 LAMP/EPFL * @author Stephane Micheloud * Adapted from Lex Spoon's sbaz manual */ @@ -19,12 +19,12 @@ object EmitManPage { def escape(text: String) = text.replaceAll("-", "\\-") - def emitSection(section: Section, depth: int) { + def emitSection(section: Section, depth: Int) { def emitPara(text: AbstractText) { emitText(text) out.println("\n.IP") } - def emitText(text: AbstractText): Unit = + def emitText(text: AbstractText) { text match { case seq:SeqText => seq.components.foreach(emitText) @@ -82,8 +82,9 @@ object EmitManPage { case _ => error("unknown text node: " + text) } + } - def emitParagraph(para: Paragraph): Unit = + def emitParagraph(para: Paragraph) { para match { case TextParagraph(text) => out.println(".PP") @@ -130,6 +131,7 @@ object EmitManPage { case _ => error("unknown paragraph node: " + para) } + } out.println(".\\\"") out.println(".\\\" ############################## " + section.title + " ###############################") @@ -162,7 +164,7 @@ object EmitManPage { doc.sections.foreach(s => emitSection(s, 1)) } - def main(args: Array[String]) = + def main(args: Array[String]) { try { val cl = this.getClass.getClassLoader() val clasz = cl.loadClass(args(0)) @@ -175,6 +177,7 @@ object EmitManPage { System.err.println("Error in EmitManPage") exit(1) } + } def emitManPage(classname: String, outStream: java.io.OutputStream) { out.setOut(outStream) -- cgit v1.2.3