implement initial basic ast

This commit is contained in:
ChUrl
2020-12-01 17:29:38 +01:00
parent d710eec348
commit 4b92a39a89
2 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,28 @@
package util.ast;
public class AST {
private final Node root;
public AST(Node root) {
this.root = root;
}
public Node getRoot() {
return this.root;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof AST) {
return this.root.equals(((AST) obj).root);
}
return false;
}
@Override
public String toString() {
return this.root.toString();
}
}