summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/interpreter/ExprTyper.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-11-13 00:14:40 -0800
committerPaul Phillips <paulp@improving.org>2012-11-19 11:55:06 -0800
commitd5e3f85946af966111f88af90a666a709df0ba6f (patch)
treeedb2d3cfae76679bc0311f3c22d01779a2f32ef3 /src/compiler/scala/tools/nsc/interpreter/ExprTyper.scala
parent645c2676dd6699ac24a57dfe750386bbdb827ee8 (diff)
downloadscala-d5e3f85946af966111f88af90a666a709df0ba6f.tar.gz
scala-d5e3f85946af966111f88af90a666a709df0ba6f.tar.bz2
scala-d5e3f85946af966111f88af90a666a709df0ba6f.zip
Revert "Commenting out unused members."
This reverts commit 951fc3a486.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/ExprTyper.scala')
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/ExprTyper.scala9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/ExprTyper.scala b/src/compiler/scala/tools/nsc/interpreter/ExprTyper.scala
index fbd0d15962..ebd0030802 100644
--- a/src/compiler/scala/tools/nsc/interpreter/ExprTyper.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/ExprTyper.scala
@@ -17,8 +17,7 @@ trait ExprTyper {
import syntaxAnalyzer.UnitParser
import naming.freshInternalVarName
- object codeParser {
- val global: repl.global.type = repl.global
+ object codeParser extends { val global: repl.global.type = repl.global } with CodeHandlers[Tree] {
def applyRule[T](code: String, rule: UnitParser => T): T = {
reporter.reset()
val scanner = newUnitParser(code)
@@ -30,10 +29,10 @@ trait ExprTyper {
result
}
- // def defns(code: String) = stmts(code) collect { case x: DefTree => x }
- // def expr(code: String) = applyRule(code, _.expr())
+ def defns(code: String) = stmts(code) collect { case x: DefTree => x }
+ def expr(code: String) = applyRule(code, _.expr())
def stmts(code: String) = applyRule(code, _.templateStats())
- // def stmt(code: String) = stmts(code).last // guaranteed nonempty
+ def stmt(code: String) = stmts(code).last // guaranteed nonempty
}
/** Parse a line into a sequence of trees. Returns None if the input is incomplete. */