summaryrefslogtreecommitdiff
path: root/src/ast/types/Type.java
blob: fc9c672dafe49943da6cf6166e243d6009548ba8 (plain)
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
45
package ast.types;

import ast.nodes.*;
import java.util.ArrayList;
import semanticanalysis.SemanticError;
import semanticanalysis.SymbolTable;

/**
 * A node which represents a type class.
 */
public class Type implements Node {

    public boolean isEqual(Type A, Type B) {
        return A.getClass().equals(B.getClass());
    }

    @Override
    public String printAST(String s) {
        return s;
    }

    @Override
    public String toPrint(String s) {
        return s;
    }

    @Override
    public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting, FunctionType ft) {
        // It is never invoked
        return null;
    }

    @Override
    public Type typeCheck() {
        // It is never invoked
        return null;
    }

    @Override
    public String codeGeneration() {
        // It is never invoked
        return "";
    }

}