Commit Graph

7 Commits

Author SHA1 Message Date
8db2e0df37 Genearte .zig verions of templates to use in production. 2026-01-28 17:01:28 +05:30
27c4898706 follow PugJs 2026-01-24 23:53:19 +05:30
0d4aa9ff90 docs: add meaningful code comments to build_templates.zig
- Added comprehensive module-level documentation explaining architecture
- Added doc comments to all public and key internal functions
- Improved inline comments focusing on 'why' not 'what'
- Updated CLAUDE.md with code comments rule
- Bump version to 0.2.0
2026-01-23 12:34:30 +05:30
b079bbffff fix: escape quotes in backtick strings and merge duplicate class attributes
- HTML-escape double quotes as " in backtick template literals for valid attribute values
- Merge shorthand classes (.alert) with class attribute values instead of emitting duplicates
- Handle string concatenation expressions in class attributes (e.g., class="btn btn-" + type)
2026-01-23 11:50:18 +05:30
654b45ee10 Compiled temapltes.
Benchmark cleanup
2026-01-22 11:10:47 +05:30
510dcfbb03 bench data 2026-01-21 23:41:36 +05:30
6ab3f14897 Initial commit: Pugz - Pug-like HTML template engine in Zig
Features:
- Lexer with indentation tracking and raw text block support
- Parser producing AST from token stream
- Runtime with variable interpolation, conditionals, loops
- Mixin support (params, defaults, rest args, block content, attributes)
- Template inheritance (extends/block/append/prepend)
- Plain text (piped, dot blocks, literal HTML)
- Tag interpolation (#[tag text])
- Block expansion with colon
- Self-closing tags (void elements + explicit /)
- Case/when statements
- Comments (rendered and silent)

All 113 tests passing.
2026-01-18 00:05:16 +05:30