Moved over compiler information printing and error to use stderr, enabled interpreter testing in tester. The interpreter passes 34/74 tests

This commit is contained in:
Nathan Braswell
2016-05-22 14:10:19 -07:00
parent 12dfa837e3
commit ce2eff42a6
9 changed files with 49 additions and 51 deletions

View File

@@ -1,5 +1,7 @@
import mem
import io
import os
import string
import set
import map
import vector
@@ -9,6 +11,13 @@ import serialize
// maybe my favorite function
fun do_nothing() {}
fun error(message: *char) error(string::string(message));
fun error(message: string::string) {
io::printlnerr("****ERROR****")
io::printlnerr(message)
os::exit(-1)
}
fun deref_equality<T>(a: *T, b: *T): bool {
if ( (a && b && !(*a == *b)) || (a && !b) || (!a && b) )
return false