Strongly-typed AST types for TOML, auto-generated from
tree-sitter-toml-ng's node-types.json.
This crate is generated by treesitter-types and is
automatically kept up to date when a new version of the grammar crate is released.
See the Tree-sitter project for more information about the underlying parser framework.
Example
use *;
// A small TOML document.
let src = b"\
[package]
name = \"hello\"
version = \"1.0.0\"
";
// Parse the source with tree-sitter and convert into typed AST.
let mut parser = new;
parser.set_language.unwrap;
let tree = parser.parse.unwrap;
let document = from_node.unwrap;
// The document has one top-level child: a [package] table.
assert_eq!;
let Table = &document.children else ;
// The table contains the key-value pairs: `name` and `version`.
assert!;
assert_eq!;