fix: add scoped error logging for lexer/parser errors

- Add std.log.scoped(.pugz) to template.zig and view_engine.zig
- Log detailed error info (code, line, column, message) when parsing fails
- Log template path context in ViewEngine on parse errors
- Remove debug print from lexer, use proper scoped logging instead
- Move benchmarks, docs, examples, playground, tests out of src/ to project root
- Update build.zig and documentation paths accordingly
- Bump version to 0.3.1
This commit is contained in:
2026-01-25 17:10:02 +05:30
parent 9d3b729c6c
commit aaf6a1af2d
1148 changed files with 57 additions and 330 deletions

View File

@@ -0,0 +1,56 @@
extends layouts/base.pug
block title
title #{title} | Pugz Store
block content
section.hero
.container
h1 Welcome to Pugz Store
p Discover amazing products powered by Zig
.hero-actions
a.btn.btn-primary(href="/products") Shop Now
a.btn.btn-outline(href="/about") Learn More
section.section
.container
h2 Template Features
.feature-grid
.feature-card
h3 Conditionals
if authenticated
p.text-success You are logged in!
else
p.text-muted Please log in to continue.
.feature-card
h3 Variables
p Title: #{title}
p Cart Items: #{cartCount}
.feature-card
h3 Iteration
ul
each item in items
li= item
.feature-card
h3 Clean Syntax
p Pug templates compile to HTML with minimal overhead.
section.section.section-alt
.container
h2 Shop by Category
.category-grid
a.category-card(href="/products?cat=electronics")
.category-icon E
h3 Electronics
span 24 products
a.category-card(href="/products?cat=accessories")
.category-icon A
h3 Accessories
span 18 products
a.category-card(href="/products?cat=home")
.category-icon H
h3 Home Office
span 12 products