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

// $Id$

package scalac.transformer;

import scalac.*;
import scalac.checkers.*;

public class TransMatchPhase extends PhaseDescriptor {

    public String name () {
        return "transmatch";
    }

    public String description () {
        return "translate match expressions";
    }

    public String taskDescription() {
        return "translated pattern matching";
    }

    public void apply(Global global) {
        new TransMatch(global).apply();
    }

    public void apply(Unit unit) {
    	new TransMatch(unit.global).apply(unit);
    }

    public Checker[] postCheckers(Global global) {
        return new Checker[] {
            new CheckSymbols(global),
            new CheckTypes(global),
            new CheckOwners(global),
	    new CheckNames(global)
        };
    }
}