Skip to main content

Module ast

Module ast 

Source
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§

AnnotationLine
ArgList
ArrayLiteral
Assignment
AstPtr
A lightweight pointer to an AST node, resolvable against a syntax tree.
AuthorWarning
AwaitStmt
BooleanLit
BranchContent
BranchlessCondBody
BreakStmt
CallExpr
Choice
ChoiceBracketContent
ChoiceBullets
ChoiceCondition
ChoiceInnerContent
ChoiceStartContent
ConditionalWithExpr
ConstDecl
ContentLine
ContinueStmt
DivertNode
DivertTargetExpr
DivertTargetWithArgs
ElseBranch
ElseClause
EmptyLine
Error
Escape
ExprStmt
ExternalDecl
FieldAccessExpr
FilePath
FloatLit
FnLiteral
ForStmt
FunctionCall
FunctionParamList
Gather
GatherDashes
GlueNode
Identifier
IfStmt
ImplicitSequence
ImportItem
ImportList
ImportModule
ImportStmt
IncludeStmt
IndexExpr
InfixExpr
InlineBranchesCond
InlineBranchesSeq
InlineLogic
InnerExpression
IntegerLit
KnotBody
KnotDef
KnotHeader
KnotParamDecl
KnotParams
Label
ListDecl
ListDef
ListExpr
ListMember
ListMemberOff
ListMemberOn
LogicLine
MapEntry
MapLiteral
MixedContent
MultilineBlock
MultilineBranchBody
MultilineBranchCond
MultilineBranchSeq
MultilineBranchesCond
MultilineBranchesSeq
MultilineConditional
ParenExpr
Path
PostfixExpr
PrefixExpr
RangeExpr
RefExpr
ReturnStmt
SequenceSymbolAnnotation
SequenceWithAnnotation
SequenceWordAnnotation
SimpleDivert
SourceFile
StitchBody
StitchDef
StitchHeader
StmtBlock
StrayClosingBrace
StringLit
StructDecl
StructFieldDecl
StructFieldInit
StructLiteral
SyntaxNodePtr
An untyped lightweight pointer to a syntax node, resolvable against a tree.
Tag
TagLine
Tags
TempDecl
Text
ThreadStart
TunnelCallNode
TunnelOnwardsNode
TypeAnnotation
TypeExpr
TypeFn
TypeGeneric
TypeName
VarDecl
WhileStmt

Enums§

BlockStmt
A single statement inside a ~ { … } block body.
Expr
A typed expression node.
TypeExprKind
What a TypeExpr wraps — exactly one of these per node.

Traits§

AstNode
A typed wrapper around a SyntaxNode.