feat: implement tag interpolation #[tag ...] syntax

- Lexer now emits start_pug_interpolation/end_pug_interpolation tokens
- Sub-lexer parses content inside #[...] as full Pug syntax
- Supports tags with attributes, classes, IDs, and buffered code
- Added tag_interp_test.zig with 8 test cases
- Memory management: sub-lexer buffers tracked and freed properly

Examples now working:
  p Dear #[strong= "asdasd"] -> <p>Dear <strong>asdasd</strong></p>
  p This is #[em emphasized] text -> <p>This is <em>emphasized</em> text</p>
  p Click #[a(href='/') here] -> <p>Click <a href="/">here</a></p>
This commit is contained in:
2026-01-31 19:25:31 +05:30
parent 6eddcabb8c
commit c26b409a92
5 changed files with 272 additions and 64 deletions

View File

@@ -1,6 +1,6 @@
.{
.name = .pugz,
.version = "0.3.12",
.version = "0.3.13",
.fingerprint = 0x822db0790e17621d, // Changing this has security and trust implications.
.minimum_zig_version = "0.15.2",
.dependencies = .{},