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:
@@ -2,6 +2,18 @@ import vector
|
||||
import util
|
||||
import mem
|
||||
|
||||
fun to_string(in: int): string {
|
||||
var dest = mem::new<char>(mem::sizeof<int>() * 8)
|
||||
defer mem::delete(dest)
|
||||
__if_comp__ __C__ {
|
||||
simple_passthrough(dest = dest, in = in::) """
|
||||
sprintf(dest, "%d", in);
|
||||
"""
|
||||
}
|
||||
var ret = string(dest)
|
||||
return ret
|
||||
}
|
||||
|
||||
fun string(in:*char):string {
|
||||
var out.construct(in):string
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user