summaryrefslogtreecommitdiff
path: root/sources/scalac/typechecker/DeSugarize.java
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2003-11-18 12:04:17 +0000
committerMartin Odersky <odersky@gmail.com>2003-11-18 12:04:17 +0000
commit79dfd483ebf2d901d93e161436b515e075537dc1 (patch)
treecdf702e9ba556623f3595c0ed2d4df6d2158bba5 /sources/scalac/typechecker/DeSugarize.java
parent3ad58546502ae51ae7c7904f242ec568a6b77fb1 (diff)
downloadscala-79dfd483ebf2d901d93e161436b515e075537dc1.tar.gz
scala-79dfd483ebf2d901d93e161436b515e075537dc1.tar.bz2
scala-79dfd483ebf2d901d93e161436b515e075537dc1.zip
*** empty log message ***
Diffstat (limited to 'sources/scalac/typechecker/DeSugarize.java')
-rw-r--r--sources/scalac/typechecker/DeSugarize.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/sources/scalac/typechecker/DeSugarize.java b/sources/scalac/typechecker/DeSugarize.java
index 9f0a9a98c7..558549c0d9 100644
--- a/sources/scalac/typechecker/DeSugarize.java
+++ b/sources/scalac/typechecker/DeSugarize.java
@@ -50,14 +50,20 @@ public class DeSugarize implements Kinds, Modifiers {
/** the constructor
*/
- public DeSugarize(Analyzer analyzer, Global global) {
+ /** the constructor
+ */
+ public DeSugarize(TreeFactory make, TreeCopier copy, TreeGen gen,
+ Infer infer, Global global) {
this.global = global;
- this.make = analyzer.make;
- this.copy = analyzer.copy;
- this.gen = analyzer.gen;
- this.infer = analyzer.infer;
+ this.make = make;
+ this.copy = copy;
+ this.gen = gen;
+ this.infer = infer;
this.freshNameCreator = global.freshNameCreator;
}
+ public DeSugarize(Analyzer analyzer, Global global) {
+ this(analyzer.make, analyzer.copy, analyzer.gen, analyzer.infer, global);
+ }
// Auxiliary definitions and functions -------------------------------------------
@@ -180,7 +186,7 @@ public class DeSugarize implements Kinds, Modifiers {
vparam.tpe = gen.mkType(vparam.pos, pt);
}
- Tree isDefinedAtVisitor(Tree tree) {
+ public Tree isDefinedAtVisitor(Tree tree) {
switch (tree) {
case Visitor(CaseDef[] cases):
CaseDef lastCase = cases[cases.length - 1];
@@ -220,7 +226,7 @@ public class DeSugarize implements Kinds, Modifiers {
* match[targs] => this.match[targs]
* IMPORTANT: tree is already attributed and attributes need to be preserved.
*/
- Tree postMatch(Tree tree, Symbol currentclazz) {
+ public Tree postMatch(Tree tree, Symbol currentclazz) {
switch (tree) {
case Ident(Name name):
return
@@ -626,7 +632,7 @@ public class DeSugarize implements Kinds, Modifiers {
/** Build value element definition name for case parameter.
*/
- void addCaseElement(TreeList ts, ValDef vparam) {
+ public void addCaseElement(TreeList ts, ValDef vparam) {
//vparam.symbol().initialize();
ts.append(
make.ValDef(
@@ -637,7 +643,7 @@ public class DeSugarize implements Kinds, Modifiers {
/** add case constructor, value defintiions and access functions.
*/
- Tree[] addCaseElements(Tree[] body, ValDef[] vparams) {
+ public Tree[] addCaseElements(Tree[] body, ValDef[] vparams) {
TreeList stats = new TreeList();
for (int i = 0; i < vparams.length; i++) {
addCaseElement(stats, vparams[i]);