diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-01-29 19:06:56 +0300 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-14 14:19:44 +0100 |
commit | b5c4666be9b53a5d8e8d656a3aa597b3897a37c8 (patch) | |
tree | 69e3bcc2e7da99c28376793c6dea59e9b9d6246e /src/reflect/scala/reflect/api/Printers.scala | |
parent | 2c05f0139758613fbe26a5c03d60a9da29f2f5e5 (diff) | |
download | scala-b5c4666be9b53a5d8e8d656a3aa597b3897a37c8.tar.gz scala-b5c4666be9b53a5d8e8d656a3aa597b3897a37c8.tar.bz2 scala-b5c4666be9b53a5d8e8d656a3aa597b3897a37c8.zip |
SI-6931 cleans up the position API
I have finally overcome my fear of positions and got to cleaning up its
public interface.
Apparently it isn’t so bad, since there’s a sane core of methods (thanks
to whoever wrote the comments to internal#Position):
1) Checks to distinguish offsets, opaque ranges and transparent ranges
2) Essentials that inclide start, point, end and source
3) Factories that create new positions based on existing ones
It looks like methods from the 3rd group are exactly what we’ve been looking
for in SI-6931, so we have nothing to add in this commit.
Diffstat (limited to 'src/reflect/scala/reflect/api/Printers.scala')
-rw-r--r-- | src/reflect/scala/reflect/api/Printers.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/api/Printers.scala b/src/reflect/scala/reflect/api/Printers.scala index ae1ad30527..96e111f759 100644 --- a/src/reflect/scala/reflect/api/Printers.scala +++ b/src/reflect/scala/reflect/api/Printers.scala @@ -248,11 +248,21 @@ trait Printers { self: Universe => */ def show(flags: FlagSet): String + /** Renders a prettified representation of a position. + * @group Printers + */ + def show(position: Position): String + /** Renders internal structure of a flag set. * @group Printers */ def showRaw(flags: FlagSet): String = flags.toString + /** Renders internal structure of a position. + * @group Printers + */ + def showRaw(position: Position): String = position.toString + /** Renders a string that represents a declaration of this symbol written in Scala. * @group Printers */ |