Added Classes Type and TypedNode

This commit is contained in:
ahmad 2024-05-01 11:03:05 +02:00
parent 5fa439ec90
commit d812208712
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,8 @@
package de.maishai.typedast;
public enum Type {
INT,
BOOL,
CHAR,
VOID
}

View File

@ -0,0 +1,21 @@
package de.maishai.typedast;
import de.maishai.ast.Node;
public class TypedNode {
public Node node;
public Type type;
public TypedNode(Node node, Type type) {
this.node = node;
this.type = type;
}
@Override
public String toString() {
return node.toString() + " : " + type;
}
}