29 lines
482 B
Java
29 lines
482 B
Java
package dev.peerat.parser.tree;
|
|
|
|
import dev.peerat.parser.state.StateTree;
|
|
|
|
public abstract class SyntaxTree<E>{
|
|
|
|
protected SyntaxTreeRegistery<E> registery;
|
|
protected StateTree<E> current;
|
|
private boolean init;
|
|
|
|
public SyntaxTree(SyntaxTreeRegistery<E> registery){
|
|
this.registery = registery;
|
|
}
|
|
|
|
public StateTree<E> getNode(){
|
|
return this.current;
|
|
}
|
|
|
|
public void checkInit(){
|
|
if(!init){
|
|
init();
|
|
this.init = true;
|
|
}
|
|
}
|
|
|
|
public abstract void init();
|
|
|
|
|
|
}
|