Expand description
Typed AST wrappers for the ink CST.
Every struct is a zero-cost newtype around SyntaxNode that implements
AstNode. Use crate::Parse::tree() to get a SourceFile from
a parse result.
Structs§
- Annotation
Line - ArgList
- Array
Literal - Assignment
- AstPtr
- A lightweight pointer to an AST node, resolvable against a syntax tree.
- Author
Warning - Await
Stmt - Boolean
Lit - Branch
Content - Branchless
Cond Body - Break
Stmt - Call
Expr - Choice
- Choice
Bracket Content - Choice
Bullets - Choice
Condition - Choice
Inner Content - Choice
Start Content - Conditional
With Expr - Const
Decl - Content
Line - Continue
Stmt - Divert
Node - Divert
Target Expr - Divert
Target With Args - Else
Branch - Else
Clause - Empty
Line - Error
- Escape
- Expr
Stmt - External
Decl - Field
Access Expr - File
Path - Float
Lit - FnLiteral
- ForStmt
- Function
Call - Function
Param List - Gather
- Gather
Dashes - Glue
Node - Identifier
- IfStmt
- Implicit
Sequence - Import
Item - Import
List - Import
Module - Import
Stmt - Include
Stmt - Index
Expr - Infix
Expr - Inline
Branches Cond - Inline
Branches Seq - Inline
Logic - Inner
Expression - Integer
Lit - Knot
Body - KnotDef
- Knot
Header - Knot
Param Decl - Knot
Params - Label
- List
Decl - ListDef
- List
Expr - List
Member - List
Member Off - List
Member On - Logic
Line - MapEntry
- MapLiteral
- Mixed
Content - Multiline
Block - Multiline
Branch Body - Multiline
Branch Cond - Multiline
Branch Seq - Multiline
Branches Cond - Multiline
Branches Seq - Multiline
Conditional - Paren
Expr - Path
- Postfix
Expr - Prefix
Expr - Range
Expr - RefExpr
- Return
Stmt - Sequence
Symbol Annotation - Sequence
With Annotation - Sequence
Word Annotation - Simple
Divert - Source
File - Stitch
Body - Stitch
Def - Stitch
Header - Stmt
Block - Stray
Closing Brace - String
Lit - Struct
Decl - Struct
Field Decl - Struct
Field Init - Struct
Literal - Syntax
Node Ptr - An untyped lightweight pointer to a syntax node, resolvable against a tree.
- Tag
- TagLine
- Tags
- Temp
Decl - Text
- Thread
Start - Tunnel
Call Node - Tunnel
Onwards Node - Type
Annotation - Type
Expr - TypeFn
- Type
Generic - Type
Name - VarDecl
- While
Stmt
Enums§
- Block
Stmt - A single statement inside a
~ { … }block body. - Expr
- A typed expression node.
- Type
Expr Kind - What a
TypeExprwraps — exactly one of these per node.
Traits§
- AstNode
- A typed wrapper around a
SyntaxNode.