summaryrefslogtreecommitdiff
path: root/sources/scalac/ast
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2003-03-04 12:10:52 +0000
committerMartin Odersky <odersky@gmail.com>2003-03-04 12:10:52 +0000
commit91c9a415e380539da3c6acabda2cf70afbf2cc47 (patch)
treeaff5d4ff5c546d3f5228cd1bd6b1151211a7ae07 /sources/scalac/ast
parentfc497536ed884b4d18860f6db644d4143412c2f5 (diff)
downloadscala-91c9a415e380539da3c6acabda2cf70afbf2cc47.tar.gz
scala-91c9a415e380539da3c6acabda2cf70afbf2cc47.tar.bz2
scala-91c9a415e380539da3c6acabda2cf70afbf2cc47.zip
*** empty log message ***
Diffstat (limited to 'sources/scalac/ast')
-rw-r--r--sources/scalac/ast/TreeGen.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java
index 4154710822..29bb0d6d8a 100644
--- a/sources/scalac/ast/TreeGen.java
+++ b/sources/scalac/ast/TreeGen.java
@@ -70,6 +70,10 @@ public class TreeGen implements Kinds, Modifiers {
return Select(pos, mkStableId(pos, pre), sym);
}
+ public Tree mkRef(int pos, Symbol sym) {
+ return mkRef(pos, sym.owner().thisType(), sym);
+ }
+
/** Build and attribute stable identifier tree corresponding to given prefix.
*/
public Tree mkStableId(int pos, Type pre) {
@@ -131,6 +135,12 @@ public class TreeGen implements Kinds, Modifiers {
return res;
}
+ /** Build a boolean constant tree.
+ */
+ public Tree mkBoolean(int pos, boolean bool) {
+ return mkRef(pos, bool ? definitions.TRUE() : definitions.FALSE());
+ }
+
/** Build a tree to be used as a base class constructor for a template.
*/
public Tree mkParentConstr(int pos, Type parentType) {