Document not found (404)
-This URL is invalid, sorry. Please use the navigation bar or search to continue.
- -diff --git a/.gitignore b/.gitignore index fc83629..769acdf 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,8 @@ # macOS .DS_Store +# Generated by mdBook +/docs/book/ + # Generated by `oranda generate ci` -public/ \ No newline at end of file +public/ diff --git a/AGENTS.md b/AGENTS.md index f7c94d6..8b7cfb5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,8 +14,9 @@ Edit documentation sources under `docs/src/` and navigation in `docs/src/SUMMARY - `cargo test` runs unit, integration, and documentation tests. - `cargo fmt --all -- --check` checks formatting; `cargo fmt --all` applies it. - `cargo clippy --all-targets --all-features -- -D warnings` runs strict linting. +- `mdbook build docs` is the canonical documentation build; `mdbook test docs` tests its Rust examples. -Known legacy formatting, doctest, and Clippy failures are tracked in `TODO.md`. Do not introduce new failures; roadmap issues will establish clean required baselines. +All established formatting, compilation, test, and lint checks must pass before review. ## Coding Style & Testing diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5def8ee..37a9445 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,6 +35,7 @@ Pull requests are squash-merged only. Do not use merge commits or rebase merges. ### Prerequisites - [Rust](https://www.rust-lang.org/tools/install) (Edition 2024 or later) - [Cargo](https://doc.rust-lang.org/cargo/) +- [mdBook 0.5.2](https://rust-lang.github.io/mdBook/guide/installation.html): `cargo install mdbook --locked --version 0.5.2` ### Workflow 1. **Clone your fork**: @@ -51,8 +52,13 @@ Pull requests are squash-merged only. Do not use merge commits or rebase merges. ```bash cargo test ``` +4. **Build and Test Documentation**: + ```bash + mdbook build docs + mdbook test docs + ``` -Before review, also run `cargo fmt --all -- --check` and `cargo clippy --all-targets --all-features -- -D warnings`. Known legacy failures are recorded in `TODO.md`; do not add new failures while cleanup issues are open. +`mdbook build docs` is the canonical documentation build command. Before review, run all applicable commands above plus `cargo fmt --all -- --check` and `cargo clippy --all-targets --all-features -- -D warnings`; all established checks must pass. ## Architectural Overview diff --git a/TODO.md b/TODO.md index d6b91c3..b7792ce 100644 --- a/TODO.md +++ b/TODO.md @@ -4,7 +4,7 @@ This document is the issue source for PooLang's clean-break transition from the ## Current Audit -Snapshot: 2026-07-28. +Snapshot: 2026-07-29. ### What works @@ -12,6 +12,7 @@ Snapshot: 2026-07-28. - `cargo check --all-targets` passes. - `cargo test` passes and is enforced for pull requests, including all 48 integration specifications and the library doctest. - `cargo clippy --all-targets --all-features -- -D warnings` passes and is enforced for pull requests. +- `mdbook build docs` reproducibly generates ignored documentation output from `docs/src/`. - The crate exposes checked file/source execution APIs and typed I/O, parse, and runtime error categories. - Lexer, parser, interpreter, type-inference, examples, mdBook documentation, and cargo-dist release assets exist. @@ -30,7 +31,6 @@ Snapshot: 2026-07-28. - Function examples omit required parameter types or use return/type spelling that differs from the parser. - `trait` is tokenized but not supported as a complete tested language feature. - Examples contain multiple syntax generations and unverified standard-library methods. -- `docs/book/` contains 42 tracked generated files and can drift from `docs/src/`. - README development/release claims do not fully match current checks and workflows. ### Missing platform capabilities @@ -74,7 +74,7 @@ Snapshot: 2026-07-28. - [x] Resolve strict Clippy findings in the interpreter without lint suppressions or behavior changes. - [x] Resolve the remaining strict Clippy findings in the lexer, parser, type inference, and symbol table. - [x] Require `cargo clippy --all-targets --all-features -- -D warnings` in pull-request CI. -- [ ] Separate generated mdBook output from sources and define one reproducible documentation build command. +- [x] Separate generated mdBook output from sources and define one reproducible documentation build command. - [ ] Reconcile README commands, branch names, CI claims, supported features, and examples with executable behavior. - [ ] Add focused lexer/parser error tests for malformed strings, comments, UTF-8 input, and unexpected EOF. - [ ] Audit release workflow actions, permissions, secrets, installers, and generated cargo-dist configuration. diff --git a/docs/book/.nojekyll b/docs/book/.nojekyll deleted file mode 100644 index f173110..0000000 --- a/docs/book/.nojekyll +++ /dev/null @@ -1 +0,0 @@ -This file makes sure that Github Pages doesn't process mdBook's output. diff --git a/docs/book/404.html b/docs/book/404.html deleted file mode 100644 index 7c28b87..0000000 --- a/docs/book/404.html +++ /dev/null @@ -1,191 +0,0 @@ - - -
- - -This URL is invalid, sorry. Please use the navigation bar or search to continue.
- -PooLang uses if, elif, and else to control the flow of execution based on boolean conditions.
The simplest form is a single if block:
if x > 10 {
- pout("x is large");
-}
-
-You can provide an alternative path using else:
if x > 10 {
- pout("x is large");
-} else {
- pout("x is small");
-}
-
-For multiple conditions, use elif:
if x > 100 {
- pout("Huge");
-} elif x > 10 {
- pout("Large");
-} else {
- pout("Small");
-}
-
-Variables declared inside a conditional block are scoped to that block and are not accessible outside.
-if true {
- poo temp << 1;
-}
-# temp is no longer accessible here
-
-
- PooLang provides two primary ways to repeat logic: while loops and for loops.
The while loop continues to execute as long as its condition remains true.
poo mut count << 0;
-
-while count < 5 {
- pout("Count: ", count);
- count << count + 1;
-}
-
-PooLang supports for loops that iterate over a range or a collection.
You can iterate over a range of numbers using the .. syntax:
for i in 0..5 {
- pout(i); # Prints 0, 1, 2, 3, 4
-}
-
-You can also iterate over elements in a vector:
-poo items << [10, 20, 30];
-
-for item in items {
- pout(item);
-}
-
-The loop variable (like i or item) is only accessible within the body of the loop.
Functions in PooLang allow you to encapsulate logic into reusable blocks. They are defined using the poof keyword.
A basic function looks like this:
-poof sayHello() {
- pout("Hello!");
-}
-
-PooLang uses the >> operator to specify the return type of a function.
poof getNumber() >> int {
- return 42;
-}
-
-Common return types include int, float, string, bool, and void (if no value is returned).
You can pass data into functions via parameters:
-poof add(a, b) >> int {
- return a + b;
-}
-
-poo sum << add(5, 5); # sum is 10
-
-Functions create their own scope. Variables declared inside a function are not accessible outside. Functions can, however, access variables in the global scope if they are defined before the function is called.
- -The fastest way to install PooLang is via our universal installers:
-Linux / macOS
-curl --proto '=https' --tlsv1.2 -LsSf https://github.com/shayyz-code/poolang/releases/latest/download/poo-installer.sh | sh
-
-Windows
-powershell -c "irm https://github.com/shayyz-code/poolang/releases/latest/download/poo-installer.ps1 | iex"
-
-If you have Rust and Cargo installed, you can build from source:
-git clone https://github.com/shayyz-code/poolang.git
-cd poolang
-cargo build --release
-
-The binary will be available at ./target/release/poo.
Create a file named hello.poo:
use std::pout;
-
-pout("Hello, Guinea Pig!");
-
-Run it using the PooLang CLI:
-poo hello.poo
-
-Check out the Variables & Types section to learn more about PooLang syntax.
- -PooLang is a tiny, interpreted language written in Rust. It was designed to be a lightweight, pedagogical language featuring a full pipeline: lexical analysis, parsing into an Abstract Syntax Tree (AST), and tree-walking interpretation.
-The name Poo is inspired by the Burmese word for Guinea Pig, reflecting the language's friendly and compact nature.
-mut for mutability.poo keyword.<< operator.if/elif/else, while, and for loops.poof.