pub fn parse(
data: &[u8],
limits: &ParseLimits
) -> Result<(Node, PosTree), ParseError>
Expand description
Parses data
. If successful, it returns the root node and a position
map that allows to fetch the position (line and column) of each node.
Example
let data = b"(test (1 2 3))";
let limits = sise::ParseLimits::unlimited();
match sise::parse(data, &limits) {
Ok((root_node, pos_tree)) => {
println!("{:?}", root_node);
}
Err(e) => {
panic!("Error: {}", e);
}
}