parse_tree

Function parse_tree 

Source
pub fn parse_tree(input: &str) -> Result<Vec<(usize, Vec<usize>)>, String>
Expand description

Auxiliary function to parse a contract call mapping.

The mapping is in the format of {0: [1,2], 1: [], 2:[3], 3:[]}. It supports nesting and this kind of logic as expected.

Errors out if there are non-unique keys or cyclic references.