Interpreter up to 71/73 tests passing, the only ones that don't yet are the future ones. Struct size is still wrong though

This commit is contained in:
Nathan Braswell
2016-07-03 01:55:32 -07:00
parent 2e80682f01
commit 87c2b1d2c1
7 changed files with 63 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
import io
import string
import ast_transformation
import util
import vector
import string
import mem
@@ -151,7 +151,7 @@ obj regex (Object, Serializable) {
var perenEnd = i + 1
for (var depth = 1; depth > 0; perenEnd++;) {
if (perenEnd >= regex_string.length())
ast_transformation::error(string::string("can't find matching peren in: ") + regex_string)
util::error(string::string("can't find matching peren in: ") + regex_string)
// be careful, this isn't quite right yet
/*var not_non_special = perenEnd == 0 || (regex_string[perenEnd-1] != '\\' && regex_string[perenEnd-1] != '[' && (perenEnd+1 >= regex_string.length() || regex_string[perenEnd+1] != ']'))*/
var not_non_special = perenEnd == 0 || (regex_string[perenEnd-1] != '[' && (perenEnd+1 >= regex_string.length() || regex_string[perenEnd+1] != ']'))