Strongly-typed AST types for Elixir, auto-generated from
tree-sitter-elixir'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 minimal Elixir hello-world program.
let src = b"\
defmodule Hello do
def world do
IO.puts(\"Hello, World!\")
end
end
";
// 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 source = from_node.unwrap;
// The source has one top-level child: the `defmodule` call.
assert_eq!;
assert_eq!;
assert!;