summaryrefslogtreecommitdiff
path: root/sources/scalac/ast/TreeFactory.java
blob: 23c40a30049fbf1a866e7465e404bbabed12e238 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/*     ____ ____  ____ ____  ______                                     *\
**    / __// __ \/ __// __ \/ ____/    SOcos COmpiles Scala             **
**  __\_ \/ /_/ / /__/ /_/ /\_ \       (c) 2002, LAMP/EPFL              **
** /_____/\____/\___/\____/____/                                        **
**                                                                      **
** $Id$
\*                                                                      */

package scalac.ast;

import scalac.util.Name;
import Tree.*;

public interface TreeFactory {

    public Tree Bad(int pos);

    public Tree ClassDef(int pos,
                         int mods,
                         Name name,
                         TypeDef[] tparams,
                         ValDef[][] vparams,
			 Tree tpe,
                         Template impl);

    public Tree PackageDef(int pos,
                           Tree packaged,
                           Template impl);

    public Tree ModuleDef(int pos,
                          int mods,
                          Name name,
                          Tree tpe,
                          Template impl);

    public Tree ValDef(int pos,
                       int mods,
                       Name name,
                       Tree tpe,
                       Tree rhs);

    public Tree PatDef(int pos,
                       int mods,
                       Tree pat,
                       Tree rhs);

    public Tree DefDef(int pos,
                       int mods,
                       Name name,
                       TypeDef[] tparams,
                       ValDef[][] vparams,
                       Tree tpe,
                       Tree rhs);

    public Tree TypeDef(int pos,
                        int mods,
                        Name name,
                        Tree rhs);

    public Tree Import(int pos,
                       Tree expr,
		       Name[] selectors);

    public CaseDef CaseDef(int pos,
			   Tree pat,
			   Tree guard,
			   Tree body);

    public Template Template(int pos,
                             Tree[] baseClasses,
                             Tree[] body);

    public Tree LabelDef(int pos,
			 Tree[] params,
			 Tree rhs);

    public Tree Block(int pos,
                      Tree[] stats);

    public Tree Tuple(int pos,
                      Tree[] trees);

    public Tree Visitor(int pos,
                        CaseDef[] cases);

    public Tree Function(int pos,
                         ValDef[] vparams,
                         Tree body);

    public Tree Assign(int pos,
                       Tree lhs,
                       Tree rhs);

    public Tree If(int pos,
                   Tree cond,
                   Tree thenp,
                   Tree elsep);

    public Tree New(int pos,
                    Template templ);

    public Tree Typed(int pos,
                      Tree expr,
                      Tree tpe);

    public Tree TypeApply(int pos,
                          Tree fun,
                          Tree[] tparams);

    public Tree Apply(int pos,
                      Tree fun,
                      Tree[] vparam);

    public Tree Super(int pos,
                      Tree tpe);

    public Tree This(int pos,
		     Tree qualifier);

    public Tree Select(int pos,
                       Tree qualifier,
                       Name selector);

    public Tree Ident(int pos,
                      Name name);

    public Tree Literal(int pos,
                        Object value);

    public Tree TypeTerm(int pos);

    public Tree SingletonType(int pos,
			      Tree ref);

    public Tree SelectFromType(int pos,
			       Tree qualifier,
			       Name selector);

    public Tree FunType(int pos,
                        Tree[] argtpes,
                        Tree restpe);

    public Tree CompoundType(int pos,
                             Tree[] baseTypes,
                             Tree[] refinements);

    public Tree AppliedType(int pos,
                            Tree tpe,
                            Tree[] args);

    public Tree CovariantType(int pos,
			      Tree tpe);
}