Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (31 sloc) 567 Bytes
module parsing.ast;
import core.string;
import core.definitions;
import core.variant;
import data.list;
import io.console;
class AbstractSyntaxTree : List!(AbstractSyntaxTree) {
this() {
}
this(uint type, AbstractSyntaxTree[] nodes ...) {
addList(nodes);
_type = type;
}
void type(uint value) {
_type = type;
}
uint type() {
return _type;
}
AbstractSyntaxTree next() {
return _next;
}
AbstractSyntaxTree parent() {
return _parent;
}
protected:
AbstractSyntaxTree _next;
AbstractSyntaxTree _parent;
uint _type;
Variant _value;
}