some bug fixes, templated operator method overloading

This commit is contained in:
Nathan Braswell
2015-08-03 18:37:42 -04:00
parent 5c1eeb17b8
commit a4f2febfd5
10 changed files with 164 additions and 59 deletions

View File

@@ -57,6 +57,9 @@ obj symbol (Object) {
fun operator==(other: symbol): bool {
return data == other.data && name == other.name && terminal == other.terminal;
}
fun operator!=(other: symbol): bool {
return !(*this == other);
}
fun to_string(): string::string {
var terminalString: *char
if (terminal)