diff options
author | mihaylov <mihaylov@epfl.ch> | 2005-06-28 09:12:24 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2005-06-28 09:12:24 +0000 |
commit | 8e1c13bc2a76beab733d25265ab01758d2e9e015 (patch) | |
tree | 8587194cb1bab117e6a3b1de26c12d531529df17 | |
parent | 6d4bae44bf31be19bc7eb8c488e3fb3b75df9094 (diff) | |
download | scala-8e1c13bc2a76beab733d25265ab01758d2e9e015.tar.gz scala-8e1c13bc2a76beab733d25265ab01758d2e9e015.tar.bz2 scala-8e1c13bc2a76beab733d25265ab01758d2e9e015.zip |
Changed to print the new syntax for def parameters
-rw-r--r-- | sources/scala/tools/scaladoc/HTMLGenerator.java | 11 | ||||
-rw-r--r-- | sources/scala/tools/scaladoc/SymbolTablePrinter.java | 1 | ||||
-rw-r--r-- | sources/scalac/symtab/SymbolTablePrinter.java | 7 |
3 files changed, 6 insertions, 13 deletions
diff --git a/sources/scala/tools/scaladoc/HTMLGenerator.java b/sources/scala/tools/scaladoc/HTMLGenerator.java index 7e0c5f1c54..80a49184f4 100644 --- a/sources/scala/tools/scaladoc/HTMLGenerator.java +++ b/sources/scala/tools/scaladoc/HTMLGenerator.java @@ -1049,15 +1049,8 @@ public abstract class HTMLGenerator { symtab.print(']'); } // value parameters - Symbol[] vparams = symbol.valueParams(); - symtab.print('('); - for (int i = 0; i < vparams.length; i++) { - if (i > 0) symtab.print(", "); - if (vparams[i].isDefParameter()) symtab.print("def "); - symtab.defString(vparams[i], false); - } - symtab.print(')'); - } + symtab.printValueParams(symbol.valueParams()); + } // parents Type[] parts = (symbol.isModule() ? symbol.moduleClass() : symbol).parents(); diff --git a/sources/scala/tools/scaladoc/SymbolTablePrinter.java b/sources/scala/tools/scaladoc/SymbolTablePrinter.java index d2d64f7004..eb3c7991af 100644 --- a/sources/scala/tools/scaladoc/SymbolTablePrinter.java +++ b/sources/scala/tools/scaladoc/SymbolTablePrinter.java @@ -128,7 +128,6 @@ public abstract class MySymbolTablePrinter extends SymbolTablePrinter { print('('); for (int i = 0; i < vparams.length; i++) { if (i > 0) print(", "); - if (vparams[i].isDefParameter()) print("def "); defString(vparams[i], false); } return print(')'); diff --git a/sources/scalac/symtab/SymbolTablePrinter.java b/sources/scalac/symtab/SymbolTablePrinter.java index 3edf77f8a7..4626778a1d 100644 --- a/sources/scalac/symtab/SymbolTablePrinter.java +++ b/sources/scalac/symtab/SymbolTablePrinter.java @@ -311,7 +311,8 @@ public class SymbolTablePrinter { case Kinds.ALIAS: return "="; case Kinds.CLASS: return "extends"; case Kinds.TYPE : return "<:"; - case Kinds.VAL : return symbol.isModule() ? "extends" : ":"; + case Kinds.VAL : return symbol.isModule() ? "extends" : + symbol.isDefParameter() ? ": =>" : ":"; default : throw Debug.abort("unknown kind " + symbol.kind); } } @@ -383,8 +384,8 @@ public class SymbolTablePrinter { print('('); for (int i = 0; i < vparams.length; i++) { if (i > 0) print(","); - if (vparams[i].isDefParameter()) print("def "); - printSymbolType(vparams[i], null); + printSymbolType(vparams[i], + vparams[i].isDefParameter() ? "=>" : null); } return print(')'); } |