feat(elc, elb): RBrace stop fix, html_raw/escape runtime, c_source manifest directive #46

Merged
will.anderson merged 2 commits from fix/elc-parser-elb-build into dev 2026-05-08 16:43:12 +00:00
Owner

Summary

  • elb: new c_source \"path\" manifest directive links extra C files (platform stubs, native glue) without modifying elb source; macOS homebrew OpenSSL path detection (no-op on Linux)
  • elc: fix parse_html_children consuming the El function-closing } as HTML text when a tag crosses a function boundary (e.g. page_open() leaves <body> open); stop loop on RBrace token
  • runtime: add html_raw() (identity passthrough) and html_escape() (escapes & < > \" ') builtins so templates can safely interpolate content
  • elc.c: promote elc-new.celc.c as canonical compiler source; remove elc-new binary

Test plan

  • elb build in products/web compiles and links cleanly on macOS (via c_source stubs + OpenSSL detection)
  • HTML templates with functions that open tags without closing them (page_open/page_close pattern) now compile correctly — page_close is no longer swallowed as HTML text
  • html_escape("{\"<script>\"}") returns &quot;&lt;script&gt;&quot;
  • CI linux build passes with rebuilt elc/elb binaries
## Summary - **elb**: new `c_source \"path\"` manifest directive links extra C files (platform stubs, native glue) without modifying elb source; macOS homebrew OpenSSL path detection (no-op on Linux) - **elc**: fix `parse_html_children` consuming the El function-closing `}` as HTML text when a tag crosses a function boundary (e.g. `page_open()` leaves `<body>` open); stop loop on RBrace token - **runtime**: add `html_raw()` (identity passthrough) and `html_escape()` (escapes `& < > \" '`) builtins so templates can safely interpolate content - **elc.c**: promote `elc-new.c` → `elc.c` as canonical compiler source; remove `elc-new` binary ## Test plan - [ ] `elb build` in `products/web` compiles and links cleanly on macOS (via `c_source` stubs + OpenSSL detection) - [ ] HTML templates with functions that open tags without closing them (page_open/page_close pattern) now compile correctly — page_close is no longer swallowed as HTML text - [ ] `html_escape("{\"<script>\"}")` returns `&quot;&lt;script&gt;&quot;` - [ ] CI linux build passes with rebuilt elc/elb binaries
will.anderson added 2 commits 2026-05-08 16:33:42 +00:00
Add `c_source "path"` in manifest.el build block — lets packages link
extra C files (platform stubs, native glue) without touching elb source.

On macOS, homebrew OpenSSL isn't on the default linker path. Detect it
via `brew --prefix` and inject -L/-I flags; no-op on Linux.

Rebuild elb binary; remove elc-new binary (elc is now canonical).
feat(elc, runtime): RBrace stop in parse_html_children; html_raw/html_escape; elc.c canonical
El SDK CI - dev / build-and-test (pull_request) Successful in 4m9s
a7e6fbf2d2
parse_html_children consumed the closing `}` of the outer El function as
HTML text content when a tag was left open across a function boundary
(e.g. `page_open()` opens `<body>` without a closing `</body>`).  Fix:
stop the children loop when the current token is RBrace — that token
belongs to the El function, not the HTML tree.

Add html_raw() and html_escape() builtins to el_runtime so templates
can interpolate trusted raw HTML and safely escape user-supplied content.

Rename elc-new.c → elc.c as the canonical compiler source; rebuild
elc binary from it.
will.anderson force-pushed fix/elc-parser-elb-build from fb9772db49 to a7e6fbf2d2 2026-05-08 16:33:43 +00:00 Compare
will.anderson merged commit 8967fa404e into dev 2026-05-08 16:43:12 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/el#46