Fixed add_children to actually add children correctly and only do the ambiguity at the right time. Still have the looking in map with non-existant key problem, but it is actually parsing nicely.
This commit is contained in:
@@ -47,7 +47,13 @@ obj map<T,U> (Object) {
|
||||
return keys.contains(key)
|
||||
}
|
||||
fun get(key: T): ref U {
|
||||
return values.get(keys.find(key))
|
||||
/*return values.get(keys.find(key))*/
|
||||
var key_loc = keys.find(key)
|
||||
if (key_loc == -1) {
|
||||
io::println("trying to access nonexistant key-value!")
|
||||
/*while (true) {}*/
|
||||
}
|
||||
return values.get(key_loc)
|
||||
}
|
||||
fun remove(key: T) {
|
||||
var idx = keys.find(key)
|
||||
|
||||
Reference in New Issue
Block a user