summaryrefslogtreecommitdiff
path: root/sources/scalac/atree
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-11-05 18:37:17 +0000
committerpaltherr <paltherr@epfl.ch>2003-11-05 18:37:17 +0000
commitc2d445c46a817d266ef54478c1694d6e8a1fe2e7 (patch)
tree3e763157f79bb9b3d16b0e43118456aa27557a76 /sources/scalac/atree
parentea5ed7d4b2aa151cdd5b3becb969889e9dcdc050 (diff)
downloadscala-c2d445c46a817d266ef54478c1694d6e8a1fe2e7.tar.gz
scala-c2d445c46a817d266ef54478c1694d6e8a1fe2e7.tar.bz2
scala-c2d445c46a817d266ef54478c1694d6e8a1fe2e7.zip
- Added case AFunction.NewArray
- Fixed AInvokeStyle typos in ATreePrinter
Diffstat (limited to 'sources/scalac/atree')
-rw-r--r--sources/scalac/atree/AFunction.java2
-rw-r--r--sources/scalac/atree/ATreePrinter.java12
2 files changed, 9 insertions, 5 deletions
diff --git a/sources/scalac/atree/AFunction.java b/sources/scalac/atree/AFunction.java
index ed5a4c5fba..2970222a2c 100644
--- a/sources/scalac/atree/AFunction.java
+++ b/sources/scalac/atree/AFunction.java
@@ -8,6 +8,7 @@
package scalac.atree;
+import scalac.symtab.Type;
import scalac.symtab.Symbol;
/** This class represents an attributed function reference. */
@@ -18,6 +19,7 @@ public class AFunction {
public case Method(ACode object, Symbol method, AInvokeStyle style);
public case Primitive(APrimitive primitive);
+ public case NewArray(Type element);
//########################################################################
// Public Methods
diff --git a/sources/scalac/atree/ATreePrinter.java b/sources/scalac/atree/ATreePrinter.java
index 783af97c8d..7caa05952b 100644
--- a/sources/scalac/atree/ATreePrinter.java
+++ b/sources/scalac/atree/ATreePrinter.java
@@ -443,19 +443,21 @@ public class ATreePrinter {
/** Prints the function. */
public ATreePrinter printFunction(AFunction function) {
switch (function) {
- case Method(Void, Symbol method, InvokeStyle.New):
+ case Method(Void, Symbol method, AInvokeStyle.New):
return print("new").space().printSymbol(method);
- case Method(Void, Symbol method, InvokeStyle.Static):
+ case Method(Void, Symbol method, AInvokeStyle.Static):
return printSymbol(method.owner()).print('.').printSymbol(method);
- case Method(This(Symbol clasz), Symbol method, InvokeStyle.Static):
+ case Method(This(Symbol clasz), Symbol method, AInvokeStyle.Static):
printSymbol(clasz).print('.').print("super").print('.');
return printSymbol(method);
- case Method(ACode object, Symbol method, InvokeStyle style):
+ case Method(ACode object, Symbol method, AInvokeStyle style):
printCode(object).print('.');
- if (style != InvokeStyle.Dynamic) print("<" + style + ">").space();
+ if (style != AInvokeStyle.Dynamic) print("<" +style+ ">").space();
return printSymbol(method);
case Primitive(APrimitive primitive):
return printPrimitive(primitive);
+ case NewArray(Type element):
+ return print("new").space().printType(element).print("[]");
default:
throw Debug.abort("unknown case", function);
}