summaryrefslogtreecommitdiff
path: root/sources/meta/scalac/ast/MetaDefaultTreeFactory.java
blob: fde4fe777317496b49d14b3cc3608192fddf7002 (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
/*     ____ ____  ____ ____  ______                                     *\
**    / __// __ \/ __// __ \/ ____/    SOcos COmpiles Scala             **
**  __\_ \/ /_/ / /__/ /_/ /\_ \       (c) 2002, LAMP/EPFL              **
** /_____/\____/\___/\____/____/                                        **
\*                                                                      */

// $Id$

package meta.scalac.ast;

public class MetaDefaultTreeFactory extends AbstractTreeMethodExpander {

    //########################################################################
    // Public Methods

    public void printTreeMethod(TreeNode node, boolean withSymbol) {
        node.printMethod(writer, "int pos", withSymbol).lbrace();
        node.printNew(writer.print(node + " t = "), withSymbol).println(";");
        writer.println("t.pos = pos;");
        writer.println("return t;");
        writer.rbrace();
    }

    //########################################################################
}