Skip to main content

Module ast

Module ast 

Source
Expand description

Abstract Syntax Tree types for kaish.

This module provides:

  • AST type definitions (types module, re-exported at this level)
  • S-expression formatter for test snapshots (sexpr module)

Modules§

sexpr
S-expression formatter for kaish AST.

Structs§

Assignment
Variable assignment: NAME=value (bash-style) or local NAME = value (scoped)
BlobRef
Reference to binary data stored in /v/blobs/{id}.
CaseBranch
A single branch in a case statement.
CaseStmt
Case statement for pattern matching.
Command
A command invocation with arguments and redirections.
ForLoop
For loop over items.
IfStmt
Conditional statement.
ParamDef
Parameter definition for a tool.
Pipeline
A pipeline of commands connected by pipes.
Program
A complete kaish program is a sequence of statements.
Redirect
I/O redirection.
ToolDef
User-defined tool.
VarPath
Variable reference path: ${VAR} or ${?.field} for special variables.
WhileLoop
While loop with condition.

Enums§

Arg
A command argument (positional or named).
BinaryOp
Binary operators.
Expr
An expression that evaluates to a value.
FileTestOp
File test operators for [[ ]].
ParamType
Parameter type annotation.
RedirectKind
Type of redirection.
Stmt
A single statement in kaish.
StringPart
Part of an interpolated string.
StringTestOp
String test operators for [[ ]].
TestCmpOp
Comparison operators for [[ ]] tests.
TestExpr
Test expression for [[ ... ]] conditionals.
Value
A literal value.
VarSegment
A segment in a variable path.