01.4 First smoke test
Minimal commands to prove the CLI parses and analyzes Beskid source.
First smoke test
Before you create a Project.proj cathedral, prove the toolchain can read a .bd file on disk.
Version check
Section titled “Version check”beskid --versionRecord the output when filing bugs. Rolling builds move; “latest” is not a version string.
Parse a snippet
Section titled “Parse a snippet”Create hello.bd anywhere (no project required for parse):
unit main() { // smoke}beskid parse hello.bdYou should get a debug AST view, not a stack trace about missing manifests. If parse fails on syntax you copied from this book, the book is wrong—file an issue.
Analyze (semantic pass)
Section titled “Analyze (semantic pass)”beskid analyze hello.bdAnalysis needs more context as programs grow; for a one-off file, flags may differ from project-scoped workflows. Once you have Project.proj, prefer:
beskid analyze --project path/to/Project.projSee analyze command.
Optional: format and tree
Section titled “Optional: format and tree”beskid format hello.bdbeskid tree hello.bdFormatting is the fastest way to settle bike-shed wars. tree is the ASCII tourist map of the AST—useful when you suspect the parser saw your file differently than you did.
flowchart LR parse[parse] --> tree[tree] parse --> analyze[analyze] analyze --> format[format]
What success looks like
Section titled “What success looks like”- Exit code zero (unless you intentionally broke the file).
- Diagnostics printed in a readable report (miette-style) when you break types on purpose later.
- No mystery about which binary ran (
which beskid).