diff options
author | Martin Odersky <odersky@gmail.com> | 2011-09-30 16:48:22 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2011-09-30 16:48:22 +0000 |
commit | ff5619e1f0d1653642e93e2c6a051c88231c95fb (patch) | |
tree | 82befcb75bd802e5cf7fb2a7e3598d39c5e4c67b /src/library | |
parent | b939e8fbaba0bcbf3fc92bd8e915e2641b7e4ddf (diff) | |
download | scala-ff5619e1f0d1653642e93e2c6a051c88231c95fb.tar.gz scala-ff5619e1f0d1653642e93e2c6a051c88231c95fb.tar.bz2 scala-ff5619e1f0d1653642e93e2c6a051c88231c95fb.zip |
Cleanups involving name encoding and decoding.
Diffstat (limited to 'src/library')
-rwxr-xr-x | src/library/scala/reflect/api/Names.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/library/scala/reflect/api/Names.scala b/src/library/scala/reflect/api/Names.scala index 0ba5ad28f0..e226d2265a 100755 --- a/src/library/scala/reflect/api/Names.scala +++ b/src/library/scala/reflect/api/Names.scala @@ -12,6 +12,16 @@ trait Names { def isTypeName: Boolean def toTermName: TermName def toTypeName: TypeName + + /** Replace all occurrences of $op_names in this name by corresponding operator symbols. + * Example: `foo_+=` becomes `foo_$plus$eq`. + */ + def decode: String + + /** Replace all occurrences of operator symbols in this name by corresponding $op_names. + * Example: `foo_$plus$eq` becomes `foo_+=` + */ + def encode: Name } def newTermName(s: String): TermName |