aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Contexts.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-04-19 14:38:08 +0200
committerMartin Odersky <odersky@gmail.com>2013-04-19 14:40:23 +0200
commit344450ffcde551af8406fa1b873a6cb9dd430eb0 (patch)
tree81ff8fa3b076cb9f529124f340878f23ab05739f /src/dotty/tools/dotc/core/Contexts.scala
parent570282cfdb1da8098036a9974198ca65b8740c66 (diff)
downloaddotty-344450ffcde551af8406fa1b873a6cb9dd430eb0.tar.gz
dotty-344450ffcde551af8406fa1b873a6cb9dd430eb0.tar.bz2
dotty-344450ffcde551af8406fa1b873a6cb9dd430eb0.zip
Added some predefined methods in Definitions.
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r--src/dotty/tools/dotc/core/Contexts.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala
index 15f1e80c5..2838f1c7f 100644
--- a/src/dotty/tools/dotc/core/Contexts.scala
+++ b/src/dotty/tools/dotc/core/Contexts.scala
@@ -290,7 +290,10 @@ object Contexts {
val platform: Platform = new JavaPlatform
/** The standard fresh name creator */
- val fresh = new FreshNameCreator.Default
+ val freshNames = new FreshNameCreator.Default
+
+ def freshName(): String = freshNames.newName()
+ def freshName(prefix: String): String = freshNames.newName(prefix)
/** The loader that loads the members of _root_ */
def rootLoader(root: TermSymbol)(implicit ctx: Context): SymbolLoader = platform.rootLoader(root)