2019-12-12 00:17:41 +00:00
|
|
|
package serene.simple;
|
|
|
|
|
|
|
|
public abstract class Node {
|
2019-12-19 22:57:04 +00:00
|
|
|
public boolean isTruthy = true;
|
2019-12-14 02:42:25 +00:00
|
|
|
|
2019-12-19 22:57:04 +00:00
|
|
|
public abstract Object eval(BaseScope scope);
|
2019-12-14 22:05:53 +00:00
|
|
|
|
2019-12-19 22:57:04 +00:00
|
|
|
public boolean equals(Node n) {
|
|
|
|
return this == n;
|
|
|
|
}
|
2019-12-14 22:05:53 +00:00
|
|
|
|
2019-12-19 22:57:04 +00:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
String className = this.getClass().getName();
|
|
|
|
return String.format("%s<%s>", className, System.identityHashCode(this));
|
|
|
|
}
|
2019-12-12 00:17:41 +00:00
|
|
|
}
|