diff options
author | Martin Odersky <odersky@gmail.com> | 2003-04-02 07:32:39 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-04-02 07:32:39 +0000 |
commit | f115eda9c9bc97313591ca699e07fa2a117cc997 (patch) | |
tree | e9040aad58088217db6b3a4c950bd6c257c89cb5 /sources/scalac/ast/TreeGen.java | |
parent | d8284d61f2f09a72f223c6e9396eec8fa5893d29 (diff) | |
download | scala-f115eda9c9bc97313591ca699e07fa2a117cc997.tar.gz scala-f115eda9c9bc97313591ca699e07fa2a117cc997.tar.bz2 scala-f115eda9c9bc97313591ca699e07fa2a117cc997.zip |
*** empty log message ***
Diffstat (limited to 'sources/scalac/ast/TreeGen.java')
-rw-r--r-- | sources/scalac/ast/TreeGen.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java index 18275af3a7..864609e7f8 100644 --- a/sources/scalac/ast/TreeGen.java +++ b/sources/scalac/ast/TreeGen.java @@ -56,7 +56,7 @@ public class TreeGen implements Kinds, Modifiers { /*************************************************************************/ /** METHODS **/ - private Type deref(Type tp) { + public Type deref(Type tp) { switch (tp) { case PolyType(Symbol[] tparams, Type restp): if (tparams.length == 0) return restp; @@ -160,7 +160,7 @@ public class TreeGen implements Kinds, Modifiers { /** Build a boolean constant tree. */ - public Tree mkBoolean(int pos, boolean bool) { + public Tree mkBooleanLit(int pos, boolean bool) { return make.Literal(pos, bool ? Boolean.TRUE : Boolean.FALSE). setType(definitions.BOOLEAN_TYPE); } @@ -171,6 +171,12 @@ public class TreeGen implements Kinds, Modifiers { return make.Literal(pos, str).setType(definitions.JAVA_STRING_TYPE); } + /** Build an integer literal + */ + public Tree mkIntLit(int pos, int value) { + return make.Literal(pos, new Integer(value)).setType(definitions.INT_TYPE); + } + /** Build a tree to be used as a base class constructor for a template. */ public Tree mkParentConstr(int pos, Type parentType) { |