Yentl Van Tendeloo 7 år sedan
förälder
incheckning
072ad9bd8e
2 ändrade filer med 4 tillägg och 1 borttagningar
  1. 1 0
      bootstrap/initial_code_task.alc
  2. 3 1
      bootstrap/json.alc

+ 1 - 0
bootstrap/initial_code_task.alc

@@ -24,5 +24,6 @@ Void mutable function __main():
 	exec(root["bootstrap/conformance_finding.alc"]["initializers"])
 	exec(root["bootstrap/typing.alc"]["initializers"])
 	exec(root["bootstrap/compiler.alc"]["initializers"])
+	exec(root["bootstrap/json.alc"]["initializers"])
 	new_task()
 	return!

+ 3 - 1
bootstrap/json.alc

@@ -27,13 +27,14 @@ Void function json_send_data(port : String, data : Element):
 		Element expected
 		Element copy
 		Element entry
-		String key
+		Element key
 
 		keys = dict_keys(data)
 		expected = list_to_set(range(dict_len(data)))
 		if (set_equality(keys, expected)):
 			// Equal, so we are (most likely...) dealing with a list
 			comm_set(port, "L")
+			comm_set(port, list_len(data))
 			
 			copy = list_copy(data)
 			while (list_len(copy) > 0):
@@ -42,6 +43,7 @@ Void function json_send_data(port : String, data : Element):
 		else:
 			// Not equal, so we are surely dealing with a dict
 			comm_set(port, "D")
+			comm_set(port, dict_len(data))
 
 			while (set_len(keys) > 0):
 				key = set_pop(keys)