From 7c4d5518dd68deec9ba4a5ed00fa00135d21273f Mon Sep 17 00:00:00 2001 From: Funky Waddle Date: Tue, 10 Feb 2026 07:58:03 -0600 Subject: [PATCH] core: refine host provider contract; add exception hierarchy; update specs for whitespace and data access --- SPECS.md | 2 +- src/Exceptions/FilterNotFoundException.php | 16 +++++++++ src/Exceptions/PropertyNotFoundException.php | 16 +++++++++ src/Exceptions/RecursionLimitException.php | 16 +++++++++ src/Exceptions/ScapeException.php | 18 +++++++++++ src/Exceptions/SyntaxException.php | 16 +++++++++ src/Exceptions/TemplateNotFoundException.php | 16 +++++++++ src/Interfaces/FilterInterface.php | 25 ++++++++++++++ src/Interfaces/HostProviderInterface.php | 34 ++++++++++++++++++++ 9 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 src/Exceptions/FilterNotFoundException.php create mode 100644 src/Exceptions/PropertyNotFoundException.php create mode 100644 src/Exceptions/RecursionLimitException.php create mode 100644 src/Exceptions/ScapeException.php create mode 100644 src/Exceptions/SyntaxException.php create mode 100644 src/Exceptions/TemplateNotFoundException.php create mode 100644 src/Interfaces/FilterInterface.php create mode 100644 src/Interfaces/HostProviderInterface.php diff --git a/SPECS.md b/SPECS.md index 3415c97..925dba0 100644 --- a/SPECS.md +++ b/SPECS.md @@ -41,7 +41,7 @@ composer require getphred/scape ### 3. Logic & Control Flow - **Syntax**: Uses `{( ... )}` for logic tags. -- **White-space Management**: Logic tags `{( ... )}` automatically consume one trailing newline immediately following the closing `)}` tag to prevent unintended vertical spacing in the rendered output. +- **White-space Management**: Logic tags `{( ... )}` and block/inheritance tags `{[ ... ]}` automatically consume one trailing newline immediately following their closing `)}` or `]}` to prevent unintended vertical spacing in the rendered output. - **"Logic-Light" Constraints**: - No generic programming or complex expressions. - No `if` statements or conditional branching (by design). diff --git a/src/Exceptions/FilterNotFoundException.php b/src/Exceptions/FilterNotFoundException.php new file mode 100644 index 0000000..48be4f2 --- /dev/null +++ b/src/Exceptions/FilterNotFoundException.php @@ -0,0 +1,16 @@ +