-
v.0.3.0-alpha Pre-release
released this
2026-01-02 20:53:57 +01:00 | 581 commits to main since this releaseArchitecture Refactor
The project has been restructured to improve scalability, maintainability, and developer experience.
Key Changes
Major Restructuring
- The project structure has been completely reorganized. All code modules are now located in a centralized
packages/directory.packages/parser: Core parsing logic (formerlygram-parser).packages/compiler: Compiler and graph logic (formerlygram-compiler).packages/playground: The web-based IDE.packages/vscode-extension: Visual Studio Code language support.
- Workspace Management: The root
package.jsonnow acts as a workspace manager, allowing installation of all dependencies with a singlenpm installcommand. - Centralized Config: Introduced a shared
tsconfig.base.jsonto ensure consistent TypeScript configuration across all packages.
Separation of Parser & Compiler
- Decoupled Architecture: The Compiler logic has been extracted from the Parser.
- Parser (
packages/parser): Strictly responsible for grammar definition (OhmJS) and generating the raw AST. - Compiler (
packages/compiler): Responsible for semantic analysis, graph generation, and transforming the AST into usable artifacts (Shopping Lists, Instructions...).
- Parser (
This separation allows tools (like linters or syntax highlighters) to use the lightweight parser without pulling in the heavy compiler logic.
Developer Experience
- Global Scripts: Added unified commands at the project root for easier workflow:
npm run build: Builds the core (parser & compiler).npm run dev: Launches the Playground instantly.
- Clean Output: Build scripts now feature friendly emojis and concise logging 🏗️ ✅.
- Examples Library: Created a dedicated
examples/folder at the project root.- These examples are automatically synced with the Playground during build.
- The Playground now dynamically lists these examples in its dropdown menu.
Fixes & Polish
- Separated Parser and Compiler logic into distinct, clean packages with proper dependencies.
- Updated
README.mdandCONTRIBUTING.mdto reflect the new architecture.
Changes Breakdown
- Moved
gram-parser→packages/parser - Moved
gram-compiler→packages/compiler - Moved
playground→packages/playground - Moved
gram-vscode-extension→packages/vscode-extension - Added
tsconfig.base.json - Refactored root
package.jsonscripts.
How to test this release
- Clone the repo (or pull changes).
- Run
npm installat the root. - Run
npm run build. - Run
npm run dev. - Open
http://localhost:3000and try the playground.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- The project structure has been completely reorganized. All code modules are now located in a centralized