diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/Eval.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/Eval.scala | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/Eval.scala b/src/compiler/scala/tools/nsc/interpreter/Eval.scala new file mode 100644 index 0000000000..6a59cbb6bf --- /dev/null +++ b/src/compiler/scala/tools/nsc/interpreter/Eval.scala @@ -0,0 +1,33 @@ +/* NSC -- new Scala compiler + * Copyright 2005-2011 LAMP/EPFL + * @author Paul Phillips + */ + +package scala.tools.nsc +package interpreter + +trait Eval { + /** Executes code looking for an implicit conversion from the type + * of the given identifier to CompletionAware. + */ + // def completionAwareImplicit[T](id: String) = { + // val f1string = "%s => %s".format(typeForIdent(id).get, classOf[CompletionAware].getName) + // val code = """{ + // | def f(implicit x: (%s) = null): %s = x + // | val f1 = f + // | if (f1 == null) None else Some(f1(%s)) + // |}""".stripMargin.format(f1string, f1string, id) + // + // evalExpr[Option[CompletionAware]](code) + // } + + // Coming soon + // implicit def string2liftedcode(s: String): LiftedCode = new LiftedCode(s) + // case class LiftedCode(code: String) { + // val lifted: String = { + // beQuietDuring { interpret(code) } + // eval2[String]("({ " + code + " }).toString") + // } + // def >> : String = lifted + // } +}
\ No newline at end of file |