diff options
author | michelou <michelou@epfl.ch> | 2007-04-19 15:45:58 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-04-19 15:45:58 +0000 |
commit | a87d9a20e00c4951b774976ef2350d11be764b3d (patch) | |
tree | f92af868f6e5c67210646a72eb7b9f688ab0f0ab /src/compiler/scala/tools/nsc/MainTokenMetric.scala | |
parent | 28edfc11090d9075200dcdd47227b4f067284f9a (diff) | |
download | scala-a87d9a20e00c4951b774976ef2350d11be764b3d.tar.gz scala-a87d9a20e00c4951b774976ef2350d11be764b3d.tar.bz2 scala-a87d9a20e00c4951b774976ef2350d11be764b3d.zip |
updated for-comprehension syntax
Diffstat (limited to 'src/compiler/scala/tools/nsc/MainTokenMetric.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/MainTokenMetric.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/MainTokenMetric.scala b/src/compiler/scala/tools/nsc/MainTokenMetric.scala index 05b0f3c33c..1f1632fd48 100644 --- a/src/compiler/scala/tools/nsc/MainTokenMetric.scala +++ b/src/compiler/scala/tools/nsc/MainTokenMetric.scala @@ -1,5 +1,5 @@ /* NSC -- new Scala compiler - * Copyright 2005-2006 LAMP/EPFL + * Copyright 2005-2007 LAMP/EPFL * @author Martin Odersky */ // $Id$ @@ -16,20 +16,20 @@ object MainTokenMetric { private var reporter: ConsoleReporter = _ - def tokenMetric(compiler: Global, fnames: List[String]): unit = { + private def tokenMetric(compiler: Global, fnames: List[String]) { import compiler.CompilationUnit import compiler.syntaxAnalyzer.UnitScanner import ast.parser.Tokens.EOF var totale = 0 - for (val source <- fnames) { + for (source <- fnames) { val s = new UnitScanner(new CompilationUnit(compiler.getSourceFile(source))) var i = 0 while(s.token != EOF) { - i = i + 1 + i += 1 s.nextToken } var j = 0 ; while(j + log(i) / log(10) < 7) { - j = j+1 + j += 1 Console.print(' ') } Console.print(i.toString()) |