Files
el/examples
Will Anderson 3e7d316c65 feat: extract HTML template parser/codegen from feat/el-html-templates
Parser additions (parser.el, no existing features removed):
- HTML template parser functions: is_html_tag_name, is_void_element,
  parse_html_text_tokens, parse_html_attrs, parse_html_children,
  parse_html_each_body, parse_html_element, parse_html_template
- HtmlTemplate detection in parse_primary (<tagname> and <!doctype>)
- Lambda fn literal expression node (parse_primary)
- Enum::Variant pattern matching (parse_pattern)
- type definition optional = before {
- try/catch statement (TryCatch AST node)

Codegen additions (codegen.el, no existing features removed):
- HTML template C codegen: cg_html_template, cg_html_parts,
  cg_html_attrs_str, cg_html_element_str, cg_html_each, next_html_id
- HtmlTemplate and Lambda dispatch in cg_expr
- Variant pattern support in cg_match
- TryCatch lowering in cg_stmt (C: runs try body, ignores catch)
- builtin_arity entries: getpid_now, stdout_to_file, stdout_restore

JS codegen additions (codegen-js.el, pure additions only):
- JS HTML template codegen: js_cg_html_template and helpers
- HtmlTemplate dispatch in js_cg_expr

Example: examples/html-page.el
2026-05-05 00:17:59 -05:00
..