Expand description
Abstract Syntax Tree types for kaish.
This module provides:
- AST type definitions (
typesmodule, re-exported at this level) - S-expression formatter for test snapshots (
sexprmodule)
Modules§
- sexpr
- S-expression formatter for kaish AST.
Structs§
- Assignment
- Variable assignment:
NAME=value(bash-style) orlocal NAME = value(scoped) - BlobRef
- Reference to binary data stored in
/v/blobs/{id}. - Case
Branch - A single branch in a case statement.
- Case
Stmt - Case statement for pattern matching.
- Command
- A command invocation with arguments and redirections.
- ForLoop
- For loop over items.
- IfStmt
- Conditional statement.
- Param
Def - 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. - While
Loop - While loop with condition.
Enums§
- Arg
- A command argument (positional or named).
- Binary
Op - Binary operators.
- Expr
- An expression that evaluates to a value.
- File
Test Op - File test operators for
[[ ]]. - Param
Type - Parameter type annotation.
- Redirect
Kind - Type of redirection.
- Stmt
- A single statement in kaish.
- String
Part - Part of an interpolated string.
- String
Test Op - String test operators for
[[ ]]. - Test
CmpOp - Comparison operators for
[[ ]]tests. - Test
Expr - Test expression for
[[ ... ]]conditionals. - Value
- A literal value.
- VarSegment
- A segment in a variable path.