Expand description
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 treesitter_types_elixir::*;
// 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 = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_elixir::LANGUAGE.into()).unwrap();
let tree = parser.parse(src, None).unwrap();
let source = Source::from_node(tree.root_node(), src).unwrap();
// The source has one top-level child: the `defmodule` call.
assert_eq!(source.children.len(), 1);
assert_eq!(source.span.start.row, 0);
assert!(source.span.end.row >= 4);Re-exports§
pub use tree_sitter_elixir;pub use treesitter_types::tree_sitter;
Structs§
- Access
Call - After
Block - Alias
- Anonymous
Function - Arguments
- Atom
- Binary
Operator - Bitstring
- Block
- Body
- Boolean
- Call
- Catch
Block - Char
- Charlist
- Comment
- DoBlock
- Dot
- Else
Block - Escape
Sequence - Float
- Identifier
- Integer
- Interpolation
- Keyword
- Keywords
- List
- Map
- MapContent
- Nil
- Operator
Identifier - Pair
- Quoted
Atom - Quoted
Content - Quoted
Keyword - Rescue
Block - Sigil
- Sigil
Modifiers - Sigil
Name - Source
- Span
- Stab
Clause - String
- Struct
- Tuple
- Unary
Operator
Enums§
- Access
Call Key - Access
Call Target - After
Block Children - AnyNode
- Arguments
Children - Binary
Operator Left - Binary
Operator Operator - Binary
Operator Right - Bitstring
Children - Block
Children - Body
Children - Call
Children - Call
Target - Catch
Block Children - Charlist
Children - Charlist
Quoted End - Charlist
Quoted Start - DoBlock
Children - DotLeft
- DotOperator
- DotRight
- Else
Block Children - Interpolation
Children - List
Children - MapChildren
- MapContent
Children - PairKey
- Pair
Value - Parse
Error - Quoted
Atom Children - Quoted
Atom Quoted End - Quoted
Atom Quoted Start - Quoted
Keyword Children - Quoted
Keyword Quoted End - Quoted
Keyword Quoted Start - Rescue
Block Children - Sigil
Children - Sigil
Quoted End - Sigil
Quoted Start - Source
Children - Stab
Clause Left - Stab
Clause Operator - String
Children - String
Quoted End - String
Quoted Start - Struct
Children - Tuple
Children - Unary
Operator Operand - Unary
Operator Operator