src/Pure/Tools/update_comments.scala
changeset 67435 f83c1842a559
parent 67433 e0c0c1f0e3e7
child 67436 e446505a4ec6
equal deleted inserted replaced
67434:a38c74b0886d 67435:f83c1842a559
    18     {
    18     {
    19       toks match {
    19       toks match {
    20         case tok :: rest if tok.source == "--" || tok.source == Symbol.comment =>
    20         case tok :: rest if tok.source == "--" || tok.source == Symbol.comment =>
    21           rest.dropWhile(_.is_space) match {
    21           rest.dropWhile(_.is_space) match {
    22             case tok1 :: rest1 if tok1.is_text =>
    22             case tok1 :: rest1 if tok1.is_text =>
    23               val res = Symbol.comment + Symbol.space + Library.cartouche(tok1.content)
    23               val txt = Symbol.trim_blanks(tok1.content)
    24               update(rest1, res :: result)
    24               update(rest1, (Symbol.comment + Symbol.space + Library.cartouche(txt)) :: result)
    25             case _ => update(rest, tok.source :: result)
    25             case _ => update(rest, tok.source :: result)
    26           }
    26           }
    27         case tok :: rest => update(rest, tok.source :: result)
    27         case tok :: rest => update(rest, tok.source :: result)
    28         case Nil => result.reverse.mkString
    28         case Nil => result.reverse.mkString
    29       }
    29       }