pub fn parse_it(input: &str) -> Result<ParsedToml, ParseTomlError>Expand description
Parses the input into a Result<ParsedToml>.
This contains a GreenNode and
by calling .syntax() on ParsedToml you get the TomlKind::Root
SyntaxNode.
ยงExamples
use toml_parse::{parse_it, TomlKind};
let toml =
"[valid]
toml = \"stuff\"
";
let root_node = parse_it(toml).unwrap().syntax();
assert_eq!(root_node.first_child().unwrap().kind(), TomlKind::Table)