Module ast

Source
Expand description

The abstract syntax tree (AST) of Jsonnet code.

Since Jsonnet is a purely functional language, it is composed mainly of expressions. See Expr and ExprKind as starting point.

§Lifetimes

AST structures in this module are intended to be allocated with arena allocation. Two lifetime are used:

  • 'p, which represents interned strings.
  • 'ast, which represents most allocations of AST nodes.

Independent arenas can be used for each lifetime, allowing to free most of an AST while keeping interned strings.

Structs§

Assert
Bind
Expr
ForSpec
Ident
IfSpec
ObjLocal
Param

Enums§

Arg
BinaryOp
CompSpecPart
ExprKind
Field
FieldName
Member
ObjInside
UnaryOp
Visibility