summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-31 05:08:07 +0000
committerPaul Phillips <paulp@improving.org>2011-05-31 05:08:07 +0000
commit35f7c2bde563b501e9661aace1e1610990b51544 (patch)
tree8edd9b4f4fdbae46112f0d848230db2e49f7d55c /src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala
parent82eaeed3b1bf3d4e9a6b4c4dedfeed0e603e56e7 (diff)
downloadscala-35f7c2bde563b501e9661aace1e1610990b51544.tar.gz
scala-35f7c2bde563b501e9661aace1e1610990b51544.tar.bz2
scala-35f7c2bde563b501e9661aace1e1610990b51544.zip
Moved some pure string manipulation functions o...
Moved some pure string manipulation functions out of the base class for all Reporters and into a more suitable home. "Please, help stamp out inheritance abuse. If you won't do it for yourself do it for your children... or your subclass's children." Also removed some dead reporter code (not used anywhere, including the IDE.) No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala b/src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala
index 88b998f1ac..b5ec0ceffb 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala
@@ -21,12 +21,15 @@ abstract class SyntaxAnalyzer extends SubComponent with Parsers with MarkupParse
override val keepsTypeParams = false
def apply(unit: global.CompilationUnit) {
- global.informProgress("parsing " + unit)
+ import global._
+ informProgress("parsing " + unit)
unit.body =
if (unit.source.file.name.endsWith(".java")) new JavaUnitParser(unit).parse()
- else if (!global.reporter.incompleteHandled) new UnitParser(unit).smartParse()
- else new UnitParser(unit).parse()
- if (global.settings.Yrangepos.value && !global.reporter.hasErrors) global.validatePositions(unit.body)
+ else if (reporter.incompleteHandled) new UnitParser(unit).parse()
+ else new UnitParser(unit).smartParse()
+
+ if (settings.Yrangepos.value && !reporter.hasErrors)
+ validatePositions(unit.body)
}
}
}