diff options
author | paltherr <paltherr@epfl.ch> | 2003-04-14 15:51:50 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-04-14 15:51:50 +0000 |
commit | 217d42413b0d649ebabe40ac0cb43ec961727bf2 (patch) | |
tree | cc07b4b5f8eca1e123b379b3ac8fe598eecdd45d /sources/meta/scalac/ast/MetaTraverser.java | |
parent | 79c7c73561244fb170a51c832631e6526b277a7a (diff) | |
download | scala-217d42413b0d649ebabe40ac0cb43ec961727bf2.tar.gz scala-217d42413b0d649ebabe40ac0cb43ec961727bf2.tar.bz2 scala-217d42413b0d649ebabe40ac0cb43ec961727bf2.zip |
- Added MetaLazyTreeCopier.java
- Added MetaStrictTreeCopier.java
- Added MetaTransformer.java
- Added MetaTraverser.java
- Added MetaTree.java
- Added MetaTreeCopier.java
Diffstat (limited to 'sources/meta/scalac/ast/MetaTraverser.java')
-rw-r--r-- | sources/meta/scalac/ast/MetaTraverser.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sources/meta/scalac/ast/MetaTraverser.java b/sources/meta/scalac/ast/MetaTraverser.java new file mode 100644 index 0000000000..4e00b924c9 --- /dev/null +++ b/sources/meta/scalac/ast/MetaTraverser.java @@ -0,0 +1,25 @@ +/* ____ ____ ____ ____ ______ *\ +** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala ** +** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL ** +** /_____/\____/\___/\____/____/ ** +\* */ + +// $Id$ + +package meta.scalac.ast; + +public class MetaTraverser extends AbstractTreeCaseExpander { + + //######################################################################## + // Public Methods + + public void printTreeCaseBody(TreeNode node) { + if (node.fields != null) + for (int i = 0; i < node.fields.length; i++) + if (Tree.isTree(node.fields[i].type)) + writer.println("traverse(" + node.fields[i] + ");"); + writer.println("return;"); + } + + //######################################################################## +} |