[−][src]Function toml_parse::parse_it
pub fn parse_it(input: &str) -> Result<ParsedToml, ParseTomlError>
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)