diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2024-06-30 11:45:57 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-30 11:45:57 +0000 |
| commit | 8aa8b5834953cab15c0687608f4fafea2e6c61be (patch) | |
| tree | 1835ae7c789136b4a6c44c12efd4247a0b96d893 /src/ast/types/Type.java | |
| parent | 7125bb27fedaafd5a56b5122e4251b182448ddac (diff) | |
| parent | 06d7c8dee25c065b1a569337f34d3cd5e892a31d (diff) | |
Merge pull request #10 from boozec/check-semantics
Co-Authored-By: geno <gabriele.genovese2@studio.unibo.it>
Co-Authored-By: L0P0P <grassoemanuele@live.com>
Diffstat (limited to 'src/ast/types/Type.java')
| -rw-r--r-- | src/ast/types/Type.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ast/types/Type.java b/src/ast/types/Type.java index 6bff8b9..6190106 100644 --- a/src/ast/types/Type.java +++ b/src/ast/types/Type.java @@ -1,26 +1,25 @@ package ast.types; +import ast.nodes.*; 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; + return A.getClass().equals(B.getClass()); } + @Override public String toPrint(String s) { return s; } + @Override public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) { // It is never invoked return null; |
