diff options
author | Geno <48206120+gabrielegenovese@users.noreply.github.com> | 2024-07-11 12:57:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 12:57:56 +0200 |
commit | b50c7e99603e9f85d82d700d62c16c4fcef88715 (patch) | |
tree | 5052206f06e0426a43599cb236652614db04d22e /src/ast/nodes/CompNode.java | |
parent | f0692ff5f9e39cbd1c203e9d5abebf55a3d0f6fc (diff) |
Code generation (#20)
Co-authored-by: geno <gabrigeno@gmail>
Co-authored-by: Santo Cariotti <santo@dcariotti.me>
Diffstat (limited to 'src/ast/nodes/CompNode.java')
-rw-r--r-- | src/ast/nodes/CompNode.java | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/ast/nodes/CompNode.java b/src/ast/nodes/CompNode.java deleted file mode 100644 index b6e0191..0000000 --- a/src/ast/nodes/CompNode.java +++ /dev/null @@ -1,42 +0,0 @@ -package ast.nodes; - -import java.util.ArrayList; - -import semanticanalysis.SemanticError; -import semanticanalysis.SymbolTable; -import ast.types.*; -import org.antlr.v4.runtime.tree.TerminalNode; - -/** - * Node for the `comp_op` statement of the grammar. - */ -public class CompNode implements Node { - - private final TerminalNode op; - - public CompNode(TerminalNode op) { - this.op = op; - } - - @Override - public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) { - return new ArrayList<>(); - } - - // TODO: it should be boolean, right? - @Override - public Type typeCheck() { - return new VoidType(); - } - - // TODO: add code generation for CompNode - @Override - public String codeGeneration() { - return ""; - } - - @Override - public String toPrint(String prefix) { - return prefix + "CompNode(" + op + ")\n"; - } -} |