// Check a stream encoded as plus one for open and minus one for close and return maximum balanced nesting. Reject premature closes and unfinished groups. pub fn bracket_depth(tokens: vector) -> i64 { let mut depth = 0; let mut peak = 0; let mut i = 0; while ipeak { peak = depth; } i += 1; } if depth != 0 { return -1; } peak }