summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2007-01-23 15:34:40 +0000
committerLex Spoon <lex@lexspoon.org>2007-01-23 15:34:40 +0000
commit8acb41bd0a4dc1a6a6e6c20f48cb1c508470551a (patch)
treea65ac192ef81ab0e068e4891654511d5f0ff4982 /src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala
parent76d0d7ad84a236a5b2fb52e83af158b25b817a85 (diff)
downloadscala-8acb41bd0a4dc1a6a6e6c20f48cb1c508470551a.tar.gz
scala-8acb41bd0a4dc1a6a6e6c20f48cb1c508470551a.tar.bz2
scala-8acb41bd0a4dc1a6a6e6c20f48cb1c508470551a.zip
- Added default constructors for Settings and G...
- Added default constructors for Settings and Global - Added attributed types, if -Xplugtypes is available. This enables non-LAMP people to experiment with type attributes. (This is a merge from the plugtypes branch, revision 9679) The attributes are ignored for now, even with -Xplugtypes, but do get propagated.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala
index ccbc9dd764..ce17c7f1ee 100644
--- a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala
@@ -353,6 +353,9 @@ abstract class TreeBrowsers {
case TypeTree() =>
Pair("TypeTree", EMPTY)
+ case AttributedTypeTree(attribs, tpt) =>
+ Pair("AttributedTypeTree", EMPTY)
+
case SingletonTypeTree(ref) =>
Pair("SingletonType", EMPTY)
@@ -494,6 +497,9 @@ abstract class TreeBrowsers {
case TypeTree() =>
Nil
+ case AttributedTypeTree(attribs, tpt) =>
+ attribs ::: List(tpt)
+
case SingletonTypeTree(ref) =>
List(ref)
@@ -645,6 +651,13 @@ abstract class TreeBrowsers {
toDocument(result) :: ")")
)
+ case AttributedType(attribs, tp) =>
+ Document.group(
+ Document.nest(4, "AttributedType(" :/:
+ attribs.mkString("[", ",", "]") :/:
+ "," :/: toDocument(tp) :: ")")
+ )
+
case _ =>
abort("Unknown case: " + t.toString())
}