summaryrefslogtreecommitdiffstats
path: root/src/ast/types/Type.java
blob: 6bff8b96bf8b303f5480c8209ef1a29ea45ffddd (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
package ast.types;

import java.util.ArrayList;

import semanticanalysis.SemanticError;
import semanticanalysis.SymbolTable;
import ast.nodes.*;

/**
 * A node which represents a type class.
 */
public class Type implements Node {
    public boolean isEqual(Type A, Type B) {
        if (A.getClass().equals(B.getClass()))
            return true;
        else
            return false;
    }

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

    public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) {
        // 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 "";
    }

}