Package com.github.adriantodt.lin.ast.node

Types

ConstExpr
Link copied to clipboard
interface ConstExpr : Expr

This is an AST constant expression node from Lin. This expression node will always compute to a value. This is a marker used to indicate if a given Node can be optimized away.

Expr
Link copied to clipboard
interface Expr : Node

This is an AST expression node from Lin. This expression node will always compute to a value.

InvalidNode
Link copied to clipboard
data class InvalidNode(section: Section?, children: List<Node>, errors: List<Exception>) : Expr
MultiExpr
Link copied to clipboard
data class MultiExpr(list: List<Node>, last: Expr, section: Section?) : Expr, Node.Multi

This represents a given list of nodes, with the last node being necessarily an expression. Nodes must be executed sequentially. The value of this expression is the last expression's value. This AST node's main use is lambda bodies and REPL scopes.

MultiNode
Link copied to clipboard
data class MultiNode(list: List<Node>, section: Section?) : Node.Multi

This represents a given list of nodes. Nodes must be executed sequentially. This AST node's main use is function bodies and main scopes.

Node
Link copied to clipboard
interface Node : Sectional

This is a simple AST node from Lin. Nodes that don't extend Expr are meant to have no value. If you have to extract a value from a Node which doesn't extend Expr, consider it's value unit.